On Wed, 5 Aug 2026 09:32:22 GMT, Ivan Walulya <[email protected]> wrote:

>> Hi,
>> 
>> Please review this change to rename G1 region count fields to use 
>> num_regions or num_*_regions consistently where the value represents a 
>> number regions. Keep length terminology where the collection explicitly 
>> refers to the length of a list. 
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> Ivan Walulya has updated the pull request with a new target base due to a 
> merge or a rebase. The pull request now contains nine commits:
> 
>  - Merge remote-tracking branch 'upstream/master' into counts_and_lengths
>  - Merge remote-tracking branch 'upstream/master' into counts_and_lengths
>  - Merge remote-tracking branch 'upstream/master' into counts_and_lengths
>  - cleanup after merge
>  - Merge remote-tracking branch 'upstream/master' into counts_and_lengths
>  - Thomas review cont
>  - Thomas review
>  - StefanK review
>  - init

Looks good. Found some nits that you might want to deal with.

src/hotspot/share/gc/g1/g1HeapRegionSet.cpp line 345:

> 343:     guarantee(count < _unrealistically_long_length,
> 344:               "[%s] the calculated length: %u seems very long, is there 
> maybe a cycle? curr: " PTR_FORMAT " prev0: " PTR_FORMAT " " "prev1: " 
> PTR_FORMAT " length: %u",
> 345:               name(), count, p2i(curr), p2i(prev0), p2i(prev1), 
> num_regions());

Should 'length:' be renamed now?

src/hotspot/share/gc/g1/g1HeapRegionSet.hpp line 64:

> 62: // Base class for all the classes that represent heap region sets. It
> 63: // contains the basic attributes that each set needs to maintain
> 64: // (e.g., number of regions) plus any shared functionality (e.g., 
> verification).

There seems to have been some previous line length cutoff that this patch now 
goes beyond?

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

Marked as reviewed by stefank (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/31688#pullrequestreview-4865537480
PR Review Comment: https://git.openjdk.org/jdk/pull/31688#discussion_r3721471689
PR Review Comment: https://git.openjdk.org/jdk/pull/31688#discussion_r3721481519

Reply via email to