RFR: 8278638: Remove FLAG_IS_CMDLINE(UseSharedSpaces)
Harold Seigel
hseigel at openjdk.java.net
Tue Dec 14 21:53:11 UTC 2021
On Tue, 14 Dec 2021 16:06:28 GMT, Harold Seigel <hseigel at openjdk.org> wrote:
> Please review this small fix for bug JDK-827638. The fix was tested by running Mach5 tiers 1 and 2 on Linux, Mac OS, and Windows, Mach5 tier 4 on Linux x64, and by building on linux-aarch64-zero and linux-x64-zero.
>
> Thanks, Harold
If the user specified -Xshare:on then both UseSharedSpaces and RequireSharedSpaces would get set to TRUE (both before and after this change). This would cause the JNI_ERR to be returned before the check if UseSharedSpaces was specified:
if (DumpSharedSpaces || RequireSharedSpaces) {
jio_fprintf(defaultStream::error_stream(),
"Shared spaces are not supported in this VM\n");
return JNI_ERR;
}
...
if ((UseSharedSpaces && FLAG_IS_CMDLINE(UseSharedSpaces)) ||
log_is_enabled(Info, cds)) {
warning("Shared spaces are not supported in this VM");
FLAG_SET_DEFAULT(UseSharedSpaces, false);
LogConfiguration::configure_stdout(LogLevel::Off, true, LOG_TAGS(cds));
}
no_shared_spaces("CDS Disabled");
So, I think that specifying -Xshare:auto is equivalent to the old -XX:+UseSharedSpace.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6835
More information about the hotspot-runtime-dev
mailing list