RFR: 8260349: Cannot programmatically retrieve Metaspace max set via JAVA_TOOL_OPTIONS [v4]
Aleksey Shipilev
shade at openjdk.java.net
Thu Jan 28 10:53:06 UTC 2021
On Thu, 28 Jan 2021 10:50:24 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> 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)
>> tiers 1-3 (in progress)
>>
>> Thanks,
>> David
>
> David Holmes has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains seven additional commits since the last revision:
>
> - Further formatting updates from Aleksey
> - Merge branch 'master' into 8260349
> - Cleaned up test formatting based on Aleksey's review
> - Added missing test case for flag not set
> - Boost max from 1MB to 9MB as 1MB was too low for Aarch64 to startup
> - Reduced test code using loop for env-vars
> - 8260349: Cannot programmatically retrieve Metaspace max set via JAVA_TOOLS_OPTIONS
Good. Minor nits to fix before push?
test/hotspot/jtreg/runtime/Metaspace/MaxMetaspaceSizeEnvVarTest.java line 75:
> 73:
> 74: int test = 1;
> 75: report("Test " + test +": flag not set");
Missing space here: `+"`
test/hotspot/jtreg/runtime/Metaspace/MaxMetaspaceSizeEnvVarTest.java line 81:
> 79: test++;
> 80:
> 81: report("Test " + test +": normal command-line flag");
Missing space here: `+"`
-------------
Marked as reviewed by shade (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/2275
More information about the hotspot-runtime-dev
mailing list