< prev index next >

src/hotspot/share/oops/method.hpp

Print this page
rev 47400 : [mq]: cmpxchg_ptr
rev 47404 : [mq]: load_ptr_acquire
rev 47406 : [mq]: assembler_cmpxchg

*** 134,146 **** ConstMethod* constMethod() const { return _constMethod; } void set_constMethod(ConstMethod* xconst) { _constMethod = xconst; } static address make_adapters(const methodHandle& mh, TRAPS); ! volatile address from_compiled_entry() const { return (address)OrderAccess::load_ptr_acquire(&_from_compiled_entry); } volatile address from_compiled_entry_no_trampoline() const; ! volatile address from_interpreted_entry() const{ return (address)OrderAccess::load_ptr_acquire(&_from_interpreted_entry); } // access flag AccessFlags access_flags() const { return _access_flags; } void set_access_flags(AccessFlags flags) { _access_flags = flags; } --- 134,146 ---- ConstMethod* constMethod() const { return _constMethod; } void set_constMethod(ConstMethod* xconst) { _constMethod = xconst; } static address make_adapters(const methodHandle& mh, TRAPS); ! volatile address from_compiled_entry() const { return OrderAccess::load_acquire(&_from_compiled_entry); } volatile address from_compiled_entry_no_trampoline() const; ! volatile address from_interpreted_entry() const{ return OrderAccess::load_acquire(&_from_interpreted_entry); } // access flag AccessFlags access_flags() const { return _access_flags; } void set_access_flags(AccessFlags flags) { _access_flags = flags; }
*** 335,359 **** void set_method_data(MethodData* data) { // The store into method must be released. On platforms without // total store order (TSO) the reference may become visible before // the initialization of data otherwise. ! OrderAccess::release_store_ptr((volatile void *)&_method_data, data); } MethodCounters* method_counters() const { return _method_counters; } void clear_method_counters() { _method_counters = NULL; } ! bool init_method_counters(MethodCounters* counters) { ! // Try to install a pointer to MethodCounters, return true on success. ! return Atomic::cmpxchg_ptr(counters, (volatile void*)&_method_counters, NULL) == NULL; ! } #ifdef TIERED // We are reusing interpreter_invocation_count as a holder for the previous event count! // We can do that since interpreter_invocation_count is not used in tiered. int prev_event_count() const { --- 335,356 ---- void set_method_data(MethodData* data) { // The store into method must be released. On platforms without // total store order (TSO) the reference may become visible before // the initialization of data otherwise. ! OrderAccess::release_store(&_method_data, data); } MethodCounters* method_counters() const { return _method_counters; } void clear_method_counters() { _method_counters = NULL; } ! bool init_method_counters(MethodCounters* counters); #ifdef TIERED // We are reusing interpreter_invocation_count as a holder for the previous event count! // We can do that since interpreter_invocation_count is not used in tiered. int prev_event_count() const {
*** 450,460 **** void remove_unshareable_info(); // nmethod/verified compiler entry address verified_code_entry(); bool check_code() const; // Not inline to avoid circular ref ! CompiledMethod* volatile code() const { assert( check_code(), "" ); return (CompiledMethod *)OrderAccess::load_ptr_acquire(&_code); } void clear_code(bool acquire_lock = true); // Clear out any compiled code static void set_code(const methodHandle& mh, CompiledMethod* code); void set_adapter_entry(AdapterHandlerEntry* adapter) { constMethod()->set_adapter_entry(adapter); } --- 447,457 ---- void remove_unshareable_info(); // nmethod/verified compiler entry address verified_code_entry(); bool check_code() const; // Not inline to avoid circular ref ! CompiledMethod* volatile code() const { assert( check_code(), "" ); return OrderAccess::load_acquire(&_code); } void clear_code(bool acquire_lock = true); // Clear out any compiled code static void set_code(const methodHandle& mh, CompiledMethod* code); void set_adapter_entry(AdapterHandlerEntry* adapter) { constMethod()->set_adapter_entry(adapter); }
< prev index next >