< prev index next >

src/share/vm/gc/shared/cardTableModRefBS.hpp

Print this page




 151     card_size_in_words          = card_size / sizeof(HeapWord)
 152   };
 153 
 154   static int clean_card_val()      { return clean_card; }
 155   static int clean_card_mask_val() { return clean_card_mask; }
 156   static int dirty_card_val()      { return dirty_card; }
 157   static int claimed_card_val()    { return claimed_card; }
 158   static int precleaned_card_val() { return precleaned_card; }
 159   static int deferred_card_val()   { return deferred_card; }
 160 
 161   virtual void initialize();
 162 
 163   // *** Barrier set functions.
 164 
 165   bool has_write_ref_pre_barrier() { return false; }
 166 
 167   // Initialization utilities; covered_words is the size of the covered region
 168   // in, um, words.
 169   inline size_t cards_required(size_t covered_words) {
 170     // Add one for a guard card, used to detect errors.
 171     const size_t words = align_size_up(covered_words, card_size_in_words);
 172     return words / card_size_in_words + 1;
 173   }
 174 
 175 protected:
 176 
 177   CardTableModRefBS(MemRegion whole_heap, const BarrierSet::FakeRtti& fake_rtti);
 178   ~CardTableModRefBS();
 179 
 180   // Record a reference update. Note that these versions are precise!
 181   // The scanning code has to handle the fact that the write barrier may be
 182   // either precise or imprecise. We make non-virtual inline variants of
 183   // these functions here for performance.
 184 
 185   void write_ref_field_work(oop obj, size_t offset, oop newVal);
 186   virtual void write_ref_field_work(void* field, oop newVal, bool release);
 187 public:
 188 
 189   bool has_write_ref_array_opt() { return true; }
 190   bool has_write_region_opt() { return true; }
 191 




 151     card_size_in_words          = card_size / sizeof(HeapWord)
 152   };
 153 
 154   static int clean_card_val()      { return clean_card; }
 155   static int clean_card_mask_val() { return clean_card_mask; }
 156   static int dirty_card_val()      { return dirty_card; }
 157   static int claimed_card_val()    { return claimed_card; }
 158   static int precleaned_card_val() { return precleaned_card; }
 159   static int deferred_card_val()   { return deferred_card; }
 160 
 161   virtual void initialize();
 162 
 163   // *** Barrier set functions.
 164 
 165   bool has_write_ref_pre_barrier() { return false; }
 166 
 167   // Initialization utilities; covered_words is the size of the covered region
 168   // in, um, words.
 169   inline size_t cards_required(size_t covered_words) {
 170     // Add one for a guard card, used to detect errors.
 171     const size_t words = align_up(covered_words, card_size_in_words);
 172     return words / card_size_in_words + 1;
 173   }
 174 
 175 protected:
 176 
 177   CardTableModRefBS(MemRegion whole_heap, const BarrierSet::FakeRtti& fake_rtti);
 178   ~CardTableModRefBS();
 179 
 180   // Record a reference update. Note that these versions are precise!
 181   // The scanning code has to handle the fact that the write barrier may be
 182   // either precise or imprecise. We make non-virtual inline variants of
 183   // these functions here for performance.
 184 
 185   void write_ref_field_work(oop obj, size_t offset, oop newVal);
 186   virtual void write_ref_field_work(void* field, oop newVal, bool release);
 187 public:
 188 
 189   bool has_write_ref_array_opt() { return true; }
 190   bool has_write_region_opt() { return true; }
 191 


< prev index next >