Mercurial > hg > truffle
comparison src/share/vm/memory/cardTableModRefBS.hpp @ 14460:8a9bb7821e28
Merge
author | kvn |
---|---|
date | Wed, 19 Feb 2014 12:08:49 -0800 |
parents | 3205e78d8193 |
children | d8041d695d19 78bbf4d43a14 |
comparison
equal
deleted
inserted
replaced
14360:e8ef156f0bc9 | 14460:8a9bb7821e28 |
---|---|
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) { |