Discussion Over Apple's Modification Of Sun's DTrace - MacRumors
Skip to Content

Discussion Over Apple's Modification Of Sun's DTrace

One of the most anticipated features of Mac OS X Leopard amongst the technical community was the port of Sun's DTrace utility for application and system profiling. DTrace is a powerful, low-level dynamic tracing framework that allows system administrators and developers to trace applications for tuning or troubleshooting purposes.

Recently, Adam Leventhal, one of DTrace's initial developers, discovered that Apple's implementation creates a way for a program to exclude itself from being traced. Namely, he was unsuccessful at tracing iTunes, and found that Apple had added a method of disabling probing on certain applications defined with the directive P_LNOATTACH.

Wow. So Apple is explicitly preventing DTrace from examining or recording data for processes which don't permit tracing. This is antithetical to the notion of systemic tracing, antithetical to the goals of DTrace, and antithetical to the spirit of open source. I'm sure this was inserted under pressure from ISVs, but that makes the pill no easier to swallow.

Since the initial publication of the blog entry last week, the story has begun to pop up around the mac web.

The practice is not entirely new to Apple. A commenter on Adam Leventhal's blog noted that Apple used the same directive to prevent GDB tracing on iTunes. Additionally, the implementation of this directive appears to be limited to iTunes (for the moment?), so many are speculating that the move is to protect Apple's FairPlay DRM.

To present an alternate view, Apple has extended Java, Ruby, Python, and Perl to include DTrace support, and Apple has built a GUI front-end called Instruments. Also the issue may eventually become moot with Apple's stated desire to move towards DRM-free music (though DRM video remains common).

Related Forum: Mac Apps

Popular Stories

HomePod mini and Apple TV Sage

New Apple TV and HomePod Mini Are 'Nearly Ready' to Launch, New Siri Remote Also Rumored

Sunday May 31, 2026 8:47 am PDT by
New models of the Apple TV 4K and HomePod mini are "nearly ready to go," according to the latest word from Bloomberg's Mark Gurman. Subscribe to the MacRumors YouTube channel for more videos. Both devices have been ready "for months," but Apple is holding off on launching them until the more personalized version of Siri is available, he said. "I am told the hardware for the next Apple TV...
Apple Foldable Thumb

First 'Confirmed' iPhone Ultra Color Allegedly Revealed in Leaked Image

Monday June 1, 2026 4:39 am PDT by
Apple is expected to launch its first foldable iPhone later this year. Rumors suggest the "iPhone Ultra" will come in two color options, and a leaker shared an image today that allegedly shows one of them. Posted on Weibo by the Chinese leaker known as Ice Universe, the image purportedly offers a first glimpse of Apple's foldable in white. The device is believed to have entered early mass...
Meta Ray Ban Glasses

Apple Glasses Reportedly Launching in 'Late 2027' With These Features

Sunday May 31, 2026 9:21 am PDT by
Apple is now aiming to release its first smart glasses in "late 2027," according to the latest word from Bloomberg's Mark Gurman. Meta Ray-Bans He previously said that Apple planned to begin shipping the glasses by early 2027, but he said the product has faced development delays. The glasses will feature "oval-shaped cameras, unique colors, and multiple frame styles," according to Gurman....