RFR: 8233439 : G1 zero_filled optimization when committing CardCountsTable does not work
Thomas Schatzl
thomas.schatzl at oracle.com
Wed Apr 29 10:38:13 UTC 2020
Hi,
On 29.04.20 11:32, stefan.johansson at oracle.com wrote:
> Hi,
>
> Please review this fix to clear memory correctly when committing regions.
>
> Webrev: http://cr.openjdk.java.net/~sjohanss/8233439/00/
> Issue: https://bugs.openjdk.java.net/browse/JDK-8233439
>
> Summary
> The old code always set all_zero_filled to false if more than one region
> belonging to the same page was committed. This leads to unnecessary
> clearing of memory in some data structures.
>
> While fixing all_zero_filled I also cleaned up the code a bit more to
> get rid of the refcount array and instead use the commit bitmap to check
> if pages are already committed.
>
> Testing
> Local testing looks good, currently running mach5 1-3. Local tests also
> show a slight improvement in startup.
>
> Thanks,
> Stefan
Some comments:
- I would prefer if the parameter to region_idx_to_page_idx() would be a
uint as any other region index in g1 code.
- is_committed(page) is rather confusing, as talked about I would prefer
is_page_committed() and renaming the _commit_map to _region_commit_map
to make it more clear that there is a difference in what they ask/are for.
- in line 154 and 196 there should be a space after the "for"
- the "private" in line 105 is superfluous (pre-existing)
Thanks,
Thomas
More information about the hotspot-gc-dev
mailing list