[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-serviceability-dev
Subject:    Re: output of jstack command
From:       Bernd Eckenfels <ecki () zusammenkunft ! net>
Date:       2017-05-29 18:25:28
Message-ID: HE1PR08MB27957F2D1E15F4896CF048EBFFF30 () HE1PR08MB2795 ! eurprd08 ! prod ! outlook ! com
[Download RAW message or body]

[Attachment #2 (text/plain)]

And just because nobody mentioned it, don't forget `jcmd Thread.print -l`. I had the \
impression jcmd is preferred,over the older jps/jstack/jmap gang?

Gruss
Bernd
--
http://bernd.eckenfels.net
________________________________
From: serviceability-dev <serviceability-dev-bounces@openjdk.java.net> on behalf of \
                Robbin Ehn <robbin.ehn@oracle.com>
Sent: Monday, May 29, 2017 5:33:53 PM
To: Ram Krishnan
Cc: serviceability-dev@openjdk.java.net serviceability-dev@openjdk.java.net; Ray \
                Hindman; Asif Qamar
Subject: Re: output of jstack command

Hi,

The text stream originates from:

void Threads::print_on(outputStream* st, bool print_stacks, bool internal_format, \
bool print_concurrent_locks) { in hotspot/src/share/vm/runtime/thread.cpp L4491

and jstack only forwards that to your terminal.

/Robbin

On 05/25/2017 05:07 PM, Kirk Pepperdine wrote:
> Hi Ramki,
> 
> The source for jstack is in openJDK. Feel free to create your own copy of jstack \
> where you can output the information in any format he likes. If you are suggesting \
> that the existing format be changed do be aware that there are many tools that \
> expect the current format. These have been adjusted to a change in format that was \
> introduced with Java 8. I don't see any reason why the format shouldn't include \
> information that is currently missing and is relevant. However I'd want to make \
> sure that is is relevant and important before breaking the tool chain once again. 
> I believe thread ids are already in the header. Certainly thread names are there. \
> Not sure what you mean by types of threads. 
> Kind regards,
> Kirk
> > On May 25, 2017, at 4:59 PM, Daniel D. Daugherty <daniel.daugherty@oracle.com> \
> > wrote: 
> > Adding serviceability-dev@... since jstack is a Serviceability tool.
> > 
> > I believe jstack is experimental which means the output format can
> > change at any time...
> > 
> > Dan
> > 
> > On 5/25/17 8:35 AM, Ram Krishnan wrote:
> > > Hi,
> > > 
> > > I would like to leverage the output of jstack command for extracting
> > > additional information about the type of threads, thread ids etc. Since I
> > > will be parsing the output, I need the precise format. Is there any
> > > documentation on jstack output format changes and the openjdk release(s)
> > > where the changes happened?
> > > 
> > > ​Tha​nks in advance.
> > > 
> > 
> 


[Attachment #3 (text/html)]

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: \
4pt; border-left: #800000 2px solid; } --></style> </head>
<body>
<div>
<div id="x_compose-container" itemscope="" itemtype="https://schema.org/EmailMessage" \
style="direction:ltr"> <span itemprop="creator" itemscope="" \
itemtype="https://schema.org/Organization"><span itemprop="name"></span></span> <div>
<div style="direction:ltr">And just because nobody mentioned it, don't forget `jcmd \
Thread.print -l`. I had the impression jcmd is preferred,over the older \
jps/jstack/jmap gang?</div> <div><br>
</div>
<div class="x_acompli_signature">Gruss<br>
Bernd<br>
-- <br>
<a dir="ltr" href="http://bernd.eckenfels.net">http://bernd.eckenfels.net</a></div>
</div>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" \
style="font-size:11pt"><b>From:</b> serviceability-dev \
&lt;serviceability-dev-bounces@openjdk.java.net&gt; on behalf of Robbin Ehn \
&lt;robbin.ehn@oracle.com&gt;<br> <b>Sent:</b> Monday, May 29, 2017 5:33:53 PM<br>
<b>To:</b> Ram Krishnan<br>
<b>Cc:</b> serviceability-dev@openjdk.java.net serviceability-dev@openjdk.java.net; \
Ray Hindman; Asif Qamar<br> <b>Subject:</b> Re: output of jstack command</font>
<div>&nbsp;</div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Hi,<br>
<br>
The text stream originates from:<br>
<br>
void Threads::print_on(outputStream* st, bool print_stacks, bool internal_format, \
bool print_concurrent_locks) {<br> in hotspot/src/share/vm/runtime/thread.cpp \
L4491<br> <br>
and jstack only forwards that to your terminal.<br>
<br>
/Robbin<br>
<br>
On 05/25/2017 05:07 PM, Kirk Pepperdine wrote:<br>
&gt; Hi Ramki,<br>
&gt; <br>
&gt; The source for jstack is in openJDK. Feel free to create your own copy of jstack \
where you can output the information in any format he likes. If you are suggesting \
that the existing format be changed do be aware that there are many tools that expect \
the current  format. These have been adjusted to a change in format that was \
introduced with Java 8. I don't see any reason why the format shouldn't include \
information that is currently missing and is relevant. However I'd want to make sure \
that is is relevant and important  before breaking the tool chain once again.<br>
&gt; <br>
&gt; I believe thread ids are already in the header. Certainly thread names are \
there. Not sure what you mean by types of threads.<br> &gt; <br>
&gt; Kind regards,<br>
&gt; Kirk<br>
&gt;&gt; On May 25, 2017, at 4:59 PM, Daniel D. Daugherty \
&lt;daniel.daugherty@oracle.com&gt; wrote:<br> &gt;&gt;<br>
&gt;&gt; Adding serviceability-dev@... since jstack is a Serviceability tool.<br>
&gt;&gt;<br>
&gt;&gt; I believe jstack is experimental which means the output format can<br>
&gt;&gt; change at any time...<br>
&gt;&gt;<br>
&gt;&gt; Dan<br>
&gt;&gt;<br>
&gt;&gt; On 5/25/17 8:35 AM, Ram Krishnan wrote:<br>
&gt;&gt;&gt; Hi,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I would like to leverage the output of jstack command for extracting<br>
&gt;&gt;&gt; additional information about the type of threads, thread ids etc. Since \
I<br> &gt;&gt;&gt; will be parsing the output, I need the precise format. Is there \
any<br> &gt;&gt;&gt; documentation on jstack output format changes and the openjdk \
release(s)<br> &gt;&gt;&gt; where the changes happened?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; ​Tha​nks in advance.<br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt; <br>
</div>
</span></font>
</body>
</html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic