< prev index next >
src/hotspot/share/runtime/safepointMechanism.inline.hpp
Print this page
rev 53592 : 8218145: block_if_requested is not proper inlined due to size
Reviewed-by:
@@ -53,32 +53,15 @@
} else {
return global_poll();
}
}
-void SafepointMechanism::block_if_requested_local_poll(JavaThread *thread) {
- 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();
- }
- }
-}
-
void SafepointMechanism::block_if_requested(JavaThread *thread) {
- if (uses_thread_local_poll()) {
- block_if_requested_local_poll(thread);
- } else {
- // If we don't have per thread poll this could a handshake or a safepoint
- if (global_poll()) {
- SafepointSynchronize::block(thread);
- }
+ if (uses_thread_local_poll() && !SafepointMechanism::local_poll_armed(thread)) {
+ return;
}
+ block_if_requested_slow(thread);
}
void SafepointMechanism::arm_local_poll(JavaThread* thread) {
thread->set_polling_page(poll_armed_value());
}
< prev index next >