< prev index next >

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

Print this page

 65   virtual void write_ref_array_pre(narrowOop* dst, size_t length,
 66                                    bool dest_uninitialized) {}
 67   // Below count is the # array elements being written, starting
 68   // at the address "start", which may not necessarily be HeapWord-aligned
 69   inline void write_ref_array(HeapWord* start, size_t count);
 70 
 71   // The ModRef abstraction introduces pre and post barriers
 72   template <DecoratorSet decorators, typename BarrierSetT>
 73   class AccessBarrier: public BarrierSet::AccessBarrier<decorators, BarrierSetT> {
 74     typedef BarrierSet::AccessBarrier<decorators, BarrierSetT> Raw;
 75 
 76   public:
 77     template <typename T>
 78     static void oop_store_in_heap(T* addr, oop value);
 79     template <typename T>
 80     static oop oop_atomic_cmpxchg_in_heap(T* addr, oop compare_value, oop new_value);
 81     template <typename T>
 82     static oop oop_atomic_xchg_in_heap(T* addr, oop new_value);
 83 
 84     template <typename T>
 85     static bool oop_arraycopy_in_heap(arrayOop src_obj, size_t src_offset_in_bytes, T* src_raw,
 86                                       arrayOop dst_obj, size_t dst_offset_in_bytes, T* dst_raw,
 87                                       size_t length);
 88 




 89     static void clone_in_heap(oop src, oop dst, size_t size);
 90 
 91     static void oop_store_in_heap_at(oop base, ptrdiff_t offset, oop value) {
 92       oop_store_in_heap(AccessInternal::oop_field_addr<decorators>(base, offset), value);
 93     }
 94 
 95     static oop oop_atomic_xchg_in_heap_at(oop base, ptrdiff_t offset, oop new_value) {
 96       return oop_atomic_xchg_in_heap(AccessInternal::oop_field_addr<decorators>(base, offset), new_value);
 97     }
 98 
 99     static oop oop_atomic_cmpxchg_in_heap_at(oop base, ptrdiff_t offset, oop compare_value, oop new_value) {
100       return oop_atomic_cmpxchg_in_heap(AccessInternal::oop_field_addr<decorators>(base, offset), compare_value, new_value);
101     }


102   };
103 };
104 
105 template<>
106 struct BarrierSet::GetName<ModRefBarrierSet> {
107   static const BarrierSet::Name value = BarrierSet::ModRef;
108 };
109 
110 #endif // SHARE_GC_SHARED_MODREFBARRIERSET_HPP

 65   virtual void write_ref_array_pre(narrowOop* dst, size_t length,
 66                                    bool dest_uninitialized) {}
 67   // Below count is the # array elements being written, starting
 68   // at the address "start", which may not necessarily be HeapWord-aligned
 69   inline void write_ref_array(HeapWord* start, size_t count);
 70 
 71   // The ModRef abstraction introduces pre and post barriers
 72   template <DecoratorSet decorators, typename BarrierSetT>
 73   class AccessBarrier: public BarrierSet::AccessBarrier<decorators, BarrierSetT> {
 74     typedef BarrierSet::AccessBarrier<decorators, BarrierSetT> Raw;
 75 
 76   public:
 77     template <typename T>
 78     static void oop_store_in_heap(T* addr, oop value);
 79     template <typename T>
 80     static oop oop_atomic_cmpxchg_in_heap(T* addr, oop compare_value, oop new_value);
 81     template <typename T>
 82     static oop oop_atomic_xchg_in_heap(T* addr, oop new_value);
 83 
 84     template <typename T>
 85     static void oop_arraycopy_in_heap(arrayOop src_obj, size_t src_offset_in_bytes, T* src_raw,
 86                                       arrayOop dst_obj, size_t dst_offset_in_bytes, T* dst_raw,
 87                                       size_t length);
 88   private:
 89     // Failing checkcast or check null during copy, still needs barrier
 90     template <typename T>
 91     static inline void oop_arraycopy_partial_barrier(BarrierSetT *bs, T* dst_raw, T* p);
 92   public:
 93     static void clone_in_heap(oop src, oop dst, size_t size);
 94 
 95     static void oop_store_in_heap_at(oop base, ptrdiff_t offset, oop value) {
 96       oop_store_in_heap(AccessInternal::oop_field_addr<decorators>(base, offset), value);
 97     }
 98 
 99     static oop oop_atomic_xchg_in_heap_at(oop base, ptrdiff_t offset, oop new_value) {
100       return oop_atomic_xchg_in_heap(AccessInternal::oop_field_addr<decorators>(base, offset), new_value);
101     }
102 
103     static oop oop_atomic_cmpxchg_in_heap_at(oop base, ptrdiff_t offset, oop compare_value, oop new_value) {
104       return oop_atomic_cmpxchg_in_heap(AccessInternal::oop_field_addr<decorators>(base, offset), compare_value, new_value);
105     }
106 
107     static void value_copy_in_heap(void* src, void* dst, InlineKlass* md, LayoutKind lk);
108   };
109 };
110 
111 template<>
112 struct BarrierSet::GetName<ModRefBarrierSet> {
113   static const BarrierSet::Name value = BarrierSet::ModRef;
114 };
115 
116 #endif // SHARE_GC_SHARED_MODREFBARRIERSET_HPP
< prev index next >