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

Extend class-data sharing to support the module path

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 11
    • Component/s: hotspot
    • Subcomponent:
    • Resolved In Build:
      b10

      Description

      Currently, the --module-path option is being ignored during CDS dumping.

      ./bin/java -Xshare:dump --module-path mlib -Xlog:cds=info
      narrow_klass_base = 0x0000000800000000, narrow_klass_shift = 3
      Allocated temporary class space: 1073741824 bytes at 0x00000008c0000000
      Allocated shared space: 3221225472 bytes at 0x0000000800000000
      [0.048s][info][cds] Info: the --module-path option is ignored when dumping the shared archive

      This enhancement is for supporting the --module-path for CDS and AppCDS.

      High-level requirements:
      ---------------------------------
      At dump time:
      - the --module-path info, such as the location field of each ModuleEntry will be captured in the shared archive header. It could be right after the boot class path and app class path info;
      - initially, we will only support modular jar specified in the --module-path.

      At run time:
      - if a class is loaded from a modular jar from a module path, check need to ensure the path to the jar file is the same as during dump time. The timestamp and size of the jar should not change compared with dump time.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ccheung Calvin Cheung
                Reporter:
                ccheung Calvin Cheung
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: