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

Albert Mingkun Yang ayang at openjdk.java.net
Wed Nov 4 08:18:56 UTC 2020

On Wed, 4 Nov 2020 01:57:40 GMT, Lin Zang <lzang at openjdk.org> wrote:

>> 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.
> Thanks for  your  suggestion. I have thought about it when writing this method, but I was not able to find a value of InvalidIndex. After reconsider it, plus that I will make block_index to be unsigned to avoid signed/unsigned conversion, I think might be the InvalidIndex could be max_size_t (that is (size_t)-1). what do you think?

I think the new version looks very nice; thank you for the change.


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

More information about the hotspot-gc-dev mailing list