-
Enhancement
-
Resolution: Fixed
-
P3
-
None
-
b10
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8281947 | 11.0.16-oracle | Ioi Lam | P3 | Resolved | Fixed | b01 |
JDK-8283026 | 11.0.16 | Goetz Lindenmaier | P3 | Resolved | Fixed | b01 |
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
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
- backported by
-
JDK-8281947 Do not store original classfiles inside the CDS archive
- Resolved
-
JDK-8283026 Do not store original classfiles inside the CDS archive
- Resolved
- relates to
-
JDK-8221351 Crash in KlassFactory::check_shared_class_file_load_hook
- Resolved
-
JDK-8219255 Optionally store original classfiles inside the CDS archive
- Closed
(1 links to)