RFR: 8264027: Refactor "CLEANUP" region printing

Thomas Schatzl tschatzl at openjdk.java.net
Tue Apr 6 10:07:26 UTC 2021


On Tue, 30 Mar 2021 03:14:41 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> Hi all,
>> 
>>   can I have reviews for this small cleanup that refactors "CLEANUP" region status printing?
>> 
>> - where managing a `FreeRegionList` is not necessary, inline the call to the method (which is guarded by a check that if logging is not enabled, we do not print anything anyway)
>> - for the single remaining case, create a helper method in `G1HRPrinter`
>> 
>> The first item has been done as per the suggestion from @kstefanj [here](https://github.com/openjdk/jdk/pull/3154#pullrequestreview-619061961) ; the alternative would be to keep the free region lists and call `G1HRPrinter::cleanup` on it later, which I actually initially implemented. I could not find a difference performance-wise.
>> 
>> Testing: checked if there is some perf difference on a heap with 50k regions; tier1-3
>
> Looks good.

Thanks @kimbarrett @albertnetymk for your reviews.

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

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



More information about the hotspot-gc-dev mailing list