diff src/share/vm/oops/cpCache.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 3efdfd6ddbf2
children a1ebd310d5c1
line wrap: on
line diff
--- a/src/share/vm/oops/cpCache.cpp	Thu Apr 25 03:58:53 2013 -0700
+++ b/src/share/vm/oops/cpCache.cpp	Thu Apr 25 12:55:49 2013 -0700
@@ -266,7 +266,8 @@
   // the lock, so that when the losing writer returns, he can use the linked
   // cache entry.
 
-  MonitorLockerEx ml(cpool->lock());
+  oop cplock = cpool->lock();
+  ObjectLocker ol(cplock, Thread::current(), cplock != NULL);
   if (!is_f1_null()) {
     return;
   }