BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News DTrace: Dynamic Tracing with a Java API

DTrace: Dynamic Tracing with a Java API

Bookmarks

DTrace is an open-source dynamic tracing framework originally written for Solaris 10 and coming soon to OS X, Linux and BSD systems. A Java API for DTrace is available, allowing you to run DTrace scripts and allowing you to present the output in a more meaningful way.

In a recent interview with SD Times, the creators of DTrace, Adam Leventhal, Mike Shapiro, and Bryan Cantrill, discuss why DTrace came about and why it was needed. With the advent of the web, existing tracing tools were no longer sufficient, as Cantrill explains:

You had multiple applications now, or multiple processes that form a single application. So an application became not just a binary. But then you had a Web server and an app server and a database server, and now you don't have one language -- you've got three or four or five. You've got these different environments, different protected domains, and the problem is that the problems in software didn't really show up in development.

In response to those challenges, they created DTrace as a tool that would have system-wide scope so you could gather information from all of different sources. An overview of DTrace describes the tool:

DTrace dynamically modifies the operating system kernel and user processes to record data at locations of interest, called probes. A probe is a location or activity to which DTrace can bind a request to perform a set of actions, like recording a stack trace, a timestamp, or the argument to a function. Probes are like programmable sensors scattered all over your Solaris system in interesting places. DTrace probes come from a set of kernel modules called providers, each of which performs a particular kind of instrumentation to create probes.

As of Solaris build 35, DTrace has a Java API. One of the first tools out to utilize this API is Chime. As Bill Rushmore noted, using the Java API will allow for much better visualization of DTrace results.

DTrace is also able to help debugging JavaScript, with the advent of Helper Monkey.

Rate this Article

Adoption
Style

BT