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

Patricio Chilano Mateo pchilanomate at openjdk.org
Tue Nov 25 19:58:47 UTC 2025


On Fri, 21 Nov 2025 01:01:48 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> src/hotspot/share/runtime/mountUnmountDisabler.cpp line 162:
>> 
>>> 160:   // be executed once we go back to Java. If this is an unmount, the handshake that the
>>> 161:   // disabler executed against this carrier thread already provided the needed synchronization.
>>> 162:   // This matches the release fence in xx_enable_for_one()/xx_enable_for_all().
>> 
>> Subtle. Do we have comments where the fences are to ensure people realize the fence is serving this purpose?
>
> I also forgot to suggest a wording change: say "pairs with" rather than "matches". Reading back through I realize now I have misunderstood many of these comments.

Changed to `pairs with`. I rewrote the comments so hopefully they are more clear now. I also added a comment in `VirtualThread.mount/unmount` where the memory barriers should be.

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

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


More information about the graal-dev mailing list