RFR: 8329223: Parallel: Parallel GC resizes heap even if -Xms = -Xmx [v7]
Albert Mingkun Yang
ayang at openjdk.org
Mon Apr 22 14:27:30 UTC 2024
On Mon, 22 Apr 2024 14:15:50 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:
>> It's mostly to be consistent with `initial_old_size = MaxOldSize;` a few lines above; if the cmdline `OldSize` is inconsistent with other flags, change `OldSize` to fit others.
>>
>> Technically, when there's inconsistency in cmdline flags, change any of them is equally correct, IMO. In the long run, maybe it's possible to remove the `OldSize` flag, since one can achieve old-size via `InitialHeapSize` and `NewSize`.
>
> Hmmm, setting `initial_old_size = MaxOldSize` fails `gtest` again:
>
> [----------] 4 tests from CollectorPolicy
> [ RUN ] CollectorPolicy.young_min_ergo_vm
> [ OK ] CollectorPolicy.young_min_ergo_vm (0 ms)
> [ RUN ] CollectorPolicy.young_scaled_initial_ergo_vm
> [ OK ] CollectorPolicy.young_scaled_initial_ergo_vm (0 ms)
> [ RUN ] CollectorPolicy.young_cmd_other_vm
> [ OK ] CollectorPolicy.young_cmd_other_vm (79 ms)
> [ RUN ] CollectorPolicy.old_cmd_other_vm
> [0.050s][warning][gc,ergo] Inconsistency between initial old size and minimum old size
> [0.050s][warning][gc,ergo] Inconsistency between generation sizes and heap size, resizing the generations to fit the heap.
> /Users/zhengyu.gu/ws/jdk/test/hotspot/gtest/gc/shared/test_collectorPolicy.cpp:261: Failure
> Death test: child_CollectorPolicy_old_cmd_()
> Result: died but not with expected exit code:
> Terminated by signal 6
> Actual msg:
> [ DEATH ]
> [ DEATH ] [ FATAL ] /Users/zhengyu.gu/ws/googletest-1.14.0/googletest/include/gtest/internal/gtest-port.h:1710:: pthread_mutex_destroy(&mutex_)failed with error 16
> [ DEATH ]
>
> [ FAILED ] CollectorPolicy.old_cmd_other_vm (78 ms)
> [----------] 4 tests from CollectorPolicy (158 ms total)
Maybe my prev msg was misleading... Reprint the code-snippet:
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;
}
so that the two assignment to `initial_old_size` matches up, accounting for over/under flow.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18539#discussion_r1574851093
More information about the hotspot-gc-dev
mailing list