jstack, profilers and other tools

Alan Bateman Alan.Bateman at oracle.com
Wed Jul 13 11:16:52 UTC 2022


On 13/07/2022 11:56, Egor Ushakov wrote:
> This is actually interesting: how is it expected for a debugger to get 
> the new thread dump?
> It is not exposed through jdwp. And in many cases this is the only 
> communication way with a process during debugging.
>

The debugger APIs will probably need to expand in time, esp. for 
structured concurrency, but we've limited the API additions for now 
until there is more feedback and real world usage.

For the thread dump, the debugger can use the JDI invokeMethod to invoke 
com.sun.management.HotSpotDiagnosticMXBean.dumpThreads in the target VM. 
This of course assumes the debugger and target VM have access to the 
same file system but that shouldn't be too bad for most environments.

-Aan


More information about the loom-dev mailing list