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

Apple Watch Ultra 2 Black Titanium

watchOS 27 Will Add These New Features to Your Apple Watch

Sunday May 24, 2026 11:53 am PDT by
Apple will unveil watchOS 27 during its WWDC 2026 keynote on Monday, June 8, and a handful of new features have been rumored already. The first developer beta of watchOS 27 should be available immediately following the keynote, and a public beta typically follows in July. The update should be released to all users with a compatible Apple Watch model in September. Below, we recap watchOS...
iPhone 15 General Feature Green

Apple Preparing 'Most Significant Overhaul in the iPhone's History'

Friday May 22, 2026 1:36 pm PDT by
Apple reportedly plans to unveil its first foldable iPhone in September this year — it may be named "iPhone Ultra" — and expectations are high. In his Power On newsletter, Bloomberg's Mark Gurman said the foldable iPhone will be "the most significant overhaul in the iPhone's history." "iPhone 4, iPhone 6 and iPhone X were clearly a big deal, but this is a whole new design," he said....
imac video apple feature

Apple Released Two New Accessories This Month

Friday May 22, 2026 12:24 pm PDT by
May has been a quiet stretch in terms of new Apple products, but the company did release two accessories on its online store this month. First up was a new Pride Edition Sport Loop for the Apple Watch. The band features a rainbow design with 11 colors of woven nylon yarns. U.S. pricing is set at $49. The band is part of Apple's 2026 Pride Collection, which also includes a new Pride...