src/hotspot/share/runtime/safepointMechanism.inline.hpp
changeset 50626 9fdfe5ca0e5e
parent 47881 0ce0ac68ace7
child 50921 7f462e8383f6
--- 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);
-      }
     }
   }
 }