RFR (M) 8213346 Re-implement shared dictionary
Ioi Lam
ioi.lam at oracle.com
Fri Nov 9 06:04:29 UTC 2018
https://bugs.openjdk.java.net/browse/JDK-8213346
http://cr.openjdk.java.net/~iklam/jdk12/8213346-shared-dict-using-compact-hashtable.v01/
Please review a long overdue cleanup of how the classes are indexed in
the CDS
archive.
[1] Use CompactHashtable which is more space efficient than Dictionary.
[2] Space saving:
+ For each shared class, we used to store a fixed-size record in
SharedDictionaryEntry. That information is now stored in a
variable-length structure (see RunTimeSharedClassInfo).
+ Verifier constraints are now stored using u4 instead of Symbol*.
Total space saving is about 45KB for the default CDS archive.
[4] We had scattered code that checked whether a class should be archived
or not. E.g., checking for code signers, JFR, etc. Now this is
checked inside
a consolidated function SystemDictionaryShared::should_be_excluded()
[5] Now we have 2 separate hashtable to look up shared classes: one for the
built-in classes and the other for unregistered classes. This
simplifies the
lookup logic and is also faster.
[6] A lot of old code was deleted. There's a net change of about -250
lines of C
code.
TESTING:
I am running hs-tiers 1/2/3/4
Thanks
- Ioi
More information about the hotspot-runtime-dev
mailing list