RFR: 8318507: G1: Improve remset clearing for humongous candidates

Thomas Schatzl tschatzl at openjdk.org
Mon Oct 23 07:28:38 UTC 2023


On Sat, 21 Oct 2023 11:18:43 GMT, Hamlin Li <mli at openjdk.org> wrote:

>> Hi all,
>> 
>>   please review this small cleanup that merges two calls to `HeapRegionRemSet::clear()/HeapRegionRemSet::set_state_complete()` to a single call to `clear()` with appropriate parameters.
>> 
>> Also remove now obsolete asserts that are done in `clear()` already; actually the second one is wrong, there may be code roots attached to the region.
>> 
>> Testing: gha, tier1-5 almost done
>> 
>> Thanks,
>>   Thomas
>
> src/hotspot/share/gc/g1/g1RemSet.cpp line 1200:
> 
>> 1198:       // collecting remembered set entries for humongous regions that were not
>> 1199:       // reclaimed.
>> 1200:       r->rem_set()->set_state_complete();
> 
> In original code, in set_state_complete() it `_state = Complete;`, but in new patch, `_state = Complete;` is not called, is this expected?

Only remembered sets of state `Complete` remembered sets reach here.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16270#discussion_r1368226168


More information about the hotspot-gc-dev mailing list