RFR: 8369609: Continuations preempt_epilog is missing a call to invalidate_jvmti_stack [v2]
Serguei Spitsyn
sspitsyn at openjdk.org
Wed Oct 22 02:00:11 UTC 2025
On Mon, 20 Oct 2025 21:59:40 GMT, Patricio Chilano Mateo <pchilanomate at openjdk.org> wrote:
>> Serguei Spitsyn has updated the pull request incrementally with one additional commit since the last revision:
>>
>> review: remove now unneeded call to invalidate_jvmti_stack
>
> 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.
Yes, I had in mind but forgot to remove the call to `invalidate_jvmti_stack()` from `jvmti_yield_cleanup()`. I've pushed the update now.
> Also I wonder if this call to invalidate_jvmti_stack should just be moved to JvmtiVTMSTransitionDisabler::VTMS_unmount_end instead.
Unfortunately, this is not going to work for plain/pure continuations as `mount/unmount` code path does not work for them.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27878#discussion_r2450180606
More information about the hotspot-runtime-dev
mailing list