RFR: 8357650: ThreadSnapshot to take snapshot of thread for thread dumps [v7]
Kevin Walls
kevinw at openjdk.org
Fri May 30 14:01:57 UTC 2025
On Thu, 29 May 2025 18:21:11 GMT, Alex Menkov <amenkov at openjdk.org> wrote:
>> This is first (hotspot) part of the update for `HotSpotDiagnosticMXBean.dumpThreads` and `jcmd Thread.dump_to_file` to include lock information in thread dumps (JDK-8356870).
>> The update has been split into parts to simplify reviewing.
>> The fix contains an implementation of `jdk.internal.vm.ThreadSnapshot` class to gather required information about a thread.
>> Second (dependent) part includes changes in `HotSpotDiagnosticMXBean.dumpThreads`/`jcmd Thread.dump_to_file`, spec updates and tests for the functionality.
>>
>> Testing: new `HotSpotDiagnosticMXBean.dumpThreads`/`jcmd Thread.dump_to_file` functionality was tested in loom repo;
>> sanity tier1 (this fix only)
>
> Alex Menkov has updated the pull request incrementally with one additional commit since the last revision:
>
> typo
Just to be clear, the ifdef JVMTI means Thread.dump_to_file not work in a build configuration using - --enable-jvm-feature-jvmti=no ?
Currently, Thread.dump_to_file works in such configs.
I don't think this is a problem.. just thought we could spell it out.
This all looks good to me.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/25425#issuecomment-2922476663
More information about the hotspot-dev
mailing list