RFR: 8280454: G1: ClassLoaderData verification keeps CLDs live that causes problems with VerifyDuringGC during Remark

Thomas Schatzl tschatzl at openjdk.java.net
Tue May 31 07:50:02 UTC 2022


Hi all,

  can I have reviews for this change that makes a few CLDG iterations no-keepalive during GC pauses?

This fixes a bug where the `VerifyDuringGC` verification otherwise kept alive all classes, effectively disabling class unloading during (g1) concurrent mark.

Afaict this verification code is only every called during GC pauses, so the change should be fine.

As for the change itself, I tried to avoid cluttering the code with `ClassLoaderDataGraphIterator<>` by using typedefs - unfortunately only C++ 17 allows omitting the `<>` if all template parameters are defaulted.

There is also a new test case for just this.

Testing: tier1-5

Thanks,
  Thomas

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

Commit messages:
 - 8280454: G1: ClassLoaderData verification keeps CLDs live that causes problems with VerifyDuringGC during Remark

Changes: https://git.openjdk.java.net/jdk/pull/8949/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8949&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8280454
  Stats: 124 lines in 4 files changed: 111 ins; 4 del; 9 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8949.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8949/head:pull/8949

PR: https://git.openjdk.java.net/jdk/pull/8949


More information about the hotspot-runtime-dev mailing list