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

Lin Zang lzang at openjdk.java.net
Wed Nov 4 02:00:02 UTC 2020


On Tue, 3 Nov 2020 20:07:04 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> Lin Zang has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   remove unnecessary newline symbol in assertion
>
> 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?

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

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



More information about the hotspot-gc-dev mailing list