RFR: 8252103: Parallel heap inspection for ParallelScavengeHeap [v9]
Thomas Schatzl
tschatzl at openjdk.java.net
Wed Nov 4 09:58:58 UTC 2020
On Wed, 4 Nov 2020 01:44:10 GMT, Lin Zang <lzang at openjdk.org> wrote:
>> Changes requested by tschatzl (Reviewer).
>
> Dear @tschatzl ,
> Thanks for your proposed fix, I also prefer it because it could avoid the conversion between signed and unsigned. I will make a new commit to incorporate it.
>
> Thanks!
> Lin
I recommend changing the `(size_t)-1` assignment to `SIZE_MAX`.
While there is (to my knowledge) no compiler (that supports the JVM) that does not use two's complement for integer representation, officially only with C++20 (or later) the result of this operation is exactly defined. We know that other code just does the cast as this does ;), but if you use `SIZE_MAX`, the comment above the definition of `InvalidIndex` can also be removed then.
I would also move `InvalidIndex` as the first in the list of constants because it's not really related to numbers assigned because of the spaces (while `NumNonOldGenClaims` is).
Lgtm otherwise. Thanks for bearing with us.
-------------
PR: https://git.openjdk.java.net/jdk/pull/25
More information about the hotspot-gc-dev
mailing list