RFR: 8314501: Shenandoah: sun/tools/jhsdb/heapconfig/JMapHeapConfigTest.java fails [v2]
Aleksey Shipilev
shade at openjdk.org
Thu Aug 17 15:57:29 UTC 2023
On Thu, 17 Aug 2023 15:41:18 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/HeapSummary.java line 89:
>>
>>> 87: printValMB("CompressedClassSpaceSize = ", getFlagValue("CompressedClassSpaceSize", flagMap));
>>> 88: printValMB("MaxMetaspaceSize = ", getFlagValue("MaxMetaspaceSize", flagMap));
>>> 89: printValMB("G1HeapRegionSize = ", HeapRegion.grainBytes());
>>
>> This call to grainBytes() is suspect because it assumes G1 is being used even though it may not be. That was the case even before your changes because it was being called for SerialGC and ParallelGC. Perhaps the old code is better, but also fix it to only print G1HeapRegionSize for G1. I'd also suggest fixing the test to just remove the check for G1HeapRegionSize. It's not important.
>
> I am happy to just drop the check to `G1HeapRegionSize` in the test.
Please see new commit, does that look better?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15328#discussion_r1297425372
More information about the serviceability-dev
mailing list