system profilers and incomplete stacks
Brendan Gregg
brendan.d.gregg at gmail.com
Thu Jun 12 17:15:54 UTC 2014
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20140612/5f10bb5b/attachment.html>
More information about the hotspot-compiler-dev
mailing list