8008962: NPG: Memory regression: One extra Monitor per ConstantPool

Re-use InstanceKlass::_init_lock locking ConstantPool as well.

Reviewed-by: dholmes, coleenp, acorn
This commit is contained in:
Ioi Lam 2013-04-25 12:55:49 -07:00
parent 333cf9a756
commit 4e19360f89
7 changed files with 61 additions and 51 deletions

View file

@ -266,7 +266,8 @@ void ConstantPoolCacheEntry::set_method_handle_common(constantPoolHandle cpool,
// 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;
}