RFR: 8357650: ThreadSnapshot to take snapshot of thread for thread dumps [v2]
David Holmes
dholmes at openjdk.org
Thu May 29 05:55:53 UTC 2025
On Wed, 28 May 2025 18:16:20 GMT, Alex Menkov <amenkov at openjdk.org> wrote:
>> 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`
So `JvmtiVTMSTransitionDisabler` is no longer a RAII helper type? That sounds a backward step in usability.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25425#discussion_r2113258435
More information about the hotspot-dev
mailing list