RFR: 8267189: Remove duplicated unregistered classes from dynamic archive [v2]

Calvin Cheung ccheung at openjdk.java.net
Thu Jun 17 21:12:29 UTC 2021


On Thu, 17 Jun 2021 20:55:54 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> 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.
>
> Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
> 
>   comments from @calvinccheung and @yminqi

Marked as reviewed by ccheung (Reviewer).

-------------

PR: https://git.openjdk.java.net/jdk/pull/4515


More information about the hotspot-runtime-dev mailing list