equal
deleted
inserted
replaced
285 // Competing writers must acquire exclusive access via a lock. |
285 // Competing writers must acquire exclusive access via a lock. |
286 // A losing writer waits on the lock until the winner writes f1 and leaves |
286 // A losing writer waits on the lock until the winner writes f1 and leaves |
287 // the lock, so that when the losing writer returns, he can use the linked |
287 // the lock, so that when the losing writer returns, he can use the linked |
288 // cache entry. |
288 // cache entry. |
289 |
289 |
290 MonitorLockerEx ml(cpool->lock()); |
290 // Use the lock from the metaspace for this, which cannot stop for safepoint. |
|
291 Mutex* metaspace_lock = cpool->pool_holder()->class_loader_data()->metaspace_lock(); |
|
292 MutexLockerEx ml(metaspace_lock, Mutex::_no_safepoint_check_flag); |
291 if (!is_f1_null()) { |
293 if (!is_f1_null()) { |
292 return; |
294 return; |
293 } |
295 } |
294 |
296 |
295 const methodHandle adapter = call_info.resolved_method(); |
297 const methodHandle adapter = call_info.resolved_method(); |