< prev index next >

src/hotspot/share/oops/method.cpp

Print this page
rev 47400 : [mq]: cmpxchg_ptr
rev 47401 : [mq]: cmpxchg_if_null
rev 47404 : [mq]: load_ptr_acquire

*** 442,451 **** --- 442,456 ---- } return mh->method_counters(); } + bool Method::init_method_counters(MethodCounters* counters) { + // Try to install a pointer to MethodCounters, return true on success. + return Atomic::cmpxchg_if_null(counters, &_method_counters); + } + void Method::cleanup_inline_caches() { // The current system doesn't use inline caches in the interpreter // => nothing to do (keep this method around for future use) }
*** 1107,1117 **** link_method(mh, CHECK); } } volatile address Method::from_compiled_entry_no_trampoline() const { ! nmethod *code = (nmethod *)OrderAccess::load_ptr_acquire(&_code); if (code) { return code->verified_entry_point(); } else { return adapter()->get_c2i_entry(); } --- 1112,1122 ---- link_method(mh, CHECK); } } volatile address Method::from_compiled_entry_no_trampoline() const { ! CompiledMethod *code = OrderAccess::load_acquire(&_code); if (code) { return code->verified_entry_point(); } else { return adapter()->get_c2i_entry(); }
*** 1133,1143 **** // Check that if an nmethod ref exists, it has a backlink to this or no backlink at all // (could be racing a deopt). // Not inline to avoid circular ref. bool Method::check_code() const { // cached in a register or local. There's a race on the value of the field. ! CompiledMethod *code = (CompiledMethod *)OrderAccess::load_ptr_acquire(&_code); return code == NULL || (code->method() == NULL) || (code->method() == (Method*)this && !code->is_osr_method()); } // Install compiled code. Instantly it can execute. void Method::set_code(const methodHandle& mh, CompiledMethod *code) { --- 1138,1148 ---- // Check that if an nmethod ref exists, it has a backlink to this or no backlink at all // (could be racing a deopt). // Not inline to avoid circular ref. bool Method::check_code() const { // cached in a register or local. There's a race on the value of the field. ! CompiledMethod *code = OrderAccess::load_acquire(&_code); return code == NULL || (code->method() == NULL) || (code->method() == (Method*)this && !code->is_osr_method()); } // Install compiled code. Instantly it can execute. void Method::set_code(const methodHandle& mh, CompiledMethod *code) {
< prev index next >