--- a/hotspot/src/share/vm/prims/jvmtiEnv.cpp Thu Apr 25 03:58:53 2013 -0700
+++ b/hotspot/src/share/vm/prims/jvmtiEnv.cpp Thu Apr 25 12:55:49 2013 -0700
@@ -259,7 +259,8 @@
// bytes to the InstanceKlass here because they have not been
// validated and we're not at a safepoint.
constantPoolHandle constants(current_thread, ikh->constants());
- MonitorLockerEx ml(constants->lock()); // lock constant pool while we query it
+ oop cplock = constants->lock();
+ ObjectLocker ol(cplock, current_thread, cplock != NULL); // lock constant pool while we query it
JvmtiClassFileReconstituter reconstituter(ikh);
if (reconstituter.get_error() != JVMTI_ERROR_NONE) {
@@ -2417,7 +2418,8 @@
instanceKlassHandle ikh(thread, k_oop);
constantPoolHandle constants(thread, ikh->constants());
- MonitorLockerEx ml(constants->lock()); // lock constant pool while we query it
+ oop cplock = constants->lock();
+ ObjectLocker ol(cplock, thread, cplock != NULL); // lock constant pool while we query it
JvmtiConstantPoolReconstituter reconstituter(ikh);
if (reconstituter.get_error() != JVMTI_ERROR_NONE) {