< prev index next >

src/hotspot/share/gc/g1/g1BarrierSet.hpp

Print this page
rev 57544 : 8236485: Work-in-progress: Epoch synchronization protocol for G1 concurrent refinement
Reviewed-by:


  32 #include "gc/shared/cardTableBarrierSet.hpp"
  33 
  34 class G1CardTable;
  35 
  36 // This barrier is specialized to use a logging barrier to support
  37 // snapshot-at-the-beginning marking.
  38 
  39 class G1BarrierSet: public CardTableBarrierSet {
  40   friend class VMStructs;
  41  private:
  42   BufferNode::Allocator _satb_mark_queue_buffer_allocator;
  43   BufferNode::Allocator _dirty_card_queue_buffer_allocator;
  44   G1SATBMarkQueueSet _satb_mark_queue_set;
  45   G1DirtyCardQueueSet _dirty_card_queue_set;
  46   G1SharedDirtyCardQueue _shared_dirty_card_queue;
  47 
  48   static G1BarrierSet* g1_barrier_set() {
  49     return barrier_set_cast<G1BarrierSet>(BarrierSet::barrier_set());
  50   }
  51 




  52  public:
  53   G1BarrierSet(G1CardTable* table);
  54   ~G1BarrierSet() { }
  55 
  56   // Add "pre_val" to a set of objects that may have been disconnected from the
  57   // pre-marking object graph.
  58   static void enqueue(oop pre_val);
  59 
  60   static void enqueue_if_weak(DecoratorSet decorators, oop value);
  61 
  62   template <class T> void write_ref_array_pre_work(T* dst, size_t count);
  63   virtual void write_ref_array_pre(oop* dst, size_t count, bool dest_uninitialized);
  64   virtual void write_ref_array_pre(narrowOop* dst, size_t count, bool dest_uninitialized);
  65 
  66   template <DecoratorSet decorators, typename T>
  67   void write_ref_field_pre(T* field);
  68 
  69   // NB: if you do a whole-heap invalidation, the "usual invariant" defined
  70   // above no longer applies.
  71   void invalidate(MemRegion mr);




  32 #include "gc/shared/cardTableBarrierSet.hpp"
  33 
  34 class G1CardTable;
  35 
  36 // This barrier is specialized to use a logging barrier to support
  37 // snapshot-at-the-beginning marking.
  38 
  39 class G1BarrierSet: public CardTableBarrierSet {
  40   friend class VMStructs;
  41  private:
  42   BufferNode::Allocator _satb_mark_queue_buffer_allocator;
  43   BufferNode::Allocator _dirty_card_queue_buffer_allocator;
  44   G1SATBMarkQueueSet _satb_mark_queue_set;
  45   G1DirtyCardQueueSet _dirty_card_queue_set;
  46   G1SharedDirtyCardQueue _shared_dirty_card_queue;
  47 
  48   static G1BarrierSet* g1_barrier_set() {
  49     return barrier_set_cast<G1BarrierSet>(BarrierSet::barrier_set());
  50   }
  51 
  52 #ifdef ASSERT
  53   bool check_thread_state_for_invalidate();
  54 #endif
  55 
  56  public:
  57   G1BarrierSet(G1CardTable* table);
  58   ~G1BarrierSet() { }
  59 
  60   // Add "pre_val" to a set of objects that may have been disconnected from the
  61   // pre-marking object graph.
  62   static void enqueue(oop pre_val);
  63 
  64   static void enqueue_if_weak(DecoratorSet decorators, oop value);
  65 
  66   template <class T> void write_ref_array_pre_work(T* dst, size_t count);
  67   virtual void write_ref_array_pre(oop* dst, size_t count, bool dest_uninitialized);
  68   virtual void write_ref_array_pre(narrowOop* dst, size_t count, bool dest_uninitialized);
  69 
  70   template <DecoratorSet decorators, typename T>
  71   void write_ref_field_pre(T* field);
  72 
  73   // NB: if you do a whole-heap invalidation, the "usual invariant" defined
  74   // above no longer applies.
  75   void invalidate(MemRegion mr);


< prev index next >