Mercurial > hg > truffle
diff src/share/vm/memory/cardTableModRefBS.hpp @ 14521:29ccc4cbabca
Merge
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Wed, 12 Mar 2014 13:30:08 +0100 |
parents | d8041d695d19 |
children | 4ca6dc0799b6 |
line wrap: on
line diff
--- a/src/share/vm/memory/cardTableModRefBS.hpp Tue Mar 11 15:34:06 2014 +0100 +++ b/src/share/vm/memory/cardTableModRefBS.hpp Wed Mar 12 13:30:08 2014 +0100 @@ -292,7 +292,7 @@ // these functions here for performance. protected: void write_ref_field_work(oop obj, size_t offset, oop newVal); - virtual void write_ref_field_work(void* field, oop newVal); + virtual void write_ref_field_work(void* field, oop newVal, bool release = false); public: bool has_write_ref_array_opt() { return true; } @@ -324,9 +324,14 @@ template <class T> inline void inline_write_ref_field_pre(T* field, oop newVal) {} - template <class T> inline void inline_write_ref_field(T* field, oop newVal) { + template <class T> inline void inline_write_ref_field(T* field, oop newVal, bool release) { jbyte* byte = byte_for((void*)field); - *byte = dirty_card; + if (release) { + // Perform a releasing store if requested. + OrderAccess::release_store((volatile jbyte*) byte, dirty_card); + } else { + *byte = dirty_card; + } } // These are used by G1, when it uses the card table as a temporary data