RFR: 8281254: GCs with survivor spaces report Init > Max through MXBeans
Aleksey Shipilev
shade at openjdk.java.net
Mon Feb 7 06:39:10 UTC 2022
On Fri, 4 Feb 2022 10:11:39 GMT, Artem Zinnatullin :slowpoke: <duke at openjdk.java.net> wrote:
>> test/hotspot/jtreg/gc/TestInitMaxMemoryMXBeans.java line 87:
>>
>>> 85: long heapMax = memoryMXBean.getHeapMemoryUsage().getMax();
>>> 86:
>>> 87: if (heapInit != heapMax) {
>>
>> nice
>
> do you want to also check the actual value to verify there is no future regression or will it differ depending on GC engine?
Unfortunately, it would differ by GC. Serial and Parallel would subtract survivor space, so they would report lower values. Matching those values directly would mean duplicating the GC-specific logic in the test.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7341
More information about the hotspot-gc-dev
mailing list