RFR: 8252103: Parallel heap inspection for ParallelScavengeHeap [v4]

Lin Zang lzang at openjdk.java.net
Mon Oct 26 03:20:37 UTC 2020


On Mon, 26 Oct 2020 03:09:57 GMT, Lin Zang <lzang at openjdk.org> wrote:

>> src/hotspot/share/gc/parallel/parallelScavengeHeap.hpp line 318:
>> 
>>> 316:   static const uint eden_index = 0;
>>> 317:   static const uint survivor_index = 1;
>>> 318:   static const uint num_inseparable_spaces = 2;
>> 
>> One more comment. These should be CamelCase, and I have an idea to get rid of `num_inseparable_spaces`. 
>> 
>> If we make `_claimed_index` a signed integral type we could define `EdenIndex = -2` and `SurvivorIndex = -1`. If we then initialize `_claimed_index = EdenIndex` the old gen indices will be correct without needing a decrease.
>
> Good idea! I also suggest to rename _n_blocks to _max_iteratable_block_index in HeapBlockClaimer, To avoid incorrectly considering _n_blocks to be "total number of blocks to be iterated".

Or the _n_blocks could be deleted,  I will update the PR soon.

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

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



More information about the hotspot-gc-dev mailing list