< prev index next >

src/hotspot/share/runtime/synchronizer.cpp

Print this page
rev 59856 : 8247280: more fencing needed in async deflation for non-TSO machines
Reviewed-by: dholmes

*** 1906,1916 **** object->release_set_mark(markWord::encode(m)); // 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); // Hopefully the performance counters are allocated on distinct cache lines // to avoid false sharing on MP systems ... OM_PERFDATA_OP(Inflations, inc()); if (log_is_enabled(Trace, monitorinflation)) { --- 1906,1917 ---- object->release_set_mark(markWord::encode(m)); // 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"); ! // 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 ... OM_PERFDATA_OP(Inflations, inc()); if (log_is_enabled(Trace, monitorinflation)) {
*** 1963,1972 **** --- 1964,1975 ---- } // 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 // cache lines to avoid false sharing on MP systems ... OM_PERFDATA_OP(Inflations, inc());
< prev index next >