RFR: 8329223: Parallel: Parallel GC resizes heap even if -Xms = -Xmx [v7]
Zhengyu Gu
zgu at openjdk.org
Mon Apr 22 14:18:29 UTC 2024
On Mon, 22 Apr 2024 13:19:16 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
>>> Should this be `initial_old_size = MinOldSize;`?
>>
>> Any reason why?
>>
>> The reason I picked current form because the original line was `MinOldSize = MIN2(initial_old_size, MinHeapSize - MinNewSize);`
>>
>> Thanks
>
> 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)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18539#discussion_r1574838478
More information about the hotspot-gc-dev
mailing list