diff src/share/vm/ci/ciEnv.cpp @ 10152:c115fac239eb

8008962: NPG: Memory regression: One extra Monitor per ConstantPool Summary: Re-use InstanceKlass::_init_lock locking ConstantPool as well. Reviewed-by: dholmes, coleenp, acorn
author iklam
date Thu, 25 Apr 2013 12:55:49 -0700
parents 2dec1d9bfbe1
children 9ce110b1d14a
line wrap: on
line diff
--- a/src/share/vm/ci/ciEnv.cpp	Thu Apr 25 03:58:53 2013 -0700
+++ b/src/share/vm/ci/ciEnv.cpp	Thu Apr 25 12:55:49 2013 -0700
@@ -483,7 +483,8 @@
     {
       // We have to lock the cpool to keep the oop from being resolved
       // while we are accessing it.
-        MonitorLockerEx ml(cpool->lock());
+      oop cplock = cpool->lock();
+      ObjectLocker ol(cplock, THREAD, cplock != NULL);
       constantTag tag = cpool->tag_at(index);
       if (tag.is_klass()) {
         // The klass has been inserted into the constant pool