Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8276795

Deprecate seldom used CDS flags

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 18
    • 18
    • hotspot
    • 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.

            hseigel Harold Seigel (Inactive)
            iklam Ioi Lam
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: