RFR: 8302066: Counter _number_of_nmethods_with_dependencies should be atomic.

Robbin Ehn rehn at openjdk.org
Wed Feb 8 11:54:26 UTC 2023


Hi, please consider!

We increment this counter when holding CodeCache, but loads are holding Compile_lock.
Lets just make it atomic so we don't need to reason about if there is some race here.
Also we are trying to avoid 'dirty' reads in the code base. (since in theory it is subject to things like word-tearing)

Testing tier1 in progress.

Thanks, Robbin

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

Commit messages:
 - Counter _number_of_nmethods_with_dependencies should be atomic.

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

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


More information about the hotspot-compiler-dev mailing list