RFR: 8238687: Investigate memory uncommit during young collections in G1 [v4]

Thomas Schatzl tschatzl at openjdk.org
Mon Jun 23 10:13:36 UTC 2025


On Sun, 22 Jun 2025 22:15:12 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> Ivan Walulya has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Albert suggestions
>
> src/hotspot/share/gc/g1/g1HeapSizingPolicy.cpp line 302:
> 
>> 300:     if (_g1h->capacity() == _g1h->max_capacity()) {
>> 301:       log_resize(short_term_pause_time_ratio, long_term_pause_time_ratio,
>> 302:                  lower_threshold, upper_threshold, pause_time_threshold, true, 0, expand);
> 
> We're on the expand-side of things, but `expand` hasn't been set to true yet.
> Similarly, on the shrink side, we'll be passing in the default initial value for `expand` and
> then setting it later. Maybe `expand` should be set earlier on each of the branches.

It does not matter for this case, ideally the log message would not print the information about whether we expanded or not (because we did not). Maybe you are right, we were trying to expand at least (and just pass `true` here?).

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25832#discussion_r2161205385


More information about the hotspot-dev mailing list