On Wed, 21 Oct 2020 20:56:01 GMT, Stefan Johansson <sjoha...@openjdk.org> wrote:
>> Lin Zang has refreshed the contents of this pull request, and previous >> commits have been removed. The incremental views will show differences >> compared to the previous content of the PR. > > 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". ------------- PR: https://git.openjdk.java.net/jdk/pull/25