RFR: 8317440: Lock rank checking fails when code root set is modified with the Servicelock held after JDK-8315503

Thomas Schatzl tschatzl at openjdk.org
Fri Oct 6 07:43:28 UTC 2023


Hi all,

  please review this change that fixes lock ranking after recent changes to the code root set, now using a CHT.

The issue came up because the lock rank of the CHT lock has been larger than the rank of the Servicethread_lock where it is possible that code roots can be added.

The suggested solution is to fix up the lock rankings to work; actually this PR contains two variants:
1) one that statically sets the lock ranks of the CHT lock (and the ThreadSMR_lock that can be used during CHT operation) to something smaller than Servicethread_lock.
2) one that allows setting of the CHT lock rank via parameter as well (the last commit changed the code to variant 1).

The other lock ranking changes to Metaspace_lock and ContinuationRelativize_lock are simply undos of the respective changes in [JDK-8315503](https://bugs.openjdk.org/browse/JDK-8315503). 

Testing: tier1-8 for variant 2), tier 1-7 for variant 1)

Thanks,
  Thomas

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

Commit messages:
 - undo earlier changes, fix test
 - Some more ranking problems...
 - fix test compilation
 - 8317440 initial version

Changes: https://git.openjdk.org/jdk/pull/16062/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16062&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8317440
  Stats: 4 lines in 2 files changed: 0 ins; 0 del; 4 mod
  Patch: https://git.openjdk.org/jdk/pull/16062.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/16062/head:pull/16062

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


More information about the hotspot-dev mailing list