comparison 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
comparison
equal deleted inserted replaced
10151:15a99ca4ee34 10152:c115fac239eb
264 // Competing writers must acquire exclusive access via a lock. 264 // Competing writers must acquire exclusive access via a lock.
265 // A losing writer waits on the lock until the winner writes f1 and leaves 265 // A losing writer waits on the lock until the winner writes f1 and leaves
266 // the lock, so that when the losing writer returns, he can use the linked 266 // the lock, so that when the losing writer returns, he can use the linked
267 // cache entry. 267 // cache entry.
268 268
269 MonitorLockerEx ml(cpool->lock()); 269 oop cplock = cpool->lock();
270 ObjectLocker ol(cplock, Thread::current(), cplock != NULL);
270 if (!is_f1_null()) { 271 if (!is_f1_null()) {
271 return; 272 return;
272 } 273 }
273 274
274 const methodHandle adapter = call_info.resolved_method(); 275 const methodHandle adapter = call_info.resolved_method();