The current implementation of SystemDictionary::is_shared_class_visible and SystemDictionaryShared::is_shared_class_visible_for_classloader are very hard to follow:
http://hg.openjdk.java.net/jdk/jdk/file/6bcfcb7fe83b/src/hotspot/share/classfile/systemDictionary.cpp#l1175
http://hg.openjdk.java.net/jdk/jdk/file/6bcfcb7fe83b/src/hotspot/share/classfile/systemDictionaryShared.cpp#l661
Maybe we can simplify the logic to:
SystemDictionary::is_shared_class_visible(Symbol* class_name,
InstanceKlass* ik,
Handle class_loader, TRAPS)
find {runtime_module, runtime_location, runtime_loader} that can define ik now;
find {dumptime_module, dumptime_location, dumptime_loader} that defined ik during CDS dump time;
if ({runtime_module, runtime_location, runtime_loader} ==
{dumptime_module, dumptime_location, dumptime_loader}) {
return true;
} else {
return false;
}
http://hg.openjdk.java.net/jdk/jdk/file/6bcfcb7fe83b/src/hotspot/share/classfile/systemDictionary.cpp#l1175
http://hg.openjdk.java.net/jdk/jdk/file/6bcfcb7fe83b/src/hotspot/share/classfile/systemDictionaryShared.cpp#l661
Maybe we can simplify the logic to:
SystemDictionary::is_shared_class_visible(Symbol* class_name,
InstanceKlass* ik,
Handle class_loader, TRAPS)
find {runtime_module, runtime_location, runtime_loader} that can define ik now;
find {dumptime_module, dumptime_location, dumptime_loader} that defined ik during CDS dump time;
if ({runtime_module, runtime_location, runtime_loader} ==
{dumptime_module, dumptime_location, dumptime_loader}) {
return true;
} else {
return false;
}
- relates to
-
JDK-8248235 appcds/jigsaw/PatchModule/Simple.java failed when running in dynamic CDS mode
-
- Resolved
-