RFR: 8364925: G1: Improve program flow around incremental collection set building

Thomas Schatzl tschatzl at openjdk.org
Thu Aug 7 14:53:28 UTC 2025


On Thu, 7 Aug 2025 13:09:36 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> Hi all,
>> 
>>   please review this change that improves the G1CollectionSet incremental state handling slightly:
>> 
>> * remove `_selected_groups_cur_length` with getter as we do not need a copy of that value around
>> * move implementations of some methods from header files into cpp file
>> * moved some incremental state updates from `finalize_old_part` to the respective `start/continue/stop_incremental_building` method
>> 
>> Testing: gha
>> 
>> Thanks,
>>   Thomas
>
> src/hotspot/share/gc/g1/g1CollectionSet.hpp line 152:
> 
>> 150:   G1CSetCandidateGroupList _collection_set_groups;
>> 151: 
>> 152:   uint selected_groups_cur_length() const;
> 
> Maybe move this down to methods section so that all fields are next to each other.

I wanted to have this there to correspond to the place for the similar member for the regions.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26659#discussion_r2260569306


More information about the hotspot-gc-dev mailing list