RFR: 8366688: G1: Rename G1HeapRegionRemSet::is_added_to_cset_group() to has_cset_group()

Albert Mingkun Yang ayang at openjdk.org
Tue Sep 2 13:08:48 UTC 2025


On Tue, 2 Sep 2025 12:41:40 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

> Hi all,
> 
>   please review this trivial renaming of `G1HHRS::is_added_to_cset_group` - it's just misnamed, we never add G1HRRS to the cset groups.
> 
> Testing: gha, local compilation
> 
> Thanks,
>   Thomas

I can sort of understand why it's named "added_to", because conceptually, the api answers whether the per-region remset belongs to a cset group, instead of a unique one.

The name "has_cset_group" is odd, IMO, since it implies ownership, which is wrong. The new name makes more sense on a heap-region -- a region possesses a cset group, shared with other regions potentially.

YMMV.

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

Marked as reviewed by ayang (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/27048#pullrequestreview-3176481263


More information about the hotspot-gc-dev mailing list