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

Rework the support for the 'ignored' module options in CDS

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 10, 11
    • Fix Version/s: 11
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b10

      Description

      void Arguments::check_unsupported_dumping_properties() {
        assert(DumpSharedSpaces, "this function is only used with -Xshare:dump");
        const char* unsupported_properties[] = { "jdk.module.main",
                                                 "jdk.module.limitmods",
                                                 "jdk.module.path",
                                                 "jdk.module.upgrade.path",
                                                 "jdk.module.patch.0" };
        const char* unsupported_options[] = { "-m", // cannot use at dump time
                                              "--limit-modules", // ignored at dump time
                                              "--module-path", // ignored at dump time
                                              "--upgrade-module-path", // ignored at dump time
                                              "--patch-module" // ignored at dump time
                                            };
      ...

      Arguments::check_unsupported_dumping_properties() prints 'option is ignored when dumping the shared archive' for --limit-modules, --module-path, --upgrade-module-path, --patch-module if they are specified at CDS dump time.

      Starting from JDK 10, PlatformClassLoader and AppClassLoader are used to load the platform and app classes at dump time. The java library code that initializes the module system does take account of those module options if specified in the command line. The loading paths are affected by those options. So they are not truly 'ignored'.

      Following is the proposed supporting matrix for those module options in JDK 11:

                                                 -Xshare:dump -Xshare:{on, auto}
      --module-path <mp> Allow Allow
      --module Allow Allow
      --add-modules Allow Allow
      --upgrade-module-path Disallow - exit if specified Allow - disable CDS
      --patch-module Disallow - exit if specified Allow - disable CDS
      --limit-modules Disallow - exit if specified Allow - disable CDS

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ccheung Calvin Cheung
                Reporter:
                jiangli Jiangli Zhou
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: