Adam Leventhal's blog

Close this search box.


October 27, 2007

It’s been more than a year since I first saw DTrace on Mac OS X, and now it’s at last generally available to the public. Not only did Apple port DTrace, but they’ve also included a bunch of USDT providers. Perl, Python, Ruby — they all ship in Leopard with built-in DTrace probes that allow developers to observe function calls, object allocation, and other points of interest from the perspective of that dynamic language. Apple did make some odd choices (e.g. no Java provider, spurious modifications to the publicly available providers, a different build process), but on the whole it’s very impressive.

Perhaps it was too much to hope for, but with Apple’s obvious affection for DTrace I thought they might include USDT probes for Safari. Specifically, probes in the JavaScript interpreter would empower developers in the same way they enabled Ruby, Perl, and Python developers. Fortunately, the folks at the Mozilla Foundation have already done the heavy lifting for Firefox — it was just a matter of compiling Firefox on Mac OS X 10.5 with DTrace enabled:

There were some minor modifications I had to make to the Firefox build process to get everything working, but it wasn’t too tricky. I’ll try to get a patch submitted this week, and then Firefox will have the same probes on Mac OS X that it does — thanks to Brendan’s early efforts — on Solaris. JavaScript developers take note: this is good news.

5 Responses

  1. The hotspot provider is supported in Apple’s Java 6 package. Unfortunatly, Java 6 isn’t shipping with Leopard. It will be available sometime in the near future (there’s a preview in ADC now).

  2. Awsome! The JavaScript DTrace probes and the default capabilities of DTrace are providing powerful new ways to observe the behaviour of JavaScript and the browser like never before. It’s great news that MacOS X users will be able to enjoy what is the future of performance observability.
    More details about the JavaScript probes can be found on the OpenSolaris page and the Bugzilla entry: and .

  3. Adam, I’ve filed a bug:
    Sign up for a Bugzilla account here:
    Then assign the bug to yourself, attach the patch, and request review from the appropriate owner/peer of the code you are changing (for build changes, this is probably Benjamin Smedberg).
    Note that Ryan Flint has also created a patch, which is available here:

Recent Posts

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