RFR: 8357650: ThreadSnapshot to take snapshot of thread for thread dumps [v2]
Alex Menkov
amenkov at openjdk.org
Thu May 29 08:14:53 UTC 2025
On Thu, 29 May 2025 05:52:53 GMT, David Holmes <dholmes at openjdk.org> wrote:
>>> 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 can create JvmtiVTMSTransitionDisabler on 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.
No. Sorry, my comment had a error (I updated it). This change just allow `JvmtiVTMSTransitionDisabler` to be heap allocated.
Class `TransitionDisabler` in `VMThreadSnapshot::get_thread_snapshot` (line 1444 in threadService.cpp) is kind of smart pointer to `JvmtiVTMSTransitionDisabler`
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25425#discussion_r2113448661
More information about the hotspot-dev
mailing list