RFR: 8337199: Add jcmd Thread.vthread_scheduler and Thread.vthread_pollers diagnostic commands

Alan Bateman alanb at openjdk.org
Thu Nov 28 10:25:18 UTC 2024


Adds `jcmd <pid> Thread.vthread_scheduler` to print the virtual thread scheduler and `jcmd <pid> Thread.vthread_pollers` to print the I/O pollers that support virtual threads doing blocking network I/O operations.

This is a subset of the diagnostics that we've had in the loom repo for a long time. @larry-cable proposed a PR recently ([pull/22121](https://github.com/openjdk/jdk/pull/22121)) to bring a version of same into main line but it was based on an older proposal. This new PR supplants that effort.

The jtreg failure handler is updated to execute Thread.vthread_scheduler, useful capture when a test fails or times out.

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

Commit messages:
 - Improve vthread_pollers output
 - Merge branch 'master' into JDK-8337199
 - Initial commit

Changes: https://git.openjdk.org/jdk/pull/22414/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=22414&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8337199
  Stats: 405 lines in 11 files changed: 400 ins; 1 del; 4 mod
  Patch: https://git.openjdk.org/jdk/pull/22414.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/22414/head:pull/22414

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


More information about the core-libs-dev mailing list