Small optimization in shared class loading:
http://hg.openjdk.java.net/jdk/jdk/file/7ef41e83066b/src/hotspot/share/classfile/systemDictionary.cpp#l1281
In SystemDictionary::load_shared_class() we call resolve_super_or_fail to check if the super types of a shared class has been redefined at run time. However, this requires looking up the super types by name.
if (ik->super() != NULL) {
Symbol* cn = ik->super()->name();
Klass *s = resolve_super_or_fail(class_name, ....)
We can avoid the look up altogether if the super type has already been loaded. Something like this:
if (ik->super() != NULL) {
if (ik->super() is shared class for boot/platform/app loaders) {
if (ik->super()->class_loader_data() != NULL) {
// We known for sure that the super class has been loaded from
// CDS, so it's not redefined.
} else {
resolve_super_or_fail(....)
}
http://hg.openjdk.java.net/jdk/jdk/file/7ef41e83066b/src/hotspot/share/classfile/systemDictionary.cpp#l1281
In SystemDictionary::load_shared_class() we call resolve_super_or_fail to check if the super types of a shared class has been redefined at run time. However, this requires looking up the super types by name.
if (ik->super() != NULL) {
Symbol* cn = ik->super()->name();
Klass *s = resolve_super_or_fail(class_name, ....)
We can avoid the look up altogether if the super type has already been loaded. Something like this:
if (ik->super() != NULL) {
if (ik->super() is shared class for boot/platform/app loaders) {
if (ik->super()->class_loader_data() != NULL) {
// We known for sure that the super class has been loaded from
// CDS, so it's not redefined.
} else {
resolve_super_or_fail(....)
}
- relates to
-
JDK-8240613 InstanceKlass::set_init_state failed with "assert(good_state || state == allocated): illegal state transition"
-
- Resolved
-
-
JDK-8242300 SystemDictionary::resolve_super_or_fail() should look for the super class first
-
- Resolved
-