DTrace for Java 6 on Leopard
When Java 6 for Leopard was released a few weeks ago, one thing that nobody seemed to notice was that Java now had DTrace probes on par with Java on Solaris.
What you expect is there:
With one exception: jstack doesn't appear to work. ustack works fine.
$ sudo dtrace -x jstackstrsize=2048 -n 'syscall::read:entry /execname == "java"/ { jstack(); }'
dtrace: description 'syscall::read:entry ' matched 1 probe
CPU ID FUNCTION:NAME
3 17600 read:entry
2 17600 read:entry
3 17600 read:entry
3 17600 read:entry
2 17600 read:entry
2 17600 read:entry
2 17600 read:entry
2 17600 read:entry
There should be java stack traces under each read:entry line. (This is true even with -XX:+ExtendedDTraceProbes enabled)
I used robey's scarling for my guinea pig and had a lot of fun poking around at it with dtrace.
Labels: dtrace


![[Atom Enabled]](http://saladwithsteve.com/valid-atom.png)
2 Comments:
ustack() and ustack(#) works, but ustack(#,#) fails the same way all variants of jstack() fail. it there any further information on this bug? i can't find a reference to it anywhere else.
9:12 PM
Hi Steve.
I have a question which you will hopefully be able to answer. I have a Leopard default installation with Java 6 installed. Nevertheless, the hotspot probes do not show up when I type "dtrace -l".
$ sudo dtrace -l | grep spot
$
Do you have any idea why that is? Do I need to add something to some sort of search path to enable these probes? I would greatly appreciate any help with this...
7:20 AM
Post a Comment
Links to this post:
Create a Link
<< Home