-
Enhancement
-
Resolution: Fixed
-
P4
-
18
-
b25
Users should not be using the -XX:+UseSharedSpace, -XX:+RequireSharedSpaces, and -XX:+DumpSharedSpaces options. Instead, they should use the options -Xshare:off, -Xshare:auto, -Xshare:on, and -Xshare:dump, which are documented in https://docs.oracle.com/en/java/javase/17/vm/class-data-sharing.html
The -XX:+DynamicDumpSharedSpaces is useless because it is always overridden by the command line processing in Arguments::finalize_vm_init_args(). The feature related to the DynamicDumpSharedSpaces should be accessed using the -XX:ArchiveClassesAtExit option.
https://github.com/openjdk/jdk/blob/44047f849fad157dac5df788aa5a2c1838e4aaf7/src/hotspot/share/runtime/arguments.cpp#L3134
if (ArchiveClassesAtExit == NULL && !RecordDynamicDumpInfo) {
FLAG_SET_DEFAULT(DynamicDumpSharedSpaces, false);
} else {
FLAG_SET_DEFAULT(DynamicDumpSharedSpaces, true);
}
These flags should be deprecated and eventually removed.
The -XX:+DynamicDumpSharedSpaces is useless because it is always overridden by the command line processing in Arguments::finalize_vm_init_args(). The feature related to the DynamicDumpSharedSpaces should be accessed using the -XX:ArchiveClassesAtExit option.
https://github.com/openjdk/jdk/blob/44047f849fad157dac5df788aa5a2c1838e4aaf7/src/hotspot/share/runtime/arguments.cpp#L3134
if (ArchiveClassesAtExit == NULL && !RecordDynamicDumpInfo) {
FLAG_SET_DEFAULT(DynamicDumpSharedSpaces, false);
} else {
FLAG_SET_DEFAULT(DynamicDumpSharedSpaces, true);
}
These flags should be deprecated and eventually removed.
- csr for
-
JDK-8276891 Deprecate seldomly used CDS command-line flags
-
- Closed
-
- relates to
-
JDK-8277404 Test VMDeprecatedOptions.java failing with Unable to create shared archive file
-
- Resolved
-
-
JDK-8277481 Obsolete seldom used CDS flags
-
- Resolved
-