RFR: 8321698: JFR asserts in write_classloader: failed invariant [v2]

Markus Grönlund mgronlun at openjdk.org
Thu Dec 21 18:18:48 UTC 2023


> Greetings,
> 
> I have reviewed the JFR tagging mechanism, which lacks proper transitivity in certain situations. For example, when tagging a PackageEntry or a ModuleEntry, no tag information is set for the ModuleEntry's CLD and its class_loader_klass. The assert then fires when writing the CLD of a ModuleEntry, should its CLD not have been tagged by some other means (some other direct usage).
> 
> The tagging must, in general, become deeper than what is done today, i.e. it must cover the transitive closure of a Klass, which involves two branches:
> 
> 1) Klass -> CLD -> class_loader_klass
> 2) Klass -> PkgEntry -> ModuleEntry -> CLD -> class_loader_klass
> 
> A Klass under its closure can be treated as a node in a binary tree. Its closure (subtree) is covered by writing and tagging of artifacts using preorder traversal by recursing its CLD klasses.
> 
> Testing: jdk_jfr, stress testing
> 
> Thanks
> Markus

Markus Grönlund has updated the pull request incrementally with one additional commit since the last revision:

  conditional method assert

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/17177/files
  - new: https://git.openjdk.org/jdk/pull/17177/files/f6358d1e..a860bac4

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=17177&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=17177&range=00-01

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/17177.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/17177/head:pull/17177

PR: https://git.openjdk.org/jdk/pull/17177


More information about the hotspot-jfr-dev mailing list