RFR: 8273559: Shenandoah: Shenandoah should support multi-threaded heap dump
Aleksey Shipilev
shade at openjdk.java.net
Mon Sep 13 08:58:52 UTC 2021
On Fri, 10 Sep 2021 18:17:50 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:
> At the point when Shenandoah implemented heap dump, there was no ClassLoaderData::_claim_other flag. To avoid CLDG iteration interfering concurrent GC, we chosen single-threaded CLDG iteration with ClassLoaderData::_claim_none and ensured that by asserting calling thread has to be VMThread.
>
> JDK-8237354 broke the assumption, as it uses safepoint worker to execute heap dump, so that the thread executes CLDG iteration is not necessary VMThread.
>
> Now, with new ClassLoaderData::_claim_other, we can enable multi-threaded CLDG iteration during heap dump.
>
> Test:
>
> - [x] hotspot_gc_shenandoah
> - [x] tier1 with Shenandoah GC
Looks fine to me with minor nits.
src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.hpp line 124:
> 122:
> 123: public:
> 124: ShenandoahClassLoaderDataRoots(ShenandoahPhaseTimings::Phase phase, uint n_workers, bool heapdump);
Can we call the new parameter `heap_iteration`? This would match the `ShenandoahHeapIterationRootScanner` name. I could also imagine that iteration is used for something else than a heap dump (maybe JFR/JVMTI heap walk for profiling/debugging?).
test/hotspot/jtreg/gc/shenandoah/TestJcmdHeapDump.java line 156:
> 154: }
> 155: }
> 156: }
Newline is missing.
-------------
Marked as reviewed by shade (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/5473
More information about the hotspot-gc-dev
mailing list