< prev index next >
src/hotspot/share/runtime/objectMonitor.cpp
Print this page
rev 47589 : Introduce SafepointMechanism
rev 47591 : Add Thread Local handshakes and thread local polling
*** 33,42 ****
--- 33,43 ----
#include "runtime/mutexLocker.hpp"
#include "runtime/objectMonitor.hpp"
#include "runtime/objectMonitor.inline.hpp"
#include "runtime/orderAccess.inline.hpp"
#include "runtime/osThread.hpp"
+ #include "runtime/safepointMechanism.inline.hpp"
#include "runtime/stubRoutines.hpp"
#include "runtime/thread.inline.hpp"
#include "services/threadService.hpp"
#include "trace/tracing.hpp"
#include "trace/traceMacros.hpp"
*** 1280,1290 ****
// Drop the lock
OrderAccess::release_store(&_owner, (void*)NULL);
OrderAccess::fence(); // ST _owner vs LD in unpark()
! if (SafepointSynchronize::do_call_back()) {
TEVENT(unpark before SAFEPOINT);
}
DTRACE_MONITOR_PROBE(contended__exit, this, object(), Self);
Trigger->unpark();
--- 1281,1291 ----
// Drop the lock
OrderAccess::release_store(&_owner, (void*)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();
*** 1934,1944 ****
// (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 (SafepointSynchronize::do_call_back()) {
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 >