RFR: 8369609: Continuations preempt_epilog is missing a call to invalidate_jvmti_stack

Patricio Chilano Mateo pchilanomate at openjdk.org
Mon Oct 20 22:05:03 UTC 2025


On Fri, 17 Oct 2025 20:05:24 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:

> This is a simple fix to add missing call to `invalidate_jvmti_stack()` to the `freeze_epilog(ContinuationWrapper& cont)`.
> 
> Testing:
> - TBD: Run mach5 tiers 1-6

Thanks for fixing this Serguei.

src/hotspot/share/runtime/continuationFreezeThaw.cpp line 1689:

> 1687:   log_develop_debug(continuations)("=== End of freeze cont ### #" INTPTR_FORMAT, cont.hash());
> 1688: 
> 1689:   JVMTI_ONLY(invalidate_jvmti_stack(JavaThread::current()));

Why not directly in `preempt_epilog`? Is it to cover the freeze fast case too? If that’s the case we should remove the call to `invalidate_jvmti_stack` from `jvmti_yield_cleanup` to avoid calling it twice for the freeze slow case. Also I wonder if this call to `invalidate_jvmti_stack` should just be moved to `JvmtiVTMSTransitionDisabler::VTMS_unmount_end` instead.

-------------

PR Review: https://git.openjdk.org/jdk/pull/27878#pullrequestreview-3358066574
PR Review Comment: https://git.openjdk.org/jdk/pull/27878#discussion_r2446228791


More information about the hotspot-runtime-dev mailing list