RFR: 8356870: HotSpotDiagnosticMXBean.dumpThreads and jcmd Thread.dump_to_file updates [v3]
Alan Bateman
alanb at openjdk.org
Thu May 29 10:15:20 UTC 2025
> 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
Alan Bateman has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision:
- Temp fixed until fixed in pull/25425
- Sync up from loom repo, includes review comments
- Merge branch 'pull/25425' into JDK-8356870
- Merge branch 'pull/25425' into JDK-8356870
- Initial commit
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/25429/files
- new: https://git.openjdk.org/jdk/pull/25429/files/52bb3de7..04f559fb
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=25429&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=25429&range=01-02
Stats: 30027 lines in 609 files changed: 20669 ins; 6244 del; 3114 mod
Patch: https://git.openjdk.org/jdk/pull/25429.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/25429/head:pull/25429
PR: https://git.openjdk.org/jdk/pull/25429
More information about the serviceability-dev
mailing list