equal
deleted
inserted
replaced
33 #include "runtime/mutexLocker.hpp" |
33 #include "runtime/mutexLocker.hpp" |
34 #include "runtime/objectMonitor.hpp" |
34 #include "runtime/objectMonitor.hpp" |
35 #include "runtime/objectMonitor.inline.hpp" |
35 #include "runtime/objectMonitor.inline.hpp" |
36 #include "runtime/orderAccess.inline.hpp" |
36 #include "runtime/orderAccess.inline.hpp" |
37 #include "runtime/osThread.hpp" |
37 #include "runtime/osThread.hpp" |
|
38 #include "runtime/safepointMechanism.inline.hpp" |
38 #include "runtime/stubRoutines.hpp" |
39 #include "runtime/stubRoutines.hpp" |
39 #include "runtime/thread.inline.hpp" |
40 #include "runtime/thread.inline.hpp" |
40 #include "services/threadService.hpp" |
41 #include "services/threadService.hpp" |
41 #include "trace/tracing.hpp" |
42 #include "trace/tracing.hpp" |
42 #include "trace/traceMacros.hpp" |
43 #include "trace/traceMacros.hpp" |
1280 |
1281 |
1281 // Drop the lock |
1282 // Drop the lock |
1282 OrderAccess::release_store(&_owner, (void*)NULL); |
1283 OrderAccess::release_store(&_owner, (void*)NULL); |
1283 OrderAccess::fence(); // ST _owner vs LD in unpark() |
1284 OrderAccess::fence(); // ST _owner vs LD in unpark() |
1284 |
1285 |
1285 if (SafepointSynchronize::do_call_back()) { |
1286 if (SafepointMechanism::poll(Self)) { |
1286 TEVENT(unpark before SAFEPOINT); |
1287 TEVENT(unpark before SAFEPOINT); |
1287 } |
1288 } |
1288 |
1289 |
1289 DTRACE_MONITOR_PROBE(contended__exit, this, object(), Self); |
1290 DTRACE_MONITOR_PROBE(contended__exit, this, object(), Self); |
1290 Trigger->unpark(); |
1291 Trigger->unpark(); |
1934 // (a) this thread, if unsafe, doesn't delay the safepoint, and (b) |
1935 // (a) this thread, if unsafe, doesn't delay the safepoint, and (b) |
1935 // this thread, if safe, doesn't steal cycles from GC. |
1936 // this thread, if safe, doesn't steal cycles from GC. |
1936 // This is in keeping with the "no loitering in runtime" rule. |
1937 // This is in keeping with the "no loitering in runtime" rule. |
1937 // We periodically check to see if there's a safepoint pending. |
1938 // We periodically check to see if there's a safepoint pending. |
1938 if ((ctr & 0xFF) == 0) { |
1939 if ((ctr & 0xFF) == 0) { |
1939 if (SafepointSynchronize::do_call_back()) { |
1940 if (SafepointMechanism::poll(Self)) { |
1940 TEVENT(Spin: safepoint); |
1941 TEVENT(Spin: safepoint); |
1941 goto Abort; // abrupt spin egress |
1942 goto Abort; // abrupt spin egress |
1942 } |
1943 } |
1943 if (Knob_UsePause & 1) SpinPause(); |
1944 if (Knob_UsePause & 1) SpinPause(); |
1944 } |
1945 } |