jdwp virtual threads dump?

Egor Ushakov egor.ushakov at jetbrains.com
Tue Jun 27 16:52:59 UTC 2023


Thanks Alan!

for now there's no special support for virtual threads in IDEA, that's 
why I'm asking :)

"Get Thread Dump" action gathers the information from the threads list 
provided by com.sun.jdi.VirtualMachine#allThreads.

-Egor

On 27.06.2023 18:24, Alan Bateman wrote:
> 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