RFR: 8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning [v2]

Patricio Chilano Mateo pchilanomate at openjdk.org
Thu Nov 7 00:43:07 UTC 2024


On Thu, 7 Nov 2024 00:37:53 GMT, Patricio Chilano Mateo <pchilanomate at 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


More information about the core-libs-dev mailing list