src/hotspot/share/jvmci/jvmciCodeInstaller.cpp
changeset 47881 0ce0ac68ace7
parent 47765 b7c7428eaab9
child 48443 8935285e8759
child 48487 abf1d797e380
--- a/src/hotspot/share/jvmci/jvmciCodeInstaller.cpp	Sat Nov 11 01:21:09 2017 +0100
+++ b/src/hotspot/share/jvmci/jvmciCodeInstaller.cpp	Thu Aug 31 10:00:28 2017 +0200
@@ -37,6 +37,7 @@
 #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
@@ -854,9 +855,10 @@
     }
     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);
     }
   }