mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8026977: NPG: Remove ConstantPool::lock
Write klass and resolved_references constant pool fields lock free. Reviewed-by: jrose, twisti
This commit is contained in:
parent
c1c9f333d5
commit
243d697d71
10 changed files with 127 additions and 180 deletions
|
@ -286,7 +286,9 @@ 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());
|
||||
// Use the lock from the metaspace for this, which cannot stop for safepoint.
|
||||
Mutex* metaspace_lock = cpool->pool_holder()->class_loader_data()->metaspace_lock();
|
||||
MutexLockerEx ml(metaspace_lock, Mutex::_no_safepoint_check_flag);
|
||||
if (!is_f1_null()) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue