< prev index next >

src/share/vm/gc/g1/g1SATBCardTableModRefBS.hpp

Print this page




  33 
  34 class DirtyCardQueueSet;
  35 class G1SATBCardTableLoggingModRefBS;
  36 
  37 // This barrier is specialized to use a logging barrier to support
  38 // snapshot-at-the-beginning marking.
  39 
  40 class G1SATBCardTableModRefBS: public CardTableModRefBS {
  41   friend class VMStructs;
  42 protected:
  43   enum G1CardValues {
  44     g1_young_gen = CT_MR_BS_last_reserved << 1
  45   };
  46 
  47   G1SATBCardTableModRefBS(MemRegion whole_heap, const BarrierSet::FakeRtti& fake_rtti);
  48   ~G1SATBCardTableModRefBS() { }
  49 
  50 public:
  51   static int g1_young_card_val()   { return g1_young_gen; }
  52 
  53   // Add "pre_val" to a set of objects that may have been disconnected from the
  54   // pre-marking object graph.
  55   static void enqueue(oop pre_val);
  56 
  57   virtual bool has_write_ref_pre_barrier() { return true; }
  58 
  59   // We export this to make it available in cases where the static
  60   // type of the barrier set is known.  Note that it is non-virtual.
  61   template <class T> inline void inline_write_ref_field_pre(T* field, oop newVal);
  62 
  63   // These are the more general virtual versions.
  64   inline virtual void write_ref_field_pre_work(oop* field, oop new_val);
  65   inline virtual void write_ref_field_pre_work(narrowOop* field, oop new_val);
  66   virtual void write_ref_field_pre_work(void* field, oop new_val) {
  67     guarantee(false, "Not needed");
  68   }
  69 
  70   template <class T> void write_ref_array_pre_work(T* dst, int count);
  71   virtual void write_ref_array_pre(oop* dst, int count, bool dest_uninitialized);
  72   virtual void write_ref_array_pre(narrowOop* dst, int count, bool dest_uninitialized);
  73 
  74 /*
  75    Claimed and deferred bits are used together in G1 during the evacuation
  76    pause. These bits can have the following state transitions:




  33 
  34 class DirtyCardQueueSet;
  35 class G1SATBCardTableLoggingModRefBS;
  36 
  37 // This barrier is specialized to use a logging barrier to support
  38 // snapshot-at-the-beginning marking.
  39 
  40 class G1SATBCardTableModRefBS: public CardTableModRefBS {
  41   friend class VMStructs;
  42 protected:
  43   enum G1CardValues {
  44     g1_young_gen = CT_MR_BS_last_reserved << 1
  45   };
  46 
  47   G1SATBCardTableModRefBS(MemRegion whole_heap, const BarrierSet::FakeRtti& fake_rtti);
  48   ~G1SATBCardTableModRefBS() { }
  49 
  50 public:
  51   static int g1_young_card_val()   { return g1_young_gen; }
  52 




  53   virtual bool has_write_ref_pre_barrier() { return true; }
  54 
  55   // We export this to make it available in cases where the static
  56   // type of the barrier set is known.  Note that it is non-virtual.
  57   template <class T> inline void inline_write_ref_field_pre(T* field, oop newVal);
  58 
  59   // These are the more general virtual versions.
  60   inline virtual void write_ref_field_pre_work(oop* field, oop new_val);
  61   inline virtual void write_ref_field_pre_work(narrowOop* field, oop new_val);
  62   virtual void write_ref_field_pre_work(void* field, oop new_val) {
  63     guarantee(false, "Not needed");
  64   }
  65 
  66   template <class T> void write_ref_array_pre_work(T* dst, int count);
  67   virtual void write_ref_array_pre(oop* dst, int count, bool dest_uninitialized);
  68   virtual void write_ref_array_pre(narrowOop* dst, int count, bool dest_uninitialized);
  69 
  70 /*
  71    Claimed and deferred bits are used together in G1 during the evacuation
  72    pause. These bits can have the following state transitions:


< prev index next >