JVM_DumpAllStacks in jvm.h

Langer, Christoph christoph.langer at sap.com
Mon Mar 12 15:19:09 UTC 2018


Thanks, David and Alan.

Ok, so, I won't touch JVM_DumpAllStacks  and maybe I'll even use it. I'm looking for some facility that can simply dump the current threads to stdout/stderr. Just as JVM_DumpAllStacks does ��

Best regards
Christoph

> -----Original Message-----
> From: David Holmes [mailto:david.holmes at oracle.com]
> Sent: Montag, 12. März 2018 12:28
> To: Langer, Christoph <christoph.langer at sap.com>; Hotspot dev runtime
> <hotspot-runtime-dev at openjdk.java.net>
> Subject: Re: JVM_DumpAllStacks in jvm.h
> 
> 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();
> 
> David
> -----
> 
> 
> > Thanks & Best regards
> > Christoph
> >


More information about the hotspot-runtime-dev mailing list