On Wed, 28 May 2025 12:58:49 GMT, Alan Bateman <al...@openjdk.org> wrote:
>> src/hotspot/share/prims/jvmtiThreadState.hpp line 80: >> >>> 78: // Virtual Thread Mount State Transition (VTMS transition) mechanism >>> 79: // >>> 80: class JvmtiVTMSTransitionDisabler : public AnyObj { >> >> Why this change? > > It's used by VMThreadSnapshot::get_thread_snapshot. The transition disabling > support is currently in the jvmti code. I think this is the first usage in a > handshake op that isn't supporting a JVMTI function. Maybe in the future this > could be separated. > Why this change? To be more clear about the change: We need JvmtiVTMSTransitionDisabler for virtual threads only, for platform threads handshake is enough. And currently for platform threads JvmtiVTMSTransitionDisabler disables all mount/unmount transitions (and I'd prefer to avoid this). So we cannot create JvmtiVTMSTransitionDisabler on a stack (this is standard use scenario), but need to create it conditionally by `new`/`delete` ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/25425#discussion_r2112491335