equal
deleted
inserted
replaced
290 // The scanning code has to handle the fact that the write barrier may be |
290 // The scanning code has to handle the fact that the write barrier may be |
291 // either precise or imprecise. We make non-virtual inline variants of |
291 // either precise or imprecise. We make non-virtual inline variants of |
292 // these functions here for performance. |
292 // these functions here for performance. |
293 protected: |
293 protected: |
294 void write_ref_field_work(oop obj, size_t offset, oop newVal); |
294 void write_ref_field_work(oop obj, size_t offset, oop newVal); |
295 virtual void write_ref_field_work(void* field, oop newVal); |
295 virtual void write_ref_field_work(void* field, oop newVal, bool release = false); |
296 public: |
296 public: |
297 |
297 |
298 bool has_write_ref_array_opt() { return true; } |
298 bool has_write_ref_array_opt() { return true; } |
299 bool has_write_region_opt() { return true; } |
299 bool has_write_region_opt() { return true; } |
300 |
300 |
322 |
322 |
323 // *** Card-table-barrier-specific things. |
323 // *** Card-table-barrier-specific things. |
324 |
324 |
325 template <class T> inline void inline_write_ref_field_pre(T* field, oop newVal) {} |
325 template <class T> inline void inline_write_ref_field_pre(T* field, oop newVal) {} |
326 |
326 |
327 template <class T> inline void inline_write_ref_field(T* field, oop newVal) { |
327 template <class T> inline void inline_write_ref_field(T* field, oop newVal, bool release) { |
328 jbyte* byte = byte_for((void*)field); |
328 jbyte* byte = byte_for((void*)field); |
329 *byte = dirty_card; |
329 if (release) { |
|
330 // Perform a releasing store if requested. |
|
331 OrderAccess::release_store((volatile jbyte*) byte, dirty_card); |
|
332 } else { |
|
333 *byte = dirty_card; |
|
334 } |
330 } |
335 } |
331 |
336 |
332 // These are used by G1, when it uses the card table as a temporary data |
337 // These are used by G1, when it uses the card table as a temporary data |
333 // structure for card claiming. |
338 // structure for card claiming. |
334 bool is_card_dirty(size_t card_index) { |
339 bool is_card_dirty(size_t card_index) { |