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

stefan.johansson at oracle.com stefan.johansson at oracle.com
Sun May 3 21:00:42 UTC 2020



On 2020-05-03 19:22, Kim Barrett wrote:
>> 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.
> 
> ------------------------------------------------------------------------------
> src/hotspot/share/gc/g1/g1RegionToSpaceMapper.cpp
>   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.
> 
> ------------------------------------------------------------------------------
> 

Though about it, but I like when asserts are the first lines. But I do 
agree that it improves readability so I will do the change before pushing.

Thanks,
Stefan


More information about the hotspot-gc-dev mailing list