This commit is contained in:
Jon Masamitsu 2014-06-25 20:41:16 -07:00
commit 0e622bfc55
56 changed files with 992 additions and 469 deletions

View file

@ -287,7 +287,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;
}