RFR: 8364423: G1: Refactor G1UpdateRegionLivenessAndSelectForRebuildTask
Thomas Schatzl
tschatzl at openjdk.org
Thu Jul 31 15:25:57 UTC 2025
On Thu, 31 Jul 2025 14:39:43 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
>> Hi all,
>>
>> please review this refactoring of `G1UpdateRegionLivenessAndSelectForRebuildTask` to remove some code duplication, which makes it simpler to add more common code
>>
>> Testing: gha
>>
>> Thanks,
>> Thomas
>
> src/hotspot/share/gc/g1/g1ConcurrentMark.cpp line 1262:
>
>> 1260: }
>> 1261: _cm->update_top_at_rebuild_start(hr);
>> 1262: }
>
> I feel this logic is too caller-specific -- reading its name `update_live_region` doesn't reveal much what this method should do/deliver.
Since it is the same, and the only per-region work to do for all callers, not sure what is caller-specific here. Maybe change the name to something like `update_for_rebuild` is more appropriate? Or just leave it as is until more common work needs to be done?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26574#discussion_r2245707249
More information about the hotspot-gc-dev
mailing list