equal
deleted
inserted
replaced
158 void AOTCompiledMethod::do_unloading(bool unloading_occurred) { |
158 void AOTCompiledMethod::do_unloading(bool unloading_occurred) { |
159 unload_nmethod_caches(unloading_occurred); |
159 unload_nmethod_caches(unloading_occurred); |
160 } |
160 } |
161 |
161 |
162 bool AOTCompiledMethod::make_not_entrant_helper(int new_state) { |
162 bool AOTCompiledMethod::make_not_entrant_helper(int new_state) { |
163 // Make sure the method is not flushed in case of a safepoint in code below. |
|
164 methodHandle the_method(method()); |
|
165 NoSafepointVerifier nsv; |
163 NoSafepointVerifier nsv; |
166 |
164 |
167 { |
165 { |
168 // Enter critical section. Does not block for safepoint. |
166 // Enter critical section. Does not block for safepoint. |
169 MutexLocker pl(CompiledMethod_lock, Mutex::_no_safepoint_check_flag); |
167 MutexLocker pl(CompiledMethod_lock, Mutex::_no_safepoint_check_flag); |
206 |
204 |
207 #ifdef TIERED |
205 #ifdef TIERED |
208 bool AOTCompiledMethod::make_entrant() { |
206 bool AOTCompiledMethod::make_entrant() { |
209 assert(!method()->is_old(), "reviving evolved method!"); |
207 assert(!method()->is_old(), "reviving evolved method!"); |
210 |
208 |
211 // Make sure the method is not flushed in case of a safepoint in code below. |
|
212 methodHandle the_method(method()); |
|
213 NoSafepointVerifier nsv; |
209 NoSafepointVerifier nsv; |
214 |
|
215 { |
210 { |
216 // Enter critical section. Does not block for safepoint. |
211 // Enter critical section. Does not block for safepoint. |
217 MutexLocker pl(CompiledMethod_lock, Mutex::_no_safepoint_check_flag); |
212 MutexLocker pl(CompiledMethod_lock, Mutex::_no_safepoint_check_flag); |
218 |
213 |
219 if (*_state_adr == in_use || *_state_adr == not_entrant) { |
214 if (*_state_adr == in_use || *_state_adr == not_entrant) { |