RFR: 8343782: G1: Use one G1CardSet instance for multiple old gen regions [v3]
Albert Mingkun Yang
ayang at openjdk.org
Mon Dec 9 09:07:41 UTC 2024
On Tue, 3 Dec 2024 19:56:54 GMT, Ivan Walulya <iwalulya at openjdk.org> wrote:
>> src/hotspot/share/gc/g1/g1CardSet.cpp line 788:
>>
>>> 786: G1HeapRegion* r = G1CollectedHeap::heap()->region_at(region_idx);
>>> 787: assert(r->rem_set()->card_set() != this, "must be");
>>> 788: #endif
>>
>> Since this introduces local vars, can they be grouped in a `{}` scope?
>
> It's possible, but I have not seen this done in the hotspot code.
With a quick search, I can find some in runtime code, though not universal. Regardless, it's better encapsulation, IMO.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22015#discussion_r1875612042
More information about the hotspot-gc-dev
mailing list