JVM_DumpAllStacks in jvm.h

David Holmes david.holmes at oracle.com
Mon Mar 12 11:27:41 UTC 2018

On 12/03/2018 7:30 PM, Langer, Christoph wrote:
> Hi,
> I have a question to the experts:
> While looking around in the hotspot source code to understand the ways of printing thread dumps and its implementation, I stumbled over JVM_DumpAllStacks from jvm.h. Grepping the OpenJDK repo shows me that this function apparently is not used at all. Would it be a candidate for removal? If so, shall I file a bug and post a patch for its removal?

As Alan said it's used by Oracle JDK. Not sure if it was also used 
elsewhere previously.

> Alternatively, maybe I can build on this function. I'm looking for a way to trigger thread dumps out of Java code in java.base. Is there any elegant way to do this? Maybe you have some suggestions...?

Depends what you mean exactly. We already have 
Thread.getAllStackTraces(); java.management.ThreadMXBean.dumpAllThreads();


> Thanks & Best regards
> Christoph

More information about the hotspot-runtime-dev mailing list