RFR: 8329223: Parallel: Parallel GC resizes heap even has -Xms = -Xmx [v5]
Albert Mingkun Yang
ayang at openjdk.org
Fri Apr 19 16:58:57 UTC 2024
On Fri, 19 Apr 2024 14:43:05 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:
>> src/hotspot/share/gc/shared/genArguments.cpp line 312:
>>
>>> 310:
>>> 311: // Make sure MinOldSize <= OldSize
>>> 312: MinOldSize = MIN2(MinOldSize, initial_old_size);
>>
>> Do you have a test case that requires this? I'd expect `MIN3` above to be enough.
>
> Without this, gtest fails on MacOSX (https://github.com/zhengyu123/jdk/actions/runs/8743941793/job/23997262102)
I see; why is `MinOldSize` being adjusted here, instead of `initial_old_size`? In the `else` branch of `if (!FLAG_IS_CMDLINE(OldSize)) {`, we emit warning for user-set inconsistent `OldSize`, when it's above the max. For symmetry, I'd expect sth like this for the `else` part:
if (initial_old_size > MaxOldSize) {
log_warning(gc, ergo)(...);
initial_old_size = MaxOldSize;
} else if (initial_old_size < MinOldSize) {
log_waring(gc, ergo)(...);
initial_old_size = MinOldSize;
}
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18539#discussion_r1572661928
More information about the hotspot-gc-dev
mailing list