RFR: 8357650: ThreadSnapshot to take snapshot of thread for thread dumps
Alex Menkov
amenkov at openjdk.org
Tue May 27 22:50:53 UTC 2025
On Sat, 24 May 2025 00:17:26 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)
- moved implementation from javaClasses to threadServices;
- used ThreadService OopStorage instead of vm_global;
- fixed minimalVM build (Thread.dump_to_file command is not registered for builds without JVMTI);
-------------
PR Comment: https://git.openjdk.org/jdk/pull/25425#issuecomment-2914359734
More information about the hotspot-dev
mailing list