RFR: 8252105: Parallel heap inspection for ZCollectedHeap

Albert Mingkun Yang ayang at openjdk.java.net
Mon Oct 5 18:23:43 UTC 2020


On Mon, 5 Oct 2020 15:40:52 GMT, Per Liden <pliden at openjdk.org> wrote:

> This patch changes the ZHeapIterator to also support parallel iteration, for use in
> ZCollectedHeap::parallel_object_iterator(). I initially looked at using the heap walking logic in ZMark, instead of
> also implementing it in ZHeapIterator. That's probably something we want to do at some point, but that would require
> some major restructuring of ZMark. In the mean time I've kept the heap walking logic in ZHeapIterator.  The
> ZHeapIterator now implements ParallelObjectIterator, and the same code paths is used for both serial and parallel
> iteration. Arrays are chunked using ObjArrayTask to reduce mark stack space. A terminator is used for better work
> stealing/balance.  Tested using `jmap -histo` and various benchmarks with `-XX:+ZVerifyObjects` and
> `-XX:+VerifyDuringGC` enabled.

src/hotspot/share/gc/z/zHeapIterator.cpp line 55:

> 53:   ZHeapIteratorArrayQueue* const _array_queue;
> 54:   const uint                     _worker_id;
> 55:   ZStatTimerDisable              _timer_disable;

Why `ZStatTimerDisable`? Which timer(s) is it suppressing? I see that there's another one in `ZHeapIterator` as well.

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

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



More information about the hotspot-gc-dev mailing list