< prev index next >

src/hotspot/share/runtime/safepointMechanism.cpp

Print this page
rev 53592 : 8218145: block_if_requested is not proper inlined due to size
Reviewed-by:

@@ -81,10 +81,27 @@
     log_info(os)("SafePoint Polling address: " INTPTR_FORMAT, p2i(polling_page));
     os::set_polling_page((address)(polling_page));
   }
 }
 
+void SafepointMechanism::block_if_requested_slow(JavaThread *thread) {
+  if (uses_thread_local_poll()) {
+    // local poll already checked
+    if (global_poll()) {
+      SafepointSynchronize::block(thread);
+    }
+    if (thread->has_handshake()) {
+      thread->handshake_process_by_self();
+    }
+  } else {
+    // If we don't have per thread poll this could a handshake or a safepoint
+    if (global_poll()) {
+      SafepointSynchronize::block(thread);
+    }
+  }
+}
+
 void SafepointMechanism::initialize_header(JavaThread* thread) {
   disarm_local_poll(thread);
 }
 
 void SafepointMechanism::initialize() {
< prev index next >