hotspot/src/share/vm/memory/cardTableModRefBS.hpp
changeset 3262 30d1c247fc25
parent 2154 72a9b7284ccf
child 3695 421cfcc8843c
equal deleted inserted replaced
3192:607a56c8880f 3262:30d1c247fc25
   285   // The scanning code has to handle the fact that the write barrier may be
   285   // The scanning code has to handle the fact that the write barrier may be
   286   // either precise or imprecise. We make non-virtual inline variants of
   286   // either precise or imprecise. We make non-virtual inline variants of
   287   // these functions here for performance.
   287   // these functions here for performance.
   288 protected:
   288 protected:
   289   void write_ref_field_work(oop obj, size_t offset, oop newVal);
   289   void write_ref_field_work(oop obj, size_t offset, oop newVal);
   290   void write_ref_field_work(void* field, oop newVal);
   290   virtual void write_ref_field_work(void* field, oop newVal);
   291 public:
   291 public:
   292 
   292 
   293   bool has_write_ref_array_opt() { return true; }
   293   bool has_write_ref_array_opt() { return true; }
   294   bool has_write_region_opt() { return true; }
   294   bool has_write_region_opt() { return true; }
   295 
   295 
   315     return is_card_aligned(addr);
   315     return is_card_aligned(addr);
   316   }
   316   }
   317 
   317 
   318   // *** Card-table-barrier-specific things.
   318   // *** Card-table-barrier-specific things.
   319 
   319 
   320   inline void inline_write_ref_field_pre(void* field, oop newVal) {}
   320   template <class T> inline void inline_write_ref_field_pre(T* field, oop newVal) {}
   321 
   321 
   322   inline void inline_write_ref_field(void* field, oop newVal) {
   322   template <class T> inline void inline_write_ref_field(T* field, oop newVal) {
   323     jbyte* byte = byte_for(field);
   323     jbyte* byte = byte_for((void*)field);
   324     *byte = dirty_card;
   324     *byte = dirty_card;
   325   }
   325   }
   326 
   326 
   327   // These are used by G1, when it uses the card table as a temporary data
   327   // These are used by G1, when it uses the card table as a temporary data
   328   // structure for card claiming.
   328   // structure for card claiming.