RFR: 8310194: Generational ZGC: Lock-order asserts in JVMTI IterateThroughHeap

Stefan Karlsson stefank at openjdk.org
Fri Jun 16 12:13:29 UTC 2023


Generational ZGC changed the location where the heap object iterator called the visit function. It used to be called when the objects were popped and then followed, but it was changed so that the function where called immediately when the objects are marked. This gave the benefit that the verification code code show exactly what root had a broken object. Unfortunately, this change started to apply non-GC closure during the root iteration. This code lead to lock order issues, just like the one described in the JBS entry.

This fix moves the visit calls for non-GC closures back to the follow calls.

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

Commit messages:
 - Clean out old comment
 - 8310194: Generational ZGC: Lock order asserts in JVMTI IterateThroughHeap

Changes: https://git.openjdk.org/jdk/pull/14518/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14518&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8310194
  Stats: 203 lines in 5 files changed: 103 ins; 37 del; 63 mod
  Patch: https://git.openjdk.org/jdk/pull/14518.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/14518/head:pull/14518

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


More information about the hotspot-gc-dev mailing list