mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 17:44:40 +02:00
8253183: Fragile memory barrier selection for some weak memory model platforms
Reviewed-by: dholmes, eosterlund, dcubed
This commit is contained in:
parent
8331e63fe4
commit
dc3a0f5f88
4 changed files with 23 additions and 21 deletions
|
@ -489,13 +489,10 @@ void ObjectMonitor::install_displaced_markword_in_object(const oop obj) {
|
|||
|
||||
// Separate loads in is_being_async_deflated(), which is almost always
|
||||
// called before this function, from the load of dmw/header below.
|
||||
if (support_IRIW_for_not_multiple_copy_atomic_cpu) {
|
||||
// A non-multiple copy atomic (nMCA) machine needs a bigger
|
||||
// hammer to separate the loads before and the load below.
|
||||
OrderAccess::fence();
|
||||
} else {
|
||||
OrderAccess::loadload();
|
||||
}
|
||||
|
||||
// _contentions and dmw/header may get written by different threads.
|
||||
// Make sure to observe them in the same order when having several observers.
|
||||
OrderAccess::loadload_for_IRIW();
|
||||
|
||||
const oop l_object = object_peek();
|
||||
if (l_object == NULL) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue