RFR: 8252103: Parallel heap inspection for ParallelScavengeHeap

Stefan Johansson sjohanss at openjdk.java.net
Fri Oct 9 11:13:20 UTC 2020


On Fri, 11 Sep 2020 07:25:37 GMT, Lin Zang <lzang at openjdk.org> wrote:

>> - Parallel heap iteration support for PSS
>> - JBS:  https://bugs.openjdk.java.net/browse/JDK-8252103
>
> Dear All,
>   May I ask your help to review this PR? Thanks!
> -Lin

Hi Lin,

Sorry for not getting to this sooner. One of the reasons is that I haven't had time to explore a better solution, but
the above notification triggered me to at least share my thoughts.

I would like us to avoid having the logic that check how many workers are doing the work and instead have some
mechanism that claim different chunks of work. You can compare it a bit to G1 where we have the `HeapRegionClaimer`
that make sure only one thread handles a given region. This claimer needs to be a bit different and allow claiming of
eden, to-space, from-space and then multiple chunks of old. But I believe such solution would both be more efficient
(since all threads can help out on old in the end) and easier to follow (no special cases).

So basically the `PSScavengeParallelObjectIterator` need to set up this claimer and pass it down to the workers and all
workers than try to do all work, but only the one getting the claim will do the actual work. What do you think about
this approach? Do you understand what I'm after?

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

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


More information about the serviceability-dev mailing list