From f0a89c5d8e00609db6a25b69dab04a1c955b23c5 Mon Sep 17 00:00:00 2001 From: Patricio Chilano Mateo Date: Fri, 10 Jan 2025 15:27:09 +0000 Subject: [PATCH] 8310340: assert(_thread->is_interp_only_mode() || stub_caller) failed: expected a stub-caller Reviewed-by: sspitsyn Backport-of: ea49537726db6530f0ddcc04d9938df3d6d18250 --- src/hotspot/share/prims/jvmtiEventController.cpp | 2 +- src/hotspot/share/runtime/continuationFreezeThaw.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hotspot/share/prims/jvmtiEventController.cpp b/src/hotspot/share/prims/jvmtiEventController.cpp index df14047e700..32d691a5793 100644 --- a/src/hotspot/share/prims/jvmtiEventController.cpp +++ b/src/hotspot/share/prims/jvmtiEventController.cpp @@ -598,7 +598,7 @@ JvmtiEventControllerPrivate::recompute_thread_enabled(JvmtiThreadState *state) { } // compute interp_only mode bool should_be_interp = (any_env_enabled & INTERP_EVENT_BITS) != 0 || has_frame_pops; - bool is_now_interp = state->is_interp_only_mode(); + bool is_now_interp = state->is_interp_only_mode() || state->is_pending_interp_only_mode(); if (should_be_interp != is_now_interp) { if (should_be_interp) { diff --git a/src/hotspot/share/runtime/continuationFreezeThaw.cpp b/src/hotspot/share/runtime/continuationFreezeThaw.cpp index a6c8e64e55e..ccbcaf452af 100644 --- a/src/hotspot/share/runtime/continuationFreezeThaw.cpp +++ b/src/hotspot/share/runtime/continuationFreezeThaw.cpp @@ -2603,6 +2603,7 @@ void ThawBase::recurse_thaw_compiled_frame(const frame& hf, frame& caller, int n || (stub_caller && f.cb()->as_nmethod()->is_marked_for_deoptimization())) { // The caller of the safepoint stub when the continuation is preempted is not at a call instruction, and so // cannot rely on nmethod patching for deopt. + assert(_thread->is_interp_only_mode() || stub_caller, "expected a stub-caller"); log_develop_trace(continuations)("Deoptimizing thawed frame"); DEBUG_ONLY(ContinuationHelper::Frame::patch_pc(f, nullptr));