< prev index next >

src/hotspot/share/jvmci/jvmciCodeInstaller.cpp

Print this page
rev 47589 : Introduce SafepointMechanism
rev 47591 : Add Thread Local handshakes and thread local polling

@@ -35,10 +35,11 @@
 #include "jvmci/jvmciCompilerToVM.hpp"
 #include "jvmci/jvmciRuntime.hpp"
 #include "oops/oop.inline.hpp"
 #include "oops/objArrayOop.inline.hpp"
 #include "runtime/javaCalls.hpp"
+#include "runtime/safepointMechanism.inline.hpp"
 #include "utilities/align.hpp"
 
 // frequently used constants
 // Allocate them with new so they are never destroyed (otherwise, a
 // forced exit could destroy these objects while they are still in

@@ -852,13 +853,14 @@
     } else {
       JVMCI_ERROR_OK("unexpected site subclass: %s", site->klass()->signature_name());
     }
     last_pc_offset = pc_offset;
 
-    if (SafepointSynchronize::do_call_back()) {
+    JavaThread* thread = JavaThread::current();
+    if (SafepointMechanism::poll(thread)) {
       // this is a hacky way to force a safepoint check but nothing else was jumping out at me.
-      ThreadToNativeFromVM ttnfv(JavaThread::current());
+      ThreadToNativeFromVM ttnfv(thread);
     }
   }
 
 #ifndef PRODUCT
   if (comments() != NULL) {
< prev index next >