RFR: 8233439 : G1 zero_filled optimization when committing CardCountsTable does not work

Kim Barrett kim.barrett at oracle.com
Sun May 3 17:22:08 UTC 2020

> On May 3, 2020, at 9:38 AM, stefan.johansson at oracle.com wrote:
> Also fixed two spelling errors, here are the new webrevs.
> Full: http://cr.openjdk.java.net/~sjohanss/8233439/02
> Inc: http://cr.openjdk.java.net/~sjohanss/8233439/01-02

Looks good. Just one more suggestion, for which I don't need to
re-review if you want to take it.

 140   virtual void commit_regions(uint start_idx, size_t num_regions, WorkGang* pretouch_gang) {
 141     assert(num_regions > 0, "Must commit at least one region");
 142     assert(_region_commit_map.get_next_one_offset(start_idx, start_idx + num_regions) == start_idx + num_regions,
 143            "Should be no committed regions in the range [%u, " SIZE_FORMAT ")",
 144            start_idx, start_idx + num_regions);

Consider capturing "start_idx + num_regions" in a variable, so it has
a name (you used region_limit in is_page_committed). In addition to
the 3 occurrences in that assert, there are 2 more in normal code below.

Similarly in uncommit_regions.


More information about the hotspot-gc-dev mailing list