On Thu, 7 Nov 2024 00:37:53 GMT, Patricio Chilano Mateo <pchilanom...@openjdk.org> wrote:
>> Great, I applied the suggested simplification. I had to update test >> `VThreadEventTest.java` to check the stack during the mount/unmount events >> to only count the real cases. This is because now we are getting a variable >> number of spurious mount/unmount events (freeze failed) generated during the >> initialization of some class (`VirtualThreadEndEvent`) after the task is >> finished. > >> So, it feels like it should not be a problem. I'm thinking if adding an >> assert at the VTMS transition end would help. >> > The problem here is that for monitorenter the top frame will not be a native > method, so the bail out will not happen as it would when unmounting from Java. > the call to java_lang_Thread::set_is_in_VTMS_transition()is not needed in > JvmtiUnmountBeginMark > Why is not needed? I guess you meant to say we should use `JvmtiVTMSTransitionDisabler::set_is_in_VTMS_transition()` which does both? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/21565#discussion_r1831898891