< prev index next >

src/hotspot/share/gc/z/zBarrierSet.inline.hpp

Print this page

        

*** 130,176 **** return load_barrier_on_oop_field_preloaded(addr, o); } template <DecoratorSet decorators, typename BarrierSetT> template <typename T> ! inline oop ZBarrierSet::AccessBarrier<decorators, BarrierSetT>::oop_atomic_cmpxchg_in_heap(oop new_value, T* addr, oop compare_value) { verify_decorators_present<ON_STRONG_OOP_REF>(); verify_decorators_absent<AS_NO_KEEPALIVE>(); ZBarrier::load_barrier_on_oop_field(addr); ! return Raw::oop_atomic_cmpxchg_in_heap(new_value, addr, compare_value); } template <DecoratorSet decorators, typename BarrierSetT> ! inline oop ZBarrierSet::AccessBarrier<decorators, BarrierSetT>::oop_atomic_cmpxchg_in_heap_at(oop new_value, oop base, ptrdiff_t offset, oop compare_value) { verify_decorators_present<ON_STRONG_OOP_REF | ON_UNKNOWN_OOP_REF>(); verify_decorators_absent<AS_NO_KEEPALIVE>(); // Through Unsafe.CompareAndExchangeObject()/CompareAndSetObject() we can receive // calls with ON_UNKNOWN_OOP_REF set. However, we treat these as ON_STRONG_OOP_REF, // with the motivation that if you're doing Unsafe operations on a Reference.referent // field, then you're on your own anyway. ZBarrier::load_barrier_on_oop_field(field_addr(base, offset)); ! return Raw::oop_atomic_cmpxchg_in_heap_at(new_value, base, offset, compare_value); } template <DecoratorSet decorators, typename BarrierSetT> template <typename T> ! inline oop ZBarrierSet::AccessBarrier<decorators, BarrierSetT>::oop_atomic_xchg_in_heap(oop new_value, T* addr) { verify_decorators_present<ON_STRONG_OOP_REF>(); verify_decorators_absent<AS_NO_KEEPALIVE>(); ! const oop o = Raw::oop_atomic_xchg_in_heap(new_value, addr); return ZBarrier::load_barrier_on_oop(o); } template <DecoratorSet decorators, typename BarrierSetT> ! inline oop ZBarrierSet::AccessBarrier<decorators, BarrierSetT>::oop_atomic_xchg_in_heap_at(oop new_value, oop base, ptrdiff_t offset) { verify_decorators_present<ON_STRONG_OOP_REF>(); verify_decorators_absent<AS_NO_KEEPALIVE>(); ! const oop o = Raw::oop_atomic_xchg_in_heap_at(new_value, base, offset); return ZBarrier::load_barrier_on_oop(o); } template <DecoratorSet decorators, typename BarrierSetT> template <typename T> --- 130,176 ---- return load_barrier_on_oop_field_preloaded(addr, o); } template <DecoratorSet decorators, typename BarrierSetT> template <typename T> ! inline oop ZBarrierSet::AccessBarrier<decorators, BarrierSetT>::oop_atomic_cmpxchg_in_heap(T* addr, oop compare_value, oop new_value) { verify_decorators_present<ON_STRONG_OOP_REF>(); verify_decorators_absent<AS_NO_KEEPALIVE>(); ZBarrier::load_barrier_on_oop_field(addr); ! return Raw::oop_atomic_cmpxchg_in_heap(addr, compare_value, new_value); } template <DecoratorSet decorators, typename BarrierSetT> ! inline oop ZBarrierSet::AccessBarrier<decorators, BarrierSetT>::oop_atomic_cmpxchg_in_heap_at(oop base, ptrdiff_t offset, oop compare_value, oop new_value) { verify_decorators_present<ON_STRONG_OOP_REF | ON_UNKNOWN_OOP_REF>(); verify_decorators_absent<AS_NO_KEEPALIVE>(); // Through Unsafe.CompareAndExchangeObject()/CompareAndSetObject() we can receive // calls with ON_UNKNOWN_OOP_REF set. However, we treat these as ON_STRONG_OOP_REF, // with the motivation that if you're doing Unsafe operations on a Reference.referent // field, then you're on your own anyway. ZBarrier::load_barrier_on_oop_field(field_addr(base, offset)); ! return Raw::oop_atomic_cmpxchg_in_heap_at(base, offset, compare_value, new_value); } template <DecoratorSet decorators, typename BarrierSetT> template <typename T> ! inline oop ZBarrierSet::AccessBarrier<decorators, BarrierSetT>::oop_atomic_xchg_in_heap(T* addr, oop new_value) { verify_decorators_present<ON_STRONG_OOP_REF>(); verify_decorators_absent<AS_NO_KEEPALIVE>(); ! const oop o = Raw::oop_atomic_xchg_in_heap(addr, new_value); return ZBarrier::load_barrier_on_oop(o); } template <DecoratorSet decorators, typename BarrierSetT> ! inline oop ZBarrierSet::AccessBarrier<decorators, BarrierSetT>::oop_atomic_xchg_in_heap_at(oop base, ptrdiff_t offset, oop new_value) { verify_decorators_present<ON_STRONG_OOP_REF>(); verify_decorators_absent<AS_NO_KEEPALIVE>(); ! const oop o = Raw::oop_atomic_xchg_in_heap_at(base, offset, new_value); return ZBarrier::load_barrier_on_oop(o); } template <DecoratorSet decorators, typename BarrierSetT> template <typename T>
*** 220,241 **** return load_barrier_on_oop_field_preloaded(addr, o); } template <DecoratorSet decorators, typename BarrierSetT> template <typename T> ! inline oop ZBarrierSet::AccessBarrier<decorators, BarrierSetT>::oop_atomic_cmpxchg_not_in_heap(oop new_value, T* addr, oop compare_value) { verify_decorators_present<ON_STRONG_OOP_REF>(); verify_decorators_absent<AS_NO_KEEPALIVE>(); ! return Raw::oop_atomic_cmpxchg_not_in_heap(new_value, addr, compare_value); } template <DecoratorSet decorators, typename BarrierSetT> template <typename T> ! inline oop ZBarrierSet::AccessBarrier<decorators, BarrierSetT>::oop_atomic_xchg_not_in_heap(oop new_value, T* addr) { verify_decorators_present<ON_STRONG_OOP_REF>(); verify_decorators_absent<AS_NO_KEEPALIVE>(); ! return Raw::oop_atomic_xchg_not_in_heap(new_value, addr); } #endif // SHARE_GC_Z_ZBARRIERSET_INLINE_HPP --- 220,241 ---- return load_barrier_on_oop_field_preloaded(addr, o); } template <DecoratorSet decorators, typename BarrierSetT> template <typename T> ! inline oop ZBarrierSet::AccessBarrier<decorators, BarrierSetT>::oop_atomic_cmpxchg_not_in_heap(T* addr, oop compare_value, oop new_value) { verify_decorators_present<ON_STRONG_OOP_REF>(); verify_decorators_absent<AS_NO_KEEPALIVE>(); ! return Raw::oop_atomic_cmpxchg_not_in_heap(addr, compare_value, new_value); } template <DecoratorSet decorators, typename BarrierSetT> template <typename T> ! inline oop ZBarrierSet::AccessBarrier<decorators, BarrierSetT>::oop_atomic_xchg_not_in_heap(T* addr, oop new_value) { verify_decorators_present<ON_STRONG_OOP_REF>(); verify_decorators_absent<AS_NO_KEEPALIVE>(); ! return Raw::oop_atomic_xchg_not_in_heap(addr, new_value); } #endif // SHARE_GC_Z_ZBARRIERSET_INLINE_HPP
< prev index next >