diff src/share/vm/prims/jvmtiEnv.cpp @ 12946:b8860472c377

8014910: deadlock between JVM/TI ClassPrepare event handler and CompilerThread Summary: Revert changes in JDK-8008962 Reviewed-by: coleenp, sspitsyn
author iklam
date Tue, 22 Oct 2013 14:29:02 -0700
parents c115fac239eb
children 096c224171c4 e4062d6c5f22 997fd9660dd5
line wrap: on
line diff
--- a/src/share/vm/prims/jvmtiEnv.cpp	Mon Oct 21 17:26:46 2013 -0700
+++ b/src/share/vm/prims/jvmtiEnv.cpp	Tue Oct 22 14:29:02 2013 -0700
@@ -259,8 +259,7 @@
       // bytes to the InstanceKlass here because they have not been
       // validated and we're not at a safepoint.
       constantPoolHandle  constants(current_thread, ikh->constants());
-      oop cplock = constants->lock();
-      ObjectLocker ol(cplock, current_thread, cplock != NULL);    // lock constant pool while we query it
+      MonitorLockerEx ml(constants->lock());    // lock constant pool while we query it
 
       JvmtiClassFileReconstituter reconstituter(ikh);
       if (reconstituter.get_error() != JVMTI_ERROR_NONE) {
@@ -2418,8 +2417,7 @@
 
   instanceKlassHandle ikh(thread, k_oop);
   constantPoolHandle  constants(thread, ikh->constants());
-  oop cplock = constants->lock();
-  ObjectLocker ol(cplock, thread, cplock != NULL);    // lock constant pool while we query it
+  MonitorLockerEx ml(constants->lock());    // lock constant pool while we query it
 
   JvmtiConstantPoolReconstituter reconstituter(ikh);
   if (reconstituter.get_error() != JVMTI_ERROR_NONE) {