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

Extend class-data sharing to support the module path

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • 11
    • None
    • hotspot
    • b10

      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.

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

              Created:
              Updated:
              Resolved: