RFR: 8364343: Virtual Thread transition management needs to be independent of JVM TI [v4]

Patricio Chilano Mateo pchilanomate at openjdk.org
Thu Nov 20 23:10:52 UTC 2025


On Wed, 19 Nov 2025 19:01:18 GMT, Patricio Chilano Mateo <pchilanomate at openjdk.org> wrote:

>> src/java.base/share/native/libjava/VirtualThread.c line 38:
>> 
>>> 36:     { "startFinalTransition",     "()V",  (void *)&JVM_VirtualThreadEnd },
>>> 37:     { "startTransition",          "(Z)V", (void *)&JVM_VirtualThreadStartTransition },
>>> 38:     { "endTransition",            "(Z)V", (void *)&JVM_VirtualThreadEndTransition },
>> 
>> I wonder if JVM_VirtualThreadStart and JVM_VirtualThreadEnd should be renamed to have EndFirstTransition and StartFinalTransaction in the names so it's easy to follow through from the Java code down to MountUnmountDisabler::start_transition/end_transition.
>
> How about removing these methods and just have an extra boolean parameter in `start/endTransition`?
> https://github.com/pchilano/jdk/compare/JDK-8364343...pchilano:jdk:startEndTransitionsOnly

I renamed the methods as suggested. I remembered that we separated ThreadStart/ThreadEnd in 8306028 for future improvements related to JVMTI. Not sure if that’s still relevant but in any case probably better to leave that discussion for a separate bug.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28361#discussion_r2547987864


More information about the graal-dev mailing list