diff -r 71564a544d4c -r d6dc479bcdd3 src/hotspot/share/code/compiledMethod.cpp --- a/src/hotspot/share/code/compiledMethod.cpp Fri Nov 02 07:58:22 2018 +0100 +++ b/src/hotspot/share/code/compiledMethod.cpp Thu Nov 01 14:57:26 2018 +0100 @@ -324,7 +324,7 @@ // Clear ICStubs of all compiled ICs void CompiledMethod::clear_ic_stubs() { - assert_locked_or_safepoint(CompiledIC_lock); + assert(CompiledICLocker::is_safe(this), "mt unsafe call"); ResourceMark rm; RelocIterator iter(this); while(iter.next()) { @@ -546,7 +546,7 @@ // Called to clean up after class unloading for live nmethods and from the sweeper // for all methods. bool CompiledMethod::cleanup_inline_caches_impl(bool parallel, bool unloading_occurred, bool clean_all) { - assert_locked_or_safepoint(CompiledIC_lock); + assert(CompiledICLocker::is_safe(this), "mt unsafe call"); bool postponed = false; ResourceMark rm;