RFR: 8267189: Remove duplicated unregistered classes from dynamic archive
Ioi Lam
iklam at openjdk.java.net
Thu Jun 17 06:51:40 UTC 2021
In the CDS archive, "unregistered" classes are those to be loaded by custom loaders.
When doing a CDS dynamic dump (with -XX:ArchiveClassesAtExit=foo.jsa), a class of the same name may be loaded by several custom class loaders. Currently we write all of these unregistered classes into the archive. However, only one copy of them will be usable at runtime.
For size saving, we should avoid writing such duplicated classes into the archive.
(Note that this problem does not affect the CDS static dump, which is driven by a classlist file. We already disallow duplicate unregistered classes in the classlist.)
Testing: mach5 tiers 1-4. Also tested locally with Eclipse IDE.
-------------
Commit messages:
- fixed whitespaces
- avoid using the word "unique" since it is ambiguous
- cleanup
- Merge branch 'master' into 8267189-dup-unreg-classes-dyn-archive
- cleanup
- Merge branch 'master' into 8267189-dup-unreg-classes-dyn-archive
- group by loaders before checking for class duplication
- added comments; try to exclude duplicated classes by classloader
- Merge branch 'master' into 8267189-dup-unreg-classes-dyn-archive
- step1
Changes: https://git.openjdk.java.net/jdk/pull/4515/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4515&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8267189
Stats: 319 lines in 8 files changed: 300 ins; 2 del; 17 mod
Patch: https://git.openjdk.java.net/jdk/pull/4515.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/4515/head:pull/4515
PR: https://git.openjdk.java.net/jdk/pull/4515
More information about the hotspot-runtime-dev
mailing list