Mercurial > hg > graal-jvmci-8
diff src/share/vm/memory/cardTableModRefBS.hpp @ 14518:d8041d695d19
Merged with jdk9/dev/hotspot changeset 3812c088b945
author | twisti |
---|---|
date | Tue, 11 Mar 2014 18:45:59 -0700 |
parents | cefad50507d8 3205e78d8193 |
children | 4ca6dc0799b6 |
line wrap: on
line diff
--- a/src/share/vm/memory/cardTableModRefBS.hpp Wed Mar 12 00:00:05 2014 +0100 +++ b/src/share/vm/memory/cardTableModRefBS.hpp Tue Mar 11 18:45:59 2014 -0700 @@ -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