changeset 58303:0fe71e38ecc4

8240613: InstanceKlass::set_init_state failed with assert(good_state || state == allocated) Reviewed-by: dcubed
author iklam
date Sun, 08 Mar 2020 15:06:27 -0700
parents 2420daa87866
children 13c54fd3bc8c
files src/hotspot/share/classfile/systemDictionary.cpp
diffstat 1 files changed, 0 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/classfile/systemDictionary.cpp	Sun Mar 08 17:33:48 2020 -0400
+++ b/src/hotspot/share/classfile/systemDictionary.cpp	Sun Mar 08 15:06:27 2020 -0700
@@ -1260,25 +1260,6 @@
                                                      bool is_superclass, TRAPS) {
   assert(super_type->is_shared(), "must be");
 
-  // Quick check if the super type has been already loaded.
-  // + Don't do it for unregistered classes -- they can be unloaded so
-  //   super_type->class_loader_data() could be stale.
-  // + Don't take the lock if loader data is NULL.
-  if (!super_type->is_shared_unregistered_class() && super_type->class_loader_data() != NULL) {
-    MutexLocker mu1(THREAD, SystemDictionary_lock);
-    // Read loader_data again inside the lock for thread safety
-    ClassLoaderData* loader_data = super_type->class_loader_data();
-    if (loader_data != NULL) {
-      Symbol* name = super_type->name();
-      Dictionary* dictionary = loader_data->dictionary();
-      unsigned int d_hash = dictionary->compute_hash(name);
-      if (SystemDictionary::find_class(d_hash, name, dictionary) != super_type) {
-        return true;
-      }
-    }
-  }
-
-  // Not sure if super type is loaded. Do it the slow way.
   Klass *found = resolve_super_or_fail(child->name(), super_type->name(),
                                        class_loader, protection_domain, is_superclass, CHECK_0);
   if (found == super_type) {