8260349: Cannot programmatically retrieve Metaspace max set via JAVA_TOOL_OPTIONS #2275
A simple but long standing bug whereby the MemoryPool MXBean only sees the value of MaxMetaspaceSize if it was set directly on the command-line and not by other means (e.g. env var).
Fix is to check !FLAG_IS_DEFAULT rather than FLAG_IS_CMDLINE.
Expanded regression test added (based on the reproducer in the JBS issue) that checks all the ways to set the flag: cmd-line, env-var, hotspotrc file
Testing: regression test (before and after fix)
The text was updated successfully, but these errors were encountered:
@dholmes-ora This change now passes all automated pre-integration checks.
After integration, the commit message for the final commit will be:
At the time when this comment was updated there had been no new commits pushed to the
Thanks for taking a look at this.
On 28/01/2021 9:33 pm, Thomas Stuefe wrote:
I'll leave it as is.
Actually the 9MB was selected because I found that on earlier versions