RFR: 8262099: jcmd VM.metaspace should report unlimited size if MaxMetaspaceSize isn't specified [v2]
Thomas Stuefe
stuefe at openjdk.java.net
Mon Feb 22 09:22:41 UTC 2021
On Mon, 22 Feb 2021 05:47:58 GMT, Yang Yi <github.com+5010047+kelthuzadx at openjdk.org> wrote:
>> Hi,
>>
>> Can I have a review of this minor fix about `jcmd VM.metaspace`?
>>
>> When MaxMetaspaceSize is not specified, it would set to max_uintx, jcmd VM.metaspace reports metaspace summary information as follows:
>>
>> $ ./jcmd <pid> VM.metaspace | grep MaxMetaspaceSize
>> MaxMetaspaceSize: 17179869184.00 GB
>>
>> Actually, this is a bug, the expected output should be:
>>
>> MaxMetaspaceSize: unlimited
>>
>> The root cause of the problem is that the MaxMetaspaceSize rounding performed during arguments parsing is inconsistent with the round checking in print_settings(metaspaceRerporter.cpp).
>
> Yang Yi has updated the pull request incrementally with one additional commit since the last revision:
>
> remain unchanged SAP copyright year, only update Oracle copyright year
Change looks fine, thanks for fixing. Can you please add a comment like "see Metaspace::ergo_initialize()" ?
I think the only reason we align MaxMetaspaceSize down is to forestall any comparison overflows on metaspace expansion. But I am not sure this is even an issue. I would like a solution where we leave it at max_uint and check the comparisons for overflow instead. But this patch looks fine.
Make sure you run the associated JTreg test.
Cheers, Thomas
-------------
Marked as reviewed by stuefe (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/2671
More information about the hotspot-runtime-dev
mailing list