--- a/src/hotspot/share/runtime/safepointMechanism.inline.hpp Tue Jun 19 09:43:53 2018 +0200
+++ b/src/hotspot/share/runtime/safepointMechanism.inline.hpp Tue Jun 19 10:57:13 2018 +0200
@@ -59,12 +59,11 @@
bool armed = local_poll_armed(thread); // load acquire, polling page -> op / global state
if(armed) {
// We could be armed for either a handshake operation or a safepoint
+ if (global_poll()) {
+ SafepointSynchronize::block(thread);
+ }
if (thread->has_handshake()) {
thread->handshake_process_by_self();
- } else {
- if (global_poll()) {
- SafepointSynchronize::block(thread);
- }
}
}
}