< prev index next >

src/hotspot/share/code/compiledMethod.inline.hpp

Print this page

        

*** 25,34 **** --- 25,35 ---- #ifndef SHARE_CODE_COMPILEDMETHOD_INLINE_HPP #define SHARE_CODE_COMPILEDMETHOD_INLINE_HPP #include "code/compiledMethod.hpp" #include "code/nativeInst.hpp" + #include "runtime/atomic.hpp" #include "runtime/frame.hpp" #include "runtime/orderAccess.hpp" inline bool CompiledMethod::is_deopt_pc(address pc) { return is_deopt_entry(pc) || is_deopt_mh_entry(pc); }
*** 56,65 **** --- 57,75 ---- return cm->get_original_pc(fr); return NULL; } + inline oop* CompiledMethod::get_keepalive() { return _keepalive; } + + inline oop* CompiledMethod::set_keepalive(oop* obj) { + return Atomic::cmpxchg(obj, &_keepalive, (oop*) NULL); + } + + inline bool CompiledMethod::clear_keepalive(oop* old) { + return Atomic::cmpxchg((oop*) NULL, &_keepalive, (oop*) old) == old; + } // class ExceptionCache methods inline int ExceptionCache::count() { return OrderAccess::load_acquire(&_count); }
*** 74,80 **** } // increment_count is only called under lock, but there may be concurrent readers. inline void ExceptionCache::increment_count() { OrderAccess::release_store(&_count, _count + 1); } - #endif // SHARE_CODE_COMPILEDMETHOD_INLINE_HPP --- 84,89 ----
< prev index next >