RFR: 8252689: Classes are loaded from jrt:/java.base even when CDS is used
Ioi Lam
iklam at openjdk.java.net
Fri Sep 11 20:17:13 UTC 2020
On Fri, 11 Sep 2020 18:31:02 GMT, Yumin Qi <minqi at openjdk.org> wrote:
> Java.util.jar.Manifest related classes not archived since they are neither in classlist or loaded in dump process.
> Manually create a dummy Manifest object will cause those classes loaded in dump and archived.
Marked as reviewed by iklam (Reviewer).
src/hotspot/share/memory/metaspaceShared.cpp line 1359:
> 1357: HeapShared::init_for_dumping(THREAD);
> 1358:
> 1359: // create a dummy manifest to cause more classes loaded
How about: `// exercise the manifest processing code to ensue classes used by CDS are always archived`?
src/hotspot/share/classfile/systemDictionaryShared.cpp line 690:
> 688: if (shared_jar_manifest(shared_path_index) == NULL) {
> 689: SharedClassPathEntry* ent = FileMapInfo::shared_path(shared_path_index);
> 690: size_t size = (size_t)ent->manifest_size();
size_t is unsigned, so I think you should change the following test to `if (size == 0)`
-------------
PR: https://git.openjdk.java.net/jdk/pull/134
More information about the hotspot-runtime-dev
mailing list