DTrace @ JavaOne 2007

This year, Jarod Jenson and I gave an updated version of our DTrace for Java (technology-based applications) talk:

The biggest new feature that we demonstrated is the forthcoming Java Statically-Defined Tracing (JSDT) which will allow developers to embed stable probes in their code as we can do today in the kernel with SDT probes and in C and C++ applications with USDT probes. While you can already trace Java applications (and C and C++ applications), static probes let the developer embed stable and semantically rich points of instrumentation that allow the user to examine the application without needing to understand its implementation. The Java version of this is so new I had literally never seen it until Jarod gave a demonstration during our talk. The basic idea is that you can define a new probe by constructing a USDTProbe instance specifying the provider, function, probe name, and argument signature:

    sun.dtrace.USDTProbe myprobe = new sun.dtrace.USDTProbe("myprovider", "myfunc", "myprobe", "ssl");

To fire the probe, you invoke the Call() method on the instance, and pass in the appropriate arguments.

Attendance was great, and we talked to a lot of people who had attended last year and had been getting mileage out of DTrace for Java. Next year, we're hoping to give the updated version of this talk on Tuesday (rather than Friday for once) and invite people to bring in their applications for a tune-up; we'll present the results in a case study-focussed talk on Friday.

Comments:

Hi, in your presentation are some "demo slides". Can you make the used DTrace scripts for the demos downloadable? - Thanks, Thorleif

Posted by Thorleif Wiik on May 28, 2007 at 07:16 PM PDT #

That's cool news. I've tinkered with DTrace and Java and the best I could come up with was a JNI-based version that didn't support arbitrary numbers of Probes [http://mernst.org/blog/rss.xml#SDT-probes-for-Java].

Care to share any details how this is implemented? I sense some support from the Hotspot Compilers is required.

Thanks, Matthias

Posted by Matthias Ernst on May 28, 2007 at 07:42 PM PDT #

Thorleif,
Unfortunately, Jarod was pretty much just ad-libbing -- next year we'll try to remember to save the session. For a DIY demo, check out Bryan's guide to giving a DTrace demo.

Matthias,
I'll let the author of this -- Lev Serebryakov -- provide the full explanation when things are a bit further along, but the basic idea is that the JVM (hotspot) ships a bundle of helper DOF (D Object Format) to the kernel. The DOF describes the providers and probes; the kernel makes those available through the DTrace framework.

Posted by Adam Leventhal on May 30, 2007 at 03:20 AM PDT #

Post a Comment:
Comments are closed for this entry.
About

Adam Leventhal, Fishworks engineer

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today