DTrace is a dynamic tracing facility developed by Sun Microsystems for the Solaris operating system. DTrace lets administrators and developers explore the system and understand how it works. It can help you track down program bugs and performance problems. DTrace was introduced with Mac OS X 10.5. Prior to 10.5, ktrace served a similar, but more limited, purpose.


The heart of DTrace is the probe, where a probe is a named point in executing code. There are probes corresponding to kernel events, function calls, Objective-C message sends, system calls, and many other interesting events, as shown in Figure 9.1. Mac OS X includes tens of thousands of probes, and the count grows with each new OS release. You can add probes to your ...

Get Advanced Mac OS X Programming: The Big Nerd Ranch Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.