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

Do not store original classfiles inside the CDS archive

    Details

    • Subcomponent:
    • Resolved In Build:
      b10

      Description

      For JVMTI ClassFileLoadHook support, the CDS archive currently stores the original classfile data of all archived classes in the "od" space

      mc space: 8560 [ 0.0% of total] out of 12288 bytes [ 69.7% used] at 0x0000000800000000
      rw space: 4009728 [ 21.5% of total] out of 4009984 bytes [100.0% used] at 0x0000000800003000
      ro space: 7351016 [ 39.3% of total] out of 7352320 bytes [100.0% used] at 0x00000008003d6000
      md space: 2320 [ 0.0% of total] out of 4096 bytes [ 56.6% used] at 0x0000000800ad9000
      od space: 6556328 [ 35.1% of total] out of 6557696 bytes [100.0% used] at 0x0000000800ada000
      ca0 space: 458752 [ 2.5% of total] out of 458752 bytes [100.0% used] at 0x00000007bfc00000
      oa0 space: 294912 [ 1.6% of total] out of 294912 bytes [100.0% used] at 0x00000007bf800000
      total : 18681616 [100.0% of total] out of 18690048 bytes [100.0% used]

      However, this consists of over 30% of the archive size, and it's rarely used, leading to wasted disk space.

      Because all original classfile data are already available in files (such as the JDK lib/modules file, or JAR files in the classpath), we can simply read from these locations when needed by JVMTI.

      See http://hg.openjdk.java.net/jdk/jdk/file/6c96d42ec3e7/src/hotspot/share/classfile/klassFactory.cpp#l59

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                iklam Ioi Lam
                Reporter:
                iklam Ioi Lam
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: