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

Albert Mingkun Yang ayang at openjdk.java.net
Tue Nov 3 20:10:58 UTC 2020


On Tue, 3 Nov 2020 09:31:12 GMT, Lin Zang <lzang at openjdk.org> wrote:

>> - Parallel heap iteration support for PSS
>> - JBS:  https://bugs.openjdk.java.net/browse/JDK-8252103
>
> Lin Zang has updated the pull request incrementally with one additional commit since the last revision:
> 
>   remove unnecessary newline symbol in assertion

Not a review, just some minor comments in passing.

src/hotspot/share/gc/parallel/parallelScavengeHeap.cpp line 581:

> 579:       old_gen()->block_iterate(cl, (size_t)block_index);
> 580:     }
> 581:   }

The structure seems to suggest that each `if` case could be hit in every iteration, but actually only the third case will be revisited more than once. I wonder if this could be made more explicit.

src/hotspot/share/gc/parallel/parallelScavengeHeap.cpp line 565:

> 563:     }
> 564:     return true;
> 565:   }

I wonder if the interface would be cleaner with returning `block_index` directly, i.e. `ssize_t claim_and_get_block()`.  When the index goes out of range, return an `InvalidIndex`, which could be defined as `-3`, like `EdenIndex` above.

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

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


More information about the hotspot-gc-dev mailing list