168 // above returns true. Otherwise, they should perform an appropriate 169 // barrier for an array whose elements are all in the given memory region. 170 virtual void read_ref_array(MemRegion mr) = 0; 171 virtual void read_prim_array(MemRegion mr) = 0; 172 173 // Below length is the # array elements being written 174 virtual void write_ref_array_pre(oop* dst, int length, 175 bool dest_uninitialized = false) {} 176 virtual void write_ref_array_pre(narrowOop* dst, int length, 177 bool dest_uninitialized = false) {} 178 // Below count is the # array elements being written, starting 179 // at the address "start", which may not necessarily be HeapWord-aligned 180 inline void write_ref_array(HeapWord* start, size_t count); 181 182 // Static versions, suitable for calling from generated code; 183 // count is # array elements being written, starting with "start", 184 // which may not necessarily be HeapWord-aligned. 185 static void static_write_ref_array_pre(HeapWord* start, size_t count); 186 static void static_write_ref_array_post(HeapWord* start, size_t count); 187 188 protected: 189 virtual void write_ref_array_work(MemRegion mr) = 0; 190 public: 191 virtual void write_prim_array(MemRegion mr) = 0; 192 193 virtual void read_region(MemRegion mr) = 0; 194 195 // (For efficiency reasons, this operation is specialized for certain 196 // barrier types. Semantically, it should be thought of as a call to the 197 // virtual "_work" function below, which must implement the barrier.) 198 void write_region(MemRegion mr); 199 protected: 200 virtual void write_region_work(MemRegion mr) = 0; 201 public: 202 // Inform the BarrierSet that the the covered heap region that starts 203 // with "base" has been changed to have the given size (possibly from 0, 204 // for initialization.) 205 virtual void resize_covered_region(MemRegion new_region) = 0; 206 207 // If the barrier set imposes any alignment restrictions on boundaries | 168 // above returns true. Otherwise, they should perform an appropriate 169 // barrier for an array whose elements are all in the given memory region. 170 virtual void read_ref_array(MemRegion mr) = 0; 171 virtual void read_prim_array(MemRegion mr) = 0; 172 173 // Below length is the # array elements being written 174 virtual void write_ref_array_pre(oop* dst, int length, 175 bool dest_uninitialized = false) {} 176 virtual void write_ref_array_pre(narrowOop* dst, int length, 177 bool dest_uninitialized = false) {} 178 // Below count is the # array elements being written, starting 179 // at the address "start", which may not necessarily be HeapWord-aligned 180 inline void write_ref_array(HeapWord* start, size_t count); 181 182 // Static versions, suitable for calling from generated code; 183 // count is # array elements being written, starting with "start", 184 // which may not necessarily be HeapWord-aligned. 185 static void static_write_ref_array_pre(HeapWord* start, size_t count); 186 static void static_write_ref_array_post(HeapWord* start, size_t count); 187 188 virtual void write_ref_nmethod_pre(oop* dst, nmethod* nm) {} 189 virtual void write_ref_nmethod_post(oop* dst, nmethod* nm) {} 190 191 protected: 192 virtual void write_ref_array_work(MemRegion mr) = 0; 193 public: 194 virtual void write_prim_array(MemRegion mr) = 0; 195 196 virtual void read_region(MemRegion mr) = 0; 197 198 // (For efficiency reasons, this operation is specialized for certain 199 // barrier types. Semantically, it should be thought of as a call to the 200 // virtual "_work" function below, which must implement the barrier.) 201 void write_region(MemRegion mr); 202 protected: 203 virtual void write_region_work(MemRegion mr) = 0; 204 public: 205 // Inform the BarrierSet that the the covered heap region that starts 206 // with "base" has been changed to have the given size (possibly from 0, 207 // for initialization.) 208 virtual void resize_covered_region(MemRegion new_region) = 0; 209 210 // If the barrier set imposes any alignment restrictions on boundaries |