src/hotspot/share/code/codeBehaviours.cpp
changeset 52857 7e268f863ff0
parent 52384 d6dc479bcdd3
--- a/src/hotspot/share/code/codeBehaviours.cpp	Wed Dec 05 17:33:01 2018 +0000
+++ b/src/hotspot/share/code/codeBehaviours.cpp	Wed Dec 05 15:57:26 2018 +0100
@@ -30,10 +30,10 @@
 CompiledICProtectionBehaviour* CompiledICProtectionBehaviour::_current = NULL;
 
 bool DefaultICProtectionBehaviour::lock(CompiledMethod* method) {
-  if (CompiledIC_lock->owned_by_self()) {
+  if (is_safe(method)) {
     return false;
   }
-  CompiledIC_lock->lock();
+  CompiledIC_lock->lock_without_safepoint_check();
   return true;
 }