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