Integrated: 8356870: HotSpotDiagnosticMXBean.dumpThreads and jcmd Thread.dump_to_file updates

Alan Bateman alanb at openjdk.org
Wed Jun 4 04:13:31 UTC 2025


On Sat, 24 May 2025 06:57:56 GMT, Alan Bateman <alanb at openjdk.org> wrote:

> Updates the thread dump generated by HotSpotDiagnosticMXBean.dumpThreads and jcmd Thread.dump_to_file to include thread state and lock information. Also update the HotSpotDiagnosticMXBean.dumpThreads API description to link to a description of the JSON format dump as that format is intended to be parseable/read by tools.
> 
> This PR is dependent on [pull/25425](https://github.com/openjdk/jdk/pull/25425). As noted in that PR, the changes accumulated in the loom repo, and have been split up to make it easier to review.
> 
> The changes include some re-implementation of ThreadDumper. This is because it used PrintStream and didn't fail if there was an I/O error, e.g. file system full. Furthermore, the indentation to pretty print the json was fragile and hard to maintain so this is changed to use a supporting writer class to do this.
> 
> Test coverage is significantly expanded, including updating the test library that is used by several tests to parse the thread dump.
> 
> Testing: tier1-6

This pull request has now been integrated.

Changeset: f17b2bc0
Author:    Alan Bateman <alanb at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/f17b2bc06ad358933481c0e2cffd57c842bc0e76
Stats:     1668 lines in 9 files changed: 1247 ins; 121 del; 300 mod

8356870: HotSpotDiagnosticMXBean.dumpThreads and jcmd Thread.dump_to_file updates

Reviewed-by: sspitsyn, kevinw

-------------

PR: https://git.openjdk.org/jdk/pull/25429


More information about the serviceability-dev mailing list