< prev index next >

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

Print this page




 118 
 119   void set_card_table(G1SATBCardTableLoggingModRefBS* card_table) { _card_table = card_table; }
 120 
 121   virtual void on_commit(uint start_idx, size_t num_regions, bool zero_filled);
 122 };
 123 
 124 // Adds card-table logging to the post-barrier.
 125 // Usual invariant: all dirty cards are logged in the DirtyCardQueueSet.
 126 class G1SATBCardTableLoggingModRefBS: public G1SATBCardTableModRefBS {
 127   friend class G1SATBCardTableLoggingModRefBSChangedListener;
 128  private:
 129   G1SATBCardTableLoggingModRefBSChangedListener _listener;
 130   DirtyCardQueueSet& _dcqs;
 131 
 132  protected:
 133   virtual void write_ref_field_work(void* field, oop new_val, bool release);
 134 
 135  public:
 136   static size_t compute_size(size_t mem_region_size_in_words) {
 137     size_t number_of_slots = (mem_region_size_in_words / card_size_in_words);
 138     return ReservedSpace::allocation_align_size_up(number_of_slots);
 139   }
 140 
 141   // Returns how many bytes of the heap a single byte of the Card Table corresponds to.
 142   static size_t heap_map_factor() {
 143     return CardTableModRefBS::card_size;
 144   }
 145 
 146   G1SATBCardTableLoggingModRefBS(MemRegion whole_heap);
 147 
 148   virtual void initialize() { }
 149   virtual void initialize(G1RegionToSpaceMapper* mapper);
 150 
 151   virtual void resize_covered_region(MemRegion new_region) { ShouldNotReachHere(); }
 152 
 153   // NB: if you do a whole-heap invalidation, the "usual invariant" defined
 154   // above no longer applies.
 155   void invalidate(MemRegion mr);
 156 
 157   void write_region_work(MemRegion mr)    { invalidate(mr); }
 158   void write_ref_array_work(MemRegion mr) { invalidate(mr); }


 118 
 119   void set_card_table(G1SATBCardTableLoggingModRefBS* card_table) { _card_table = card_table; }
 120 
 121   virtual void on_commit(uint start_idx, size_t num_regions, bool zero_filled);
 122 };
 123 
 124 // Adds card-table logging to the post-barrier.
 125 // Usual invariant: all dirty cards are logged in the DirtyCardQueueSet.
 126 class G1SATBCardTableLoggingModRefBS: public G1SATBCardTableModRefBS {
 127   friend class G1SATBCardTableLoggingModRefBSChangedListener;
 128  private:
 129   G1SATBCardTableLoggingModRefBSChangedListener _listener;
 130   DirtyCardQueueSet& _dcqs;
 131 
 132  protected:
 133   virtual void write_ref_field_work(void* field, oop new_val, bool release);
 134 
 135  public:
 136   static size_t compute_size(size_t mem_region_size_in_words) {
 137     size_t number_of_slots = (mem_region_size_in_words / card_size_in_words);
 138     return ReservedSpace::allocation_align_up(number_of_slots);
 139   }
 140 
 141   // Returns how many bytes of the heap a single byte of the Card Table corresponds to.
 142   static size_t heap_map_factor() {
 143     return CardTableModRefBS::card_size;
 144   }
 145 
 146   G1SATBCardTableLoggingModRefBS(MemRegion whole_heap);
 147 
 148   virtual void initialize() { }
 149   virtual void initialize(G1RegionToSpaceMapper* mapper);
 150 
 151   virtual void resize_covered_region(MemRegion new_region) { ShouldNotReachHere(); }
 152 
 153   // NB: if you do a whole-heap invalidation, the "usual invariant" defined
 154   // above no longer applies.
 155   void invalidate(MemRegion mr);
 156 
 157   void write_region_work(MemRegion mr)    { invalidate(mr); }
 158   void write_ref_array_work(MemRegion mr) { invalidate(mr); }
< prev index next >