< 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
@@ -33,10 +33,11 @@
#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,11 +1281,11 @@
// Drop the lock
OrderAccess::release_store_ptr(&_owner, NULL);
OrderAccess::fence(); // ST _owner vs LD in unpark()
- if (SafepointSynchronize::do_call_back()) {
+ if (SafepointMechanism::poll(Self)) {
TEVENT(unpark before SAFEPOINT);
}
DTRACE_MONITOR_PROBE(contended__exit, this, object(), Self);
Trigger->unpark();
@@ -1934,11 +1935,11 @@
// (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()) {
+ if (SafepointMechanism::poll(Self)) {
TEVENT(Spin: safepoint);
goto Abort; // abrupt spin egress
}
if (Knob_UsePause & 1) SpinPause();
}
< prev index next >