RFR: 8264027: Refactor "CLEANUP" region printing

Kim Barrett kbarrett at openjdk.java.net
Tue Mar 30 03:17:46 UTC 2021


On Mon, 29 Mar 2021 12:43:12 GMT, Thomas Schatzl <tschatzl 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.

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

Marked as reviewed by kbarrett (Reviewer).

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



More information about the hotspot-gc-dev mailing list