changeset 13585:64bc704066cd nestmates

8187536: [Nestmates] Assertion failure when the compiler thread appears to trigger classloading Summary: move the assertion deeper into the classloading code
author dholmes
date Thu, 21 Sep 2017 03:02:38 -0400
parents 2dfe246179c0
children 45cc25e93c6a
files src/share/vm/classfile/systemDictionary.cpp
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/classfile/systemDictionary.cpp	Wed Sep 20 23:55:35 2017 -0400
+++ b/src/share/vm/classfile/systemDictionary.cpp	Thu Sep 21 03:02:38 2017 -0400
@@ -238,10 +238,6 @@
 // Forwards to resolve_instance_class_or_null
 
 Klass* SystemDictionary::resolve_or_null(Symbol* class_name, Handle class_loader, Handle protection_domain, TRAPS) {
-  assert(THREAD->can_call_java(),
-         "can not load classes with compiler thread: class=%s, classloader=%s",
-         class_name->as_C_string(),
-         class_loader.is_null() ? "null" : class_loader->klass()->name()->as_C_string());
   if (FieldType::is_array(class_name)) {
     return resolve_array_class_or_null(class_name, class_loader, protection_domain, THREAD);
   } else if (FieldType::is_obj(class_name)) {
@@ -705,6 +701,10 @@
   PlaceholderEntry* placeholder;
   Symbol* superclassname = NULL;
 
+  assert(THREAD->can_call_java(),
+         "can not load classes with compiler thread: class=%s, classloader=%s",
+         name->as_C_string(),
+         class_loader.is_null() ? "null" : class_loader->klass()->name()->as_C_string());
   {
     MutexLocker mu(SystemDictionary_lock, THREAD);
     InstanceKlass* check = find_class(d_index, d_hash, name, dictionary);