changeset 53587:5b4242996d8c

8212682: Avoid holding Compile_lock when blocking for GC in ObjArrayKlass::allocate_objArray_klass() Reviewed-by: coleenp, dlong
author eosterlund
date Tue, 20 Nov 2018 10:08:18 +0100
parents 4ed308e0e89b
children 5f47b56cb867
files src/hotspot/share/oops/instanceKlass.cpp src/hotspot/share/oops/objArrayKlass.cpp src/hotspot/share/oops/typeArrayKlass.cpp src/hotspot/share/prims/jvmtiExport.cpp
diffstat 4 files changed, 1 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/oops/instanceKlass.cpp	Tue Nov 20 09:35:15 2018 +0100
+++ b/src/hotspot/share/oops/instanceKlass.cpp	Tue Nov 20 10:08:18 2018 +0100
@@ -1282,7 +1282,6 @@
     JavaThread *jt = (JavaThread *)THREAD;
     {
       // Atomic creation of array_klasses
-      MutexLocker mc(Compile_lock, THREAD);   // for vtables
       MutexLocker ma(MultiArray_lock, THREAD);
 
       // Check if update has already taken place
--- a/src/hotspot/share/oops/objArrayKlass.cpp	Tue Nov 20 09:35:15 2018 +0100
+++ b/src/hotspot/share/oops/objArrayKlass.cpp	Tue Nov 20 10:08:18 2018 +0100
@@ -80,7 +80,6 @@
         Klass* ek = NULL;
         {
           MutexUnlocker mu(MultiArray_lock);
-          MutexUnlocker mc(Compile_lock);   // for vtables
           super_klass = element_super->array_klass(CHECK_0);
           for( int i = element_supers->length()-1; i >= 0; i-- ) {
             Klass* elem_super = element_supers->at(i);
@@ -332,7 +331,6 @@
     ResourceMark rm;
     JavaThread *jt = (JavaThread *)THREAD;
     {
-      MutexLocker mc(Compile_lock, THREAD);   // for vtables
       // Ensure atomic creation of higher dimensions
       MutexLocker mu(MultiArray_lock, THREAD);
 
--- a/src/hotspot/share/oops/typeArrayKlass.cpp	Tue Nov 20 09:35:15 2018 +0100
+++ b/src/hotspot/share/oops/typeArrayKlass.cpp	Tue Nov 20 10:08:18 2018 +0100
@@ -195,7 +195,6 @@
     ResourceMark rm;
     JavaThread *jt = (JavaThread *)THREAD;
     {
-      MutexLocker mc(Compile_lock, THREAD);   // for vtables
       // Atomic create higher dimension and link into list
       MutexLocker mu(MultiArray_lock, THREAD);
 
--- a/src/hotspot/share/prims/jvmtiExport.cpp	Tue Nov 20 09:35:15 2018 +0100
+++ b/src/hotspot/share/prims/jvmtiExport.cpp	Tue Nov 20 10:08:18 2018 +0100
@@ -2944,8 +2944,7 @@
     return false;
   }
 
-  if (Compile_lock->owner() == thread ||
-      MultiArray_lock->owner() == thread) {
+  if (MultiArray_lock->owner() == thread) {
     return false;
   }
   return true;