RFR: 8343782: G1: Use one G1CardSet instance for multiple old gen regions [v10]

Ivan Walulya iwalulya at openjdk.org
Mon Dec 23 11:12:40 UTC 2024


On Sat, 21 Dec 2024 00:45:18 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> Ivan Walulya has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 29 additional commits since the last revision:
>> 
>>  - Merge remote-tracking branch 'upstream/master' into OldGenRemsetGroupsV1
>>  - Albert review
>>  - Merge remote-tracking branch 'upstream/master' into OldGenRemsetGroupsV1
>>  - Merge remote-tracking branch 'upstream/master' into OldGenRemsetGroupsV1
>>  - fix type
>>  - fix space issues
>>  - cleanup
>>  - assert
>>  - Thomas Review
>>  - Merge remote-tracking branch 'upstream/master' into OldGenRemsetGroupsV1
>>  - ... and 19 more: https://git.openjdk.org/jdk/compare/ed1a6147...6a8039df
>
> src/hotspot/share/gc/g1/g1ConcurrentMark.cpp line 3068:
> 
>> 3066:     if (r->rem_set()->cset_group()->length() == 1) {
>> 3067:       gc_eff = r->rem_set()->cset_group()->gc_efficiency();
>> 3068:     }
> 
> Why is `gc_eff` set only for length == 1?

if the group has more than one region, then the gc_eff is associated with the entire group and not just the single region. However, if we have just one region in the group, then we can go ahead and print the `gc_eff` details.

> src/hotspot/share/gc/g1/g1ConcurrentMark.cpp line 3172:
> 
>> 3170:                           size_t(0), young_only_cset_group->card_set()->mem_size());
>> 3171: 
>> 3172:   for (G1CSetCandidateGroup* group : g1h->policy()->candidates()->from_marking_groups()) {
> 
> This would skip retained groups, right?  Is that intentional?

Yes, retained regions are in "single region" groups, so all details should be added to the log when we call `do_heap_region`

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22015#discussion_r1895624069
PR Review Comment: https://git.openjdk.org/jdk/pull/22015#discussion_r1895621405


More information about the hotspot-gc-dev mailing list