< prev index next >

src/hotspot/share/runtime/objectMonitor.cpp

Print this page
rev 47413 : Introduce SafepointMechanism
rev 47415 : Add Thread Local handshakes and thread local polling

*** 1281,1291 **** // Drop the lock OrderAccess::release_store_ptr(&_owner, NULL); OrderAccess::fence(); // ST _owner vs LD in unpark() ! if (SafepointMechanism::poll()) { TEVENT(unpark before SAFEPOINT); } DTRACE_MONITOR_PROBE(contended__exit, this, object(), Self); Trigger->unpark(); --- 1281,1291 ---- // Drop the lock OrderAccess::release_store_ptr(&_owner, NULL); OrderAccess::fence(); // ST _owner vs LD in unpark() ! if (SafepointMechanism::poll(Self)) { TEVENT(unpark before SAFEPOINT); } DTRACE_MONITOR_PROBE(contended__exit, this, object(), Self); Trigger->unpark();
*** 1935,1945 **** // (a) this thread, if unsafe, doesn't delay the safepoint, and (b) // this thread, if safe, doesn't steal cycles from GC. // This is in keeping with the "no loitering in runtime" rule. // We periodically check to see if there's a safepoint pending. if ((ctr & 0xFF) == 0) { ! if (SafepointMechanism::poll()) { TEVENT(Spin: safepoint); goto Abort; // abrupt spin egress } if (Knob_UsePause & 1) SpinPause(); } --- 1935,1945 ---- // (a) this thread, if unsafe, doesn't delay the safepoint, and (b) // this thread, if safe, doesn't steal cycles from GC. // This is in keeping with the "no loitering in runtime" rule. // We periodically check to see if there's a safepoint pending. if ((ctr & 0xFF) == 0) { ! if (SafepointMechanism::poll(Self)) { TEVENT(Spin: safepoint); goto Abort; // abrupt spin egress } if (Knob_UsePause & 1) SpinPause(); }
< prev index next >