< prev index next >

src/hotspot/share/aot/aotCompiledMethod.cpp

Print this page
rev 56251 : imported patch 8226705-v1
rev 56252 : imported patch 8226705-v2

*** 163,173 **** methodHandle the_method(method()); NoSafepointVerifier nsv; { // Enter critical section. Does not block for safepoint. ! MutexLocker pl(Patching_lock, Mutex::_no_safepoint_check_flag); if (*_state_adr == new_state) { // another thread already performed this transition so nothing // to do, but return false to indicate this. return false; --- 163,173 ---- methodHandle the_method(method()); NoSafepointVerifier nsv; { // Enter critical section. Does not block for safepoint. ! MutexLocker pl(CompiledMethod_lock, Mutex::_no_safepoint_check_flag); if (*_state_adr == new_state) { // another thread already performed this transition so nothing // to do, but return false to indicate this. return false;
*** 186,201 **** method()->set_aot_code(NULL); } #endif // Remove AOTCompiledMethod from method. ! if (method() != NULL && (method()->code() == this || ! method()->from_compiled_entry() == verified_entry_point())) { ! HandleMark hm; ! method()->clear_code(false /* already owns Patching_lock */); } ! } // leave critical region under Patching_lock if (TraceCreateZombies) { ResourceMark m; const char *new_state_str = (new_state == not_entrant) ? "not entrant" : "not used"; --- 186,199 ---- method()->set_aot_code(NULL); } #endif // Remove AOTCompiledMethod from method. ! if (method() != NULL) { ! method()->unlink_code(this); } ! } // leave critical region under CompiledMethod_lock if (TraceCreateZombies) { ResourceMark m; const char *new_state_str = (new_state == not_entrant) ? "not entrant" : "not used";
*** 206,226 **** } #ifdef TIERED bool AOTCompiledMethod::make_entrant() { assert(!method()->is_old(), "reviving evolved method!"); - assert(*_state_adr != not_entrant, "%s", method()->has_aot_code() ? "has_aot_code() not cleared" : "caller didn't check has_aot_code()"); // Make sure the method is not flushed in case of a safepoint in code below. methodHandle the_method(method()); NoSafepointVerifier nsv; { // Enter critical section. Does not block for safepoint. ! MutexLocker pl(Patching_lock, Mutex::_no_safepoint_check_flag); ! if (*_state_adr == in_use) { // another thread already performed this transition so nothing // to do, but return false to indicate this. return false; } --- 204,223 ---- } #ifdef TIERED bool AOTCompiledMethod::make_entrant() { assert(!method()->is_old(), "reviving evolved method!"); // Make sure the method is not flushed in case of a safepoint in code below. methodHandle the_method(method()); NoSafepointVerifier nsv; { // Enter critical section. Does not block for safepoint. ! MutexLocker pl(CompiledMethod_lock, Mutex::_no_safepoint_check_flag); ! if (*_state_adr == in_use || *_state_adr == not_entrant) { // another thread already performed this transition so nothing // to do, but return false to indicate this. return false; }
*** 228,238 **** OrderAccess::storestore(); *_state_adr = in_use; // Log the transition once log_state_change(); ! } // leave critical region under Patching_lock if (TraceCreateZombies) { ResourceMark m; tty->print_cr("aot method <" INTPTR_FORMAT "> %s code made entrant", p2i(this), this->method() ? this->method()->name_and_sig_as_C_string() : "null"); --- 225,235 ---- OrderAccess::storestore(); *_state_adr = in_use; // Log the transition once log_state_change(); ! } // leave critical region under CompiledMethod_lock if (TraceCreateZombies) { ResourceMark m; tty->print_cr("aot method <" INTPTR_FORMAT "> %s code made entrant", p2i(this), this->method() ? this->method()->name_and_sig_as_C_string() : "null");
< prev index next >