jdwp virtual threads dump?

Alan Bateman Alan.Bateman at oracle.com
Tue Jun 27 16:24:13 UTC 2023


On 27/06/2023 16:58, Egor Ushakov wrote:
> Hi all,
>
> is there a way for a debugger to create a virtual threads dump via jdwp?

Right now, the only way to do this via JDWP is use the 
ObjectReference/InvokeMethod command (or JDI invokeMethod at the API 
level) to invoke HotSpotDiagnosticMXBean dumpThreads to generate a 
thread dump to a file. So not terrible when the debugger and target VM 
are on the same system or at least have access to the same file system. 
In the future, JDWP + JDI will require updates to define new 
commands/methods to find threads, the VirtualMachine/AllThreads command 
is not the right solution for virtual threads.

BTW: What does IDEA "Get Thread Dump" (camera icon) use?

-Alan


More information about the loom-dev mailing list