equal
deleted
inserted
replaced
1245 link_method(mh, CHECK); |
1245 link_method(mh, CHECK); |
1246 } |
1246 } |
1247 } |
1247 } |
1248 |
1248 |
1249 address Method::from_compiled_entry_no_trampoline() const { |
1249 address Method::from_compiled_entry_no_trampoline() const { |
1250 CompiledMethod *code = OrderAccess::load_acquire(&_code); |
1250 CompiledMethod *code = Atomic::load_acquire(&_code); |
1251 if (code) { |
1251 if (code) { |
1252 return code->verified_entry_point(); |
1252 return code->verified_entry_point(); |
1253 } else { |
1253 } else { |
1254 return adapter()->get_c2i_entry(); |
1254 return adapter()->get_c2i_entry(); |
1255 } |
1255 } |
1271 // Check that if an nmethod ref exists, it has a backlink to this or no backlink at all |
1271 // Check that if an nmethod ref exists, it has a backlink to this or no backlink at all |
1272 // (could be racing a deopt). |
1272 // (could be racing a deopt). |
1273 // Not inline to avoid circular ref. |
1273 // Not inline to avoid circular ref. |
1274 bool Method::check_code() const { |
1274 bool Method::check_code() const { |
1275 // cached in a register or local. There's a race on the value of the field. |
1275 // cached in a register or local. There's a race on the value of the field. |
1276 CompiledMethod *code = OrderAccess::load_acquire(&_code); |
1276 CompiledMethod *code = Atomic::load_acquire(&_code); |
1277 return code == NULL || (code->method() == NULL) || (code->method() == (Method*)this && !code->is_osr_method()); |
1277 return code == NULL || (code->method() == NULL) || (code->method() == (Method*)this && !code->is_osr_method()); |
1278 } |
1278 } |
1279 |
1279 |
1280 // Install compiled code. Instantly it can execute. |
1280 // Install compiled code. Instantly it can execute. |
1281 void Method::set_code(const methodHandle& mh, CompiledMethod *code) { |
1281 void Method::set_code(const methodHandle& mh, CompiledMethod *code) { |