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

List:       openjdk-serviceability-dev
Subject:    Fwd: system profilers and incomplete stacks
From:       Roland Westrelin <roland.westrelin () oracle ! com>
Date:       2014-06-16 10:47:46
Message-ID: F5FE71D4-D638-44D5-95D7-E09669A67AD8 () oracle ! com
[Download RAW message or body]

Forwarding to serviceability alias where this question belongs I think.

Begin forwarded message:

> From: Brendan Gregg <brendan.d.gregg@gmail.com>
> Subject: system profilers and incomplete stacks
> Date: June 12, 2014 at 7:15:54 PM GMT+2
> To: hotspot-compiler-dev@openjdk.java.net
> 
> G'Day,
> 
> Is there a way to run hotspot so that a system profiler (eg, DTrace, or Linux \
> perf_events) can measure complete stacks? I often get incomplete, partial stacks, \
> with one or a few frames only. I'm not worried about symbols right now, what I'd \
> like is to walk stacks all the way down to thread start. 
> I've been browsing the hotspot code, but haven't found out how yet. I suspect it's \
> related to Java optimized frames, and has ditched the frame pointer. I was looking \
> for an equivalent -fno-omit-frame-pointer option. 
> Here's an example:
> 
> # dtrace -n 'profile-99 /execname == "java"/ { @[jstack(100, 8000)] = count(); }'
> [...]
> org/mozilla/javascript/
> ScriptableObject.createSlot(Ljava/lang/String;II)Lorg/mozilla/javascript/ScriptableObject$Slot;*
>  0x884acce8200002da
> 1
> 
> sun/nio/ch/SocketChannelImpl.read(Ljava/nio/ByteBuffer;)I*
> 0xffffffff20007f4b
> 1
> 
> org/mozilla/javascript/ScriptRuntime.newObjectLiteral([Ljava/lang/Object;[Ljava/lang \
> /Object;[ILorg/mozilla/javascript/Context;Lorg/mozilla/javascript/Scriptable;)Lorg/mozilla/javascript/Scriptable;*
>  0xa20000041
> 1
> [...]
> 
> I see similar incomplete stacks with Linux perf_events. Oracle JDKs from 6 to 8, \
> and OpenJDK. 
> thanks,
> 
> Brendan
> -- 
> http://www.brendangregg.com


[Attachment #3 (unknown)]

<html><head><meta http-equiv="Content-Type" content="text/html \
charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: \
space; -webkit-line-break: after-white-space;">Forwarding to serviceability alias \
where this question belongs I think.<div><br></div><div>Begin forwarded \
message:<br><div><br class="Apple-interchange-newline"><blockquote type="cite"><div \
style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: \
0px;"><span style="font-family:'Helvetica'; color:rgba(0, 0, 0, 1.0);"><b>From: \
</b></span><span style="font-family:'Helvetica';">Brendan Gregg &lt;<a \
href="mailto:brendan.d.gregg@gmail.com">brendan.d.gregg@gmail.com</a>&gt;<br></span></div><div \
style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: \
0px;"><span style="font-family:'Helvetica'; color:rgba(0, 0, 0, 1.0);"><b>Subject: \
</b></span><span style="font-family:'Helvetica';"><b>system profilers and incomplete \
stacks</b><br></span></div><div style="margin-top: 0px; margin-right: 0px; \
margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; \
color:rgba(0, 0, 0, 1.0);"><b>Date: </b></span><span \
style="font-family:'Helvetica';">June 12, 2014 at 7:15:54 PM \
GMT+2<br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: \
0px; margin-left: 0px;"><span style="font-family:'Helvetica'; color:rgba(0, 0, 0, \
1.0);"><b>To: </b></span><span style="font-family:'Helvetica';"><a \
href="mailto:hotspot-compiler-dev@openjdk.java.net">hotspot-compiler-dev@openjdk.java.net</a><br></span></div><br><div><div \
dir="ltr"><div>G'Day,<br><br></div>Is there a way to run hotspot so that a system \
profiler (eg, DTrace, or Linux perf_events) can measure complete stacks? I often get \
incomplete, partial stacks, with one or a few frames only. I'm not worried about \
symbols right now, what I'd like is to walk stacks all the way down to thread \
start.<br>

<br>I've been browsing the hotspot code, but haven't found out how yet. I suspect \
it's related to Java optimized frames, and has ditched the frame pointer. I was \
looking for an equivalent -fno-omit-frame-pointer option.<br clear="all"> \
<div><div><br></div><div>Here's an example:<br><br># dtrace -n 'profile-99 /execname \
== "java"/ { @[jstack(100, 8000)] = count(); \
}'<br>[...]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
org/mozilla/javascript/<div>ScriptableObject.createSlot(Ljava/lang/String;II)Lorg/mozilla/javascript/ScriptableObject$Slot;*<br>


&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
0x884acce8200002da<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
1<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
sun/nio/ch/SocketChannelImpl.read(Ljava/nio/ByteBuffer;)I*<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
0xffffffff20007f4b<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
1<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
org/mozilla/javascript/ScriptRuntime.newObjectLiteral([Ljava/lang/Object;[Ljava/lang/O \
bject;[ILorg/mozilla/javascript/Context;Lorg/mozilla/javascript/Scriptable;)Lorg/mozilla/javascript/Scriptable;*<br>


&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
0xa20000041<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
1<br>[...]<br><br></div><div>I see similar incomplete stacks with Linux perf_events. \
Oracle JDKs from 6 to 8, and \
OpenJDK.<br></div><br></div><div>thanks,<br><br></div><div>Brendan<br> </div><div>-- \
<br><div dir="ltr"><a href="http://www.brendangregg.com/" \
target="_blank">http://www.brendangregg.com</a><br> </div>
</div></div></div>
</div></blockquote></div><br></div></body></html>



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

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