< prev index next >

src/hotspot/share/interpreter/interpreterRuntime.cpp

Print this page
@@ -53,10 +53,11 @@
  #include "oops/symbol.hpp"
  #include "prims/jvmtiExport.hpp"
  #include "prims/methodHandles.hpp"
  #include "prims/nativeLookup.hpp"
  #include "runtime/atomic.hpp"
+ #include "runtime/continuation.hpp"
  #include "runtime/deoptimization.hpp"
  #include "runtime/fieldDescriptor.inline.hpp"
  #include "runtime/frame.inline.hpp"
  #include "runtime/handles.inline.hpp"
  #include "runtime/icache.hpp"

@@ -1101,10 +1102,14 @@
    // this is no longer needed.
  
    // JRT_END does an implicit safepoint check, hence we are guaranteed to block
    // if this is called during a safepoint
  
+   if (java_lang_VirtualThread::notify_jvmti_events()) {
+     JvmtiExport::check_suspend_at_safepoint(current);
+   }
+ 
    if (JvmtiExport::should_post_single_step()) {
      // This function is called by the interpreter when single stepping. Such single
      // stepping could unwind a frame. Then, it is important that we process any frames
      // that we might return into.
      StackWatermarkSet::before_unwind(current);

@@ -1222,11 +1227,11 @@
    JvmtiExport::post_method_exit(current, last_frame.method(), last_frame.get_frame());
  JRT_END
  
  JRT_LEAF(int, InterpreterRuntime::interpreter_contains(address pc))
  {
-   return (Interpreter::contains(pc) ? 1 : 0);
+   return (Interpreter::contains(Continuation::get_top_return_pc_post_barrier(JavaThread::current(), pc)) ? 1 : 0);
  }
  JRT_END
  
  
  // Implementation of SignatureHandlerLibrary
< prev index next >