< prev index next >

src/hotspot/share/aot/aotCompiledMethod.cpp

Print this page
rev 54838 : [mq]: 8221734-v2
rev 54839 : [mq]: 8221734-v3


 171       // another thread already performed this transition so nothing
 172       // to do, but return false to indicate this.
 173       return false;
 174     }
 175 
 176     // Change state
 177     OrderAccess::storestore();
 178     *_state_adr = new_state;
 179 
 180     // Log the transition once
 181     log_state_change();
 182 
 183 #ifdef TIERED
 184     // Remain non-entrant forever
 185     if (new_state == not_entrant && method() != NULL) {
 186         method()->set_aot_code(NULL);
 187     }
 188 #endif
 189 
 190     // Remove AOTCompiledMethod from method.
 191     Method::unlink_code(method(), this);


 192   } // leave critical region under CompiledMethod_lock
 193 
 194 
 195   if (TraceCreateZombies) {
 196     ResourceMark m;
 197     const char *new_state_str = (new_state == not_entrant) ? "not entrant" : "not used";
 198     tty->print_cr("aot method <" INTPTR_FORMAT "> %s code made %s", p2i(this), this->method() ? this->method()->name_and_sig_as_C_string() : "null", new_state_str);
 199   }
 200 
 201   return true;
 202 }
 203 
 204 #ifdef TIERED
 205 bool AOTCompiledMethod::make_entrant() {
 206   assert(!method()->is_old(), "reviving evolved method!");
 207   assert(*_state_adr != not_entrant, "%s", method()->has_aot_code() ? "has_aot_code() not cleared" : "caller didn't check has_aot_code()");
 208 
 209   // Make sure the method is not flushed in case of a safepoint in code below.
 210   methodHandle the_method(method());
 211   NoSafepointVerifier nsv;




 171       // another thread already performed this transition so nothing
 172       // to do, but return false to indicate this.
 173       return false;
 174     }
 175 
 176     // Change state
 177     OrderAccess::storestore();
 178     *_state_adr = new_state;
 179 
 180     // Log the transition once
 181     log_state_change();
 182 
 183 #ifdef TIERED
 184     // Remain non-entrant forever
 185     if (new_state == not_entrant && method() != NULL) {
 186         method()->set_aot_code(NULL);
 187     }
 188 #endif
 189 
 190     // Remove AOTCompiledMethod from method.
 191     if (method() != NULL) {
 192       method()->unlink_code(this);
 193     }
 194   } // leave critical region under CompiledMethod_lock
 195 
 196 
 197   if (TraceCreateZombies) {
 198     ResourceMark m;
 199     const char *new_state_str = (new_state == not_entrant) ? "not entrant" : "not used";
 200     tty->print_cr("aot method <" INTPTR_FORMAT "> %s code made %s", p2i(this), this->method() ? this->method()->name_and_sig_as_C_string() : "null", new_state_str);
 201   }
 202 
 203   return true;
 204 }
 205 
 206 #ifdef TIERED
 207 bool AOTCompiledMethod::make_entrant() {
 208   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 
 211   // Make sure the method is not flushed in case of a safepoint in code below.
 212   methodHandle the_method(method());
 213   NoSafepointVerifier nsv;


< prev index next >