Adam Leventhal's blog

Close this search box.

DTrace @ JavaOne 2007

May 28, 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.

3 Responses

  1. Hi,
    in your presentation are some “demo slides”. Can you make the used DTrace scripts for the demos downloadable?

    Thanks, Thorleif

  2. 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 [].
    Care to share any details how this is implemented? I sense some support from the Hotspot Compilers is required.
    Thanks, Matthias

  3. 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.

    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.

Recent Posts

April 17, 2024
January 13, 2024
December 29, 2023
February 12, 2017
December 18, 2016