mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 09:34:38 +02:00
8247280: more fencing needed in async deflation for non-TSO machines
Reviewed-by: dholmes, pchilanomate
This commit is contained in:
parent
d7c1bb1fb7
commit
62d77dc3fc
3 changed files with 19 additions and 2 deletions
|
@ -1908,7 +1908,8 @@ ObjectMonitor* ObjectSynchronizer::inflate(Thread* self, oop object,
|
|||
// Once ObjectMonitor is configured and the object is associated
|
||||
// with the ObjectMonitor, it is safe to allow async deflation:
|
||||
assert(m->is_new(), "freshly allocated monitor must be new");
|
||||
m->set_allocation_state(ObjectMonitor::Old);
|
||||
// Release semantics needed to keep allocation_state from floating up.
|
||||
m->release_set_allocation_state(ObjectMonitor::Old);
|
||||
|
||||
// Hopefully the performance counters are allocated on distinct cache lines
|
||||
// to avoid false sharing on MP systems ...
|
||||
|
@ -1965,6 +1966,8 @@ ObjectMonitor* ObjectSynchronizer::inflate(Thread* self, oop object,
|
|||
// Once the ObjectMonitor is configured and object is associated
|
||||
// with the ObjectMonitor, it is safe to allow async deflation:
|
||||
assert(m->is_new(), "freshly allocated monitor must be new");
|
||||
// Release semantics are not needed to keep allocation_state from
|
||||
// floating up since cas_set_mark() takes care of it.
|
||||
m->set_allocation_state(ObjectMonitor::Old);
|
||||
|
||||
// Hopefully the performance counters are allocated on distinct
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue