src/share/vm/code/compiledIC.cpp

Print this page

        

*** 97,113 **** } tty->cr(); } { ! MutexLockerEx pl(Patching_lock, Mutex::_no_safepoint_check_flag); #ifdef ASSERT CodeBlob* cb = CodeCache::find_blob_unsafe(_ic_call); assert(cb != NULL && cb->is_nmethod(), "must be nmethod"); #endif _ic_call->set_destination_mt_safe(entry_point); ! } if (is_optimized() || is_icstub) { // Optimized call sites don't have a cache value and ICStub call // sites only change the entry point. Changing the value in that // case could lead to MT safety issues. --- 97,113 ---- } tty->cr(); } { ! MutexLockerEx pl(SafepointSynchronize::is_at_safepoint() ? NULL : Patching_lock, Mutex::_no_safepoint_check_flag); #ifdef ASSERT CodeBlob* cb = CodeCache::find_blob_unsafe(_ic_call); assert(cb != NULL && cb->is_nmethod(), "must be nmethod"); #endif _ic_call->set_destination_mt_safe(entry_point); ! } if (is_optimized() || is_icstub) { // Optimized call sites don't have a cache value and ICStub call // sites only change the entry point. Changing the value in that // case could lead to MT safety issues.
*** 527,537 **** // ---------------------------------------------------------------------------- void CompiledStaticCall::set_to_clean() { assert (CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), "mt unsafe call"); // Reset call site ! MutexLockerEx pl(Patching_lock, Mutex::_no_safepoint_check_flag); #ifdef ASSERT CodeBlob* cb = CodeCache::find_blob_unsafe(this); assert(cb != NULL && cb->is_nmethod(), "must be nmethod"); #endif set_destination_mt_safe(SharedRuntime::get_resolve_static_call_stub()); --- 527,537 ---- // ---------------------------------------------------------------------------- void CompiledStaticCall::set_to_clean() { assert (CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), "mt unsafe call"); // Reset call site ! MutexLockerEx pl(SafepointSynchronize::is_at_safepoint() ? NULL : Patching_lock, Mutex::_no_safepoint_check_flag); #ifdef ASSERT CodeBlob* cb = CodeCache::find_blob_unsafe(this); assert(cb != NULL && cb->is_nmethod(), "must be nmethod"); #endif set_destination_mt_safe(SharedRuntime::get_resolve_static_call_stub());