The current implementation of SharedDictionary is quite awkward. There's a lot of ad-hoc calculation for various sizes such as number of bytes used in the buckets. See:
http://hg.openjdk.java.net/jdk/jdk/file/ca309ee4fd92/src/hotspot/share/memory/metaspaceShared.cpp#l1327
We should change it to be based on CompactHashtable to take advantage of existing code that already deal with various hashtables in the CDS archive. That will also use less space.
While on this, we should also implement the following FIXME for a little space saving.
http://hg.openjdk.java.net/jdk/jdk/file/ca309ee4fd92/src/hotspot/share/classfile/systemDictionaryShared.cpp#l886
int SharedDictionaryEntry::finalize_verification_constraints() {
....
// FIXME: change this to be done after relocation, so we can use symbol offset??
http://hg.openjdk.java.net/jdk/jdk/file/ca309ee4fd92/src/hotspot/share/memory/metaspaceShared.cpp#l1327
We should change it to be based on CompactHashtable to take advantage of existing code that already deal with various hashtables in the CDS archive. That will also use less space.
While on this, we should also implement the following FIXME for a little space saving.
http://hg.openjdk.java.net/jdk/jdk/file/ca309ee4fd92/src/hotspot/share/classfile/systemDictionaryShared.cpp#l886
int SharedDictionaryEntry::finalize_verification_constraints() {
....
// FIXME: change this to be done after relocation, so we can use symbol offset??
- blocks
-
JDK-8207812 Implement Dynamic CDS Archive
-
- Resolved
-
- relates to
-
JDK-8213250 CDS archive creation aborts due to metaspace object allocation failure
-
- Resolved
-
-
JDK-8213948 Solaris-X64 build fails with compact hashtable
-
- Resolved
-
-
JDK-8207812 Implement Dynamic CDS Archive
-
- Resolved
-