Mercurial > hg > graal-jvmci-8
comparison src/share/vm/memory/cardTableModRefBS.hpp @ 14909:4ca6dc0799b6
Backout jdk9 merge
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Tue, 01 Apr 2014 13:57:07 +0200 |
parents | d8041d695d19 |
children | 52b4284cb496 |
comparison
equal
deleted
inserted
replaced
14908:8db6e76cb658 | 14909:4ca6dc0799b6 |
---|---|
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, bool release = false); | 295 virtual void write_ref_field_work(void* field, oop newVal); |
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, bool release) { | 327 template <class T> inline void inline_write_ref_field(T* field, oop newVal) { |
328 jbyte* byte = byte_for((void*)field); | 328 jbyte* byte = byte_for((void*)field); |
329 if (release) { | 329 *byte = dirty_card; |
330 // Perform a releasing store if requested. | |
331 OrderAccess::release_store((volatile jbyte*) byte, dirty_card); | |
332 } else { | |
333 *byte = dirty_card; | |
334 } | |
335 } | 330 } |
336 | 331 |
337 // These are used by G1, when it uses the card table as a temporary data | 332 // These are used by G1, when it uses the card table as a temporary data |
338 // structure for card claiming. | 333 // structure for card claiming. |
339 bool is_card_dirty(size_t card_index) { | 334 bool is_card_dirty(size_t card_index) { |