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

Deprecate seldom used CDS flags

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 18
    • Fix Version/s: 18
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b25

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              hseigel Harold Seigel
              Reporter:
              iklam Ioi Lam
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: