< prev index next >

src/hotspot/share/gc/shared/modRefBarrierSet.inline.hpp

Print this page




  50   HeapWord* aligned_end   = align_up  (end,   HeapWordSize);
  51   // If compressed oops were not being used, these should already be aligned
  52   assert(UseCompressedOops || (aligned_start == start && aligned_end == end),
  53          "Expected heap word alignment of start and end");
  54   write_ref_array_work(MemRegion(aligned_start, aligned_end));
  55 }
  56 
  57 template <DecoratorSet decorators, typename BarrierSetT>
  58 template <typename T>
  59 inline void ModRefBarrierSet::AccessBarrier<decorators, BarrierSetT>::
  60 oop_store_in_heap(T* addr, oop value) {
  61   BarrierSetT *bs = barrier_set_cast<BarrierSetT>(barrier_set());
  62   bs->template write_ref_field_pre<decorators>(addr);
  63   Raw::oop_store(addr, value);
  64   bs->template write_ref_field_post<decorators>(addr, value);
  65 }
  66 
  67 template <DecoratorSet decorators, typename BarrierSetT>
  68 template <typename T>
  69 inline oop ModRefBarrierSet::AccessBarrier<decorators, BarrierSetT>::
  70 oop_atomic_cmpxchg_in_heap(oop new_value, T* addr, oop compare_value) {
  71   BarrierSetT *bs = barrier_set_cast<BarrierSetT>(barrier_set());
  72   bs->template write_ref_field_pre<decorators>(addr);
  73   oop result = Raw::oop_atomic_cmpxchg(new_value, addr, compare_value);
  74   if (result == compare_value) {
  75     bs->template write_ref_field_post<decorators>(addr, new_value);
  76   }
  77   return result;
  78 }
  79 
  80 template <DecoratorSet decorators, typename BarrierSetT>
  81 template <typename T>
  82 inline oop ModRefBarrierSet::AccessBarrier<decorators, BarrierSetT>::
  83 oop_atomic_xchg_in_heap(T* addr, oop new_value) {
  84   BarrierSetT *bs = barrier_set_cast<BarrierSetT>(barrier_set());
  85   bs->template write_ref_field_pre<decorators>(addr);
  86   oop result = Raw::oop_atomic_xchg(addr, new_value);
  87   bs->template write_ref_field_post<decorators>(addr, new_value);
  88   return result;
  89 }
  90 
  91 template <DecoratorSet decorators, typename BarrierSetT>
  92 template <typename T>
  93 inline bool ModRefBarrierSet::AccessBarrier<decorators, BarrierSetT>::




  50   HeapWord* aligned_end   = align_up  (end,   HeapWordSize);
  51   // If compressed oops were not being used, these should already be aligned
  52   assert(UseCompressedOops || (aligned_start == start && aligned_end == end),
  53          "Expected heap word alignment of start and end");
  54   write_ref_array_work(MemRegion(aligned_start, aligned_end));
  55 }
  56 
  57 template <DecoratorSet decorators, typename BarrierSetT>
  58 template <typename T>
  59 inline void ModRefBarrierSet::AccessBarrier<decorators, BarrierSetT>::
  60 oop_store_in_heap(T* addr, oop value) {
  61   BarrierSetT *bs = barrier_set_cast<BarrierSetT>(barrier_set());
  62   bs->template write_ref_field_pre<decorators>(addr);
  63   Raw::oop_store(addr, value);
  64   bs->template write_ref_field_post<decorators>(addr, value);
  65 }
  66 
  67 template <DecoratorSet decorators, typename BarrierSetT>
  68 template <typename T>
  69 inline oop ModRefBarrierSet::AccessBarrier<decorators, BarrierSetT>::
  70 oop_atomic_cmpxchg_in_heap(T* addr, oop compare_value, oop new_value) {
  71   BarrierSetT *bs = barrier_set_cast<BarrierSetT>(barrier_set());
  72   bs->template write_ref_field_pre<decorators>(addr);
  73   oop result = Raw::oop_atomic_cmpxchg(addr, compare_value, new_value);
  74   if (result == compare_value) {
  75     bs->template write_ref_field_post<decorators>(addr, new_value);
  76   }
  77   return result;
  78 }
  79 
  80 template <DecoratorSet decorators, typename BarrierSetT>
  81 template <typename T>
  82 inline oop ModRefBarrierSet::AccessBarrier<decorators, BarrierSetT>::
  83 oop_atomic_xchg_in_heap(T* addr, oop new_value) {
  84   BarrierSetT *bs = barrier_set_cast<BarrierSetT>(barrier_set());
  85   bs->template write_ref_field_pre<decorators>(addr);
  86   oop result = Raw::oop_atomic_xchg(addr, new_value);
  87   bs->template write_ref_field_post<decorators>(addr, new_value);
  88   return result;
  89 }
  90 
  91 template <DecoratorSet decorators, typename BarrierSetT>
  92 template <typename T>
  93 inline bool ModRefBarrierSet::AccessBarrier<decorators, BarrierSetT>::


< prev index next >