< prev index next >

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

Print this page

 74   virtual void write_region(MemRegion mr);
 75 
 76   // Operations on arrays, or general regions (e.g., for "clone") may be
 77   // optimized by some barriers.
 78 
 79   // Below length is the # array elements being written
 80   virtual void write_ref_array_pre(oop* dst, size_t length,
 81                                    bool dest_uninitialized) {}
 82   virtual void write_ref_array_pre(narrowOop* dst, size_t length,
 83                                    bool dest_uninitialized) {}
 84   // Below count is the # array elements being written, starting
 85   // at the address "start", which may not necessarily be HeapWord-aligned
 86   inline void write_ref_array(HeapWord* start, size_t count);
 87 
 88   CardTable* card_table() const { return _card_table; }
 89 
 90   virtual void on_slowpath_allocation_exit(JavaThread* thread, oop new_obj);
 91 
 92   virtual void print_on(outputStream* st) const;
 93 





 94   template <DecoratorSet decorators, typename BarrierSetT = CardTableBarrierSet>
 95   class AccessBarrier: public BarrierSet::AccessBarrier<decorators, BarrierSetT> {
 96     typedef BarrierSet::AccessBarrier<decorators, BarrierSetT> Raw;
 97 
 98   public:
 99     template <typename T>
100     static void oop_store_in_heap(T* addr, oop value);
101     template <typename T>
102     static oop oop_atomic_cmpxchg_in_heap(T* addr, oop compare_value, oop new_value);
103     template <typename T>
104     static oop oop_atomic_xchg_in_heap(T* addr, oop new_value);
105 
106     template <typename T>
107     static bool oop_arraycopy_in_heap(arrayOop src_obj, size_t src_offset_in_bytes, T* src_raw,
108                                       arrayOop dst_obj, size_t dst_offset_in_bytes, T* dst_raw,
109                                       size_t length);
110 
111     static void clone_in_heap(oop src, oop dst, size_t size);
112 
113     static void oop_store_in_heap_at(oop base, ptrdiff_t offset, oop value) {

 74   virtual void write_region(MemRegion mr);
 75 
 76   // Operations on arrays, or general regions (e.g., for "clone") may be
 77   // optimized by some barriers.
 78 
 79   // Below length is the # array elements being written
 80   virtual void write_ref_array_pre(oop* dst, size_t length,
 81                                    bool dest_uninitialized) {}
 82   virtual void write_ref_array_pre(narrowOop* dst, size_t length,
 83                                    bool dest_uninitialized) {}
 84   // Below count is the # array elements being written, starting
 85   // at the address "start", which may not necessarily be HeapWord-aligned
 86   inline void write_ref_array(HeapWord* start, size_t count);
 87 
 88   CardTable* card_table() const { return _card_table; }
 89 
 90   virtual void on_slowpath_allocation_exit(JavaThread* thread, oop new_obj);
 91 
 92   virtual void print_on(outputStream* st) const;
 93 
 94   // The AOT code cache manager needs to know the current card shift
 95   // and, for some barrier sets, the region grain size shift
 96   uint card_shift() const { return _card_table->card_shift(); }
 97   virtual uint grain_shift() { return 0; }
 98 
 99   template <DecoratorSet decorators, typename BarrierSetT = CardTableBarrierSet>
100   class AccessBarrier: public BarrierSet::AccessBarrier<decorators, BarrierSetT> {
101     typedef BarrierSet::AccessBarrier<decorators, BarrierSetT> Raw;
102 
103   public:
104     template <typename T>
105     static void oop_store_in_heap(T* addr, oop value);
106     template <typename T>
107     static oop oop_atomic_cmpxchg_in_heap(T* addr, oop compare_value, oop new_value);
108     template <typename T>
109     static oop oop_atomic_xchg_in_heap(T* addr, oop new_value);
110 
111     template <typename T>
112     static bool oop_arraycopy_in_heap(arrayOop src_obj, size_t src_offset_in_bytes, T* src_raw,
113                                       arrayOop dst_obj, size_t dst_offset_in_bytes, T* dst_raw,
114                                       size_t length);
115 
116     static void clone_in_heap(oop src, oop dst, size_t size);
117 
118     static void oop_store_in_heap_at(oop base, ptrdiff_t offset, oop value) {
< prev index next >