mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-22 03:54:33 +02:00
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:
parent
333cf9a756
commit
4e19360f89
7 changed files with 61 additions and 51 deletions
|
@ -483,7 +483,8 @@ ciKlass* ciEnv::get_klass_by_index_impl(constantPoolHandle cpool,
|
|||
{
|
||||
// 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue