RFR: 8252103: Parallel heap inspection for ParallelScavengeHeap [v9]
Thomas Schatzl
tschatzl at openjdk.java.net
Tue Nov 3 16:23:56 UTC 2020
On Mon, 2 Nov 2020 16:00:13 GMT, Lin Zang <lzang at openjdk.org> wrote:
>>> You could use the mentioned `ssize_t` as an automatically widening signed integer type.
>>
>> I would prefer this alternative.
>
> Dear @kstefanj and @tschatzl,
> Thanks in advance for your review, I have updated a new commit that use ssize_t for _claimed_index in HeapBlockClaimer, and made conversion from "size_t" to "ssize_t" when block index of PSOldGen is used to calculate claimed index. Not sure whether this conversion is better. would you like to help review again?
>
> Thanks,
> Lin
I tried to prototype a version that tries to keep the `ParallelScavengeHeap` / `PSOldGen` / `MutableSpace` abstraction, but your suggestion to keep the `block_iterate` method in PSOldGen is probably best.
While doing that I also touched up comments and naming a bit. The result is at https://github.com/tschatzl/jdk/commit/cdfe0dbf8a382995a286c0e1a55065108bf31581.
Curiously Stefan told me when looking at this, it is closer to your initial code for claim indices: it starts indices for old gen with 2.
:)
He mentioned that he would be good with either variant, with me slightly favouring that original one. Either way, generally the current code is serviceable, but maybe the above changes of mine (mostly naming) could be incorporated in this change to not let them go to waste.
-------------
PR: https://git.openjdk.java.net/jdk/pull/25
More information about the hotspot-gc-dev
mailing list