mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 11:04:34 +02:00
8029396: PPC64 (part 212): Several memory ordering fixes in C-code
Memory ordering fixes in GC and other runtime code showing on PPC64. Reviewed-by: kvn, coleenp
This commit is contained in:
parent
1b2bf0be10
commit
46c4ef6572
16 changed files with 99 additions and 34 deletions
|
@ -292,7 +292,7 @@ public:
|
|||
// 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 @@ public:
|
|||
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue