equal
deleted
inserted
replaced
30 #include "code/compiledIC.hpp" |
30 #include "code/compiledIC.hpp" |
31 #include "code/nativeInst.hpp" |
31 #include "code/nativeInst.hpp" |
32 #include "compiler/compilerOracle.hpp" |
32 #include "compiler/compilerOracle.hpp" |
33 #include "gc/shared/cardTableBarrierSet.hpp" |
33 #include "gc/shared/cardTableBarrierSet.hpp" |
34 #include "gc/shared/collectedHeap.hpp" |
34 #include "gc/shared/collectedHeap.hpp" |
|
35 #include "oops/klass.inline.hpp" |
35 #include "oops/method.inline.hpp" |
36 #include "oops/method.inline.hpp" |
36 #include "runtime/frame.inline.hpp" |
37 #include "runtime/frame.inline.hpp" |
37 #include "runtime/handles.inline.hpp" |
38 #include "runtime/handles.inline.hpp" |
38 #include "runtime/java.hpp" |
39 #include "runtime/java.hpp" |
39 #include "runtime/os.hpp" |
40 #include "runtime/os.hpp" |
204 } |
205 } |
205 |
206 |
206 #ifdef TIERED |
207 #ifdef TIERED |
207 bool AOTCompiledMethod::make_entrant() { |
208 bool AOTCompiledMethod::make_entrant() { |
208 assert(!method()->is_old(), "reviving evolved method!"); |
209 assert(!method()->is_old(), "reviving evolved method!"); |
209 assert(*_state_adr != not_entrant, "%s", method()->has_aot_code() ? "has_aot_code() not cleared" : "caller didn't check has_aot_code()"); |
|
210 |
210 |
211 // Make sure the method is not flushed in case of a safepoint in code below. |
211 // Make sure the method is not flushed in case of a safepoint in code below. |
212 methodHandle the_method(method()); |
212 methodHandle the_method(method()); |
213 NoSafepointVerifier nsv; |
213 NoSafepointVerifier nsv; |
214 |
214 |
215 { |
215 { |
216 // Enter critical section. Does not block for safepoint. |
216 // Enter critical section. Does not block for safepoint. |
217 MutexLocker pl(CompiledMethod_lock, Mutex::_no_safepoint_check_flag); |
217 MutexLocker pl(CompiledMethod_lock, Mutex::_no_safepoint_check_flag); |
218 |
218 |
219 if (*_state_adr == in_use) { |
219 if (*_state_adr == in_use || *_state_adr == not_entrant) { |
220 // another thread already performed this transition so nothing |
220 // another thread already performed this transition so nothing |
221 // to do, but return false to indicate this. |
221 // to do, but return false to indicate this. |
222 return false; |
222 return false; |
223 } |
223 } |
224 |
224 |