RFR: 8370807: G1: Improve region attribute table method naming

Thomas Schatzl tschatzl at openjdk.org
Wed Oct 29 12:41:54 UTC 2025


On Wed, 29 Oct 2025 12:37:28 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

>>> So the given region is already(*) in the collection set
>> 
>> If that's indeed precondition, the new name makes sense.
>> 
>> There is `assert(!hr->in_collection_set(),` in the caller, which is conflicting with this semantic.
>> 
>>> If you really want I can do that in this change too.
>> 
>> I'd prefer doing that (new name + new precondition) in another PR, as the current title imply naming changes only, but up to you.
>
>> There is assert(!hr->in_collection_set(), in the caller, which is conflicting with this semantic.
> 
> The reason is that that assert only checks the accelerator table, which must not indicate that we already added it. There is no long form of that in-collections-set check any more, we removed it quite some time ago because we thought it was superfluous.

So reordering the calls does not change the situation, i.e. there is no long-form check for the condition (i.e. the region is in the collection set already and we are just updating the attribute table).

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28038#discussion_r2472861304


More information about the hotspot-gc-dev mailing list