RFR: 8364760: G1: Remove obsolete code in G1MergeCardSetClosure

Thomas Schatzl tschatzl at openjdk.org
Fri Aug 8 07:57:12 UTC 2025


On Thu, 7 Aug 2025 20:10:33 GMT, Sangheon Kim <sangheki at openjdk.org> wrote:

>> Hi all,
>> 
>>   please review this removal of some obsolete code.
>> 
>> Before JDK-8343782 G1 iterated remsets for humongous eager reclaim candidates by region, as there has been a 1:1 mapping between regions and (card-based) remembered sets.
>> 
>> With that change, all remembered set iteration should go via the group remsets (`G1CSetCandidateGroup`), and the code does, except for humongous eager reclaim candidates which handle their group remsets on the side (which is a separate issue).
>> 
>> This obsoleted some code in `G1MergeCardSetClosure` - it does not need to be a `G1HeapRegionClosure` any more, and for humongous regions we can directly do the iteration via the group rem set attached to the humongous starts region. I.e. inline that `merge_card_set_for_region()` method.
>> 
>> Testing: gha
>> 
>> Thanks,
>>   Thomas
>
> Marked as reviewed by sangheki (Reviewer).

Thanks @sangheon @albertnetymk for your reviews

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

PR Comment: https://git.openjdk.org/jdk/pull/26645#issuecomment-3166911263


More information about the hotspot-gc-dev mailing list