equal
deleted
inserted
replaced
1141 // Unregister must be done before the state change |
1141 // Unregister must be done before the state change |
1142 { |
1142 { |
1143 MutexLocker ml(SafepointSynchronize::is_at_safepoint() ? NULL : CodeCache_lock, |
1143 MutexLocker ml(SafepointSynchronize::is_at_safepoint() ? NULL : CodeCache_lock, |
1144 Mutex::_no_safepoint_check_flag); |
1144 Mutex::_no_safepoint_check_flag); |
1145 Universe::heap()->unregister_nmethod(this); |
1145 Universe::heap()->unregister_nmethod(this); |
1146 CodeCache::unregister_old_nmethod(this); |
|
1147 } |
1146 } |
1148 |
1147 |
1149 // Clear the method of this dead nmethod |
1148 // Clear the method of this dead nmethod |
1150 set_method(NULL); |
1149 set_method(NULL); |
1151 |
1150 |
1334 // safepoint can sneak in, otherwise the oops used by the |
1333 // safepoint can sneak in, otherwise the oops used by the |
1335 // dependency logic could have become stale. |
1334 // dependency logic could have become stale. |
1336 MutexLocker mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); |
1335 MutexLocker mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); |
1337 if (nmethod_needs_unregister) { |
1336 if (nmethod_needs_unregister) { |
1338 Universe::heap()->unregister_nmethod(this); |
1337 Universe::heap()->unregister_nmethod(this); |
1339 CodeCache::unregister_old_nmethod(this); |
|
1340 } |
1338 } |
1341 flush_dependencies(/*delete_immediately*/true); |
1339 flush_dependencies(/*delete_immediately*/true); |
1342 } |
1340 } |
1343 |
1341 |
1344 #if INCLUDE_JVMCI |
1342 #if INCLUDE_JVMCI |
1413 delete ec; |
1411 delete ec; |
1414 ec = next; |
1412 ec = next; |
1415 } |
1413 } |
1416 |
1414 |
1417 Universe::heap()->flush_nmethod(this); |
1415 Universe::heap()->flush_nmethod(this); |
|
1416 CodeCache::unregister_old_nmethod(this); |
1418 |
1417 |
1419 CodeBlob::flush(); |
1418 CodeBlob::flush(); |
1420 CodeCache::free(this); |
1419 CodeCache::free(this); |
1421 } |
1420 } |
1422 |
1421 |