equal
deleted
inserted
replaced
28 #include "runtime/safepoint.hpp" |
28 #include "runtime/safepoint.hpp" |
29 |
29 |
30 CompiledICProtectionBehaviour* CompiledICProtectionBehaviour::_current = NULL; |
30 CompiledICProtectionBehaviour* CompiledICProtectionBehaviour::_current = NULL; |
31 |
31 |
32 bool DefaultICProtectionBehaviour::lock(CompiledMethod* method) { |
32 bool DefaultICProtectionBehaviour::lock(CompiledMethod* method) { |
33 if (CompiledIC_lock->owned_by_self()) { |
33 if (is_safe(method)) { |
34 return false; |
34 return false; |
35 } |
35 } |
36 CompiledIC_lock->lock(); |
36 CompiledIC_lock->lock_without_safepoint_check(); |
37 return true; |
37 return true; |
38 } |
38 } |
39 |
39 |
40 void DefaultICProtectionBehaviour::unlock(CompiledMethod* method) { |
40 void DefaultICProtectionBehaviour::unlock(CompiledMethod* method) { |
41 CompiledIC_lock->unlock(); |
41 CompiledIC_lock->unlock(); |