You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, in Native Image, you can use jcmd to dump all virtual thread stacks using Thread.dump_to_file (See docs here). This is only in JDK 24 though (early access)
There are also already several JFR events which expose virtual thread information as of GraalVM for JDK 23 (docs here)
jdk.VirtualThreadEnd
jdk.VirtualThreadPinned
jdk.VirtualThreadStart
We're currently missing the jdk.VirtualThreadSubmitFailed JFR event. I'm not sure how useful this event is though. I can work on adding support for this if you'd like.
Additionally, JFR treats virtual threads the same as platform threads. So all of the existing JFR events we support also provide information on what virtual threads are doing. For example you can get jdk.JavaMonitorEnter events that are emitted from virtual threads. This tells you when a virtual thread is blocked at a monitor.
@patpatpat123 Are you using ThreadMXBean to generate those graphs? ThreadMXBean is currently only partially implemented in Native Image. I'm working on completing it, but I keep getting side-tracked by other tasks. In any case, it seems ThreadMXBean does not support virtual threads (see docs here).
If you have trouble using the above mentioned features please let me know, or file a bug report. If there are any other specific metrics that are missing from Native Image, please let me know as well.
Hello team,
Thread observability is key for performance issue troubleshooting, production reliability, etc.
The jvm exposes metrics to help, which is great.
Since 21, there is the very cool project Loom.
However, the current set of metrics does not show anything related to project Loom and the virtual thread itself.
Would it be possible to provide assistance exposing metrics related to virtual threads?
Thank you
The text was updated successfully, but these errors were encountered: