< prev index next >

src/hotspot/share/runtime/thread.cpp

Print this page
rev 47413 : Introduce SafepointMechanism

@@ -75,10 +75,11 @@
 #include "runtime/mutexLocker.hpp"
 #include "runtime/objectMonitor.hpp"
 #include "runtime/orderAccess.inline.hpp"
 #include "runtime/osThread.hpp"
 #include "runtime/safepoint.hpp"
+#include "runtime/safepointMechanism.inline.hpp"
 #include "runtime/sharedRuntime.hpp"
 #include "runtime/statSampler.hpp"
 #include "runtime/stubRoutines.hpp"
 #include "runtime/sweeper.hpp"
 #include "runtime/task.hpp"

@@ -2370,15 +2371,11 @@
     thread->set_thread_state(state);
 
     InterfaceSupport::serialize_thread_state_with_handler(thread);
   }
 
-  if (SafepointSynchronize::do_call_back()) {
-    // If we are safepointing, then block the caller which may not be
-    // the same as the target thread (see above).
-    SafepointSynchronize::block(curJT);
-  }
+  SafepointMechanism::block_if_requested(curJT);
 
   if (thread->is_deopt_suspend()) {
     thread->clear_deopt_suspend();
     RegisterMap map(thread, false);
     frame f = thread->last_frame();
< prev index next >