Factual errors about DTrace
Posted Aug 7, 2007 18:50 UTC (Tue) by
cajal (subscriber, #4167)
Parent article:
On DTrace envy
I'd like to correct several factual errors about DTrace in this article.
DTrace does not depend upon static probes in the kernel. In fact, the "D" in DTrace stands for dynamic; DTrace uses dynamic probing. It does allow developers to add statically defined probe points, and the Solaris kernel does have many statically defined probes.
But it is inaccurate to state that DTrace depends on static probes. In fact, the overwhelming majority of the in-kernel probes on Solaris are dynamic (they're provided by the function boundary tracing (fbt) DTrace provider). This is where most of the "tens of thousands" of in-kernel DTrace probes come from (they're tracing kernel function entry and return points). In userspace, the pid provider allows probes to be dynamically inserted at arbitrary offsets in a program.
The D language does have (limited) control flow: It has the ternary operator.
Concerning user-space probes, it is not required that application developers insert DTrace probe points before DTrace can use them. The pid provider, which I mentioned above, can trace user-space function entry and return (as well as at any arbitary offset within an application). However, it is possible for developers to insert static probes points into their applications. There are several examples of this:
* PostgreSQL 8.2 (http://www.postgresql.org/docs/8.2/interactive/dynamic-tr...)
* Sun's Java 6 (http://java.sun.com/javase/6/docs/technotes/guides/vm/dtr...)
* mod_dtrace for Apache (http://prefetch.net/projects/apache_modtrace/)
* Ruby (https://dtrace.joyent.com/projects/ruby-dtrace/wiki/Ruby+...)
* X.org 7.3 (http://wiki.x.org/wiki/Releases/7.3)
* PHP (http://pecl.php.net/package/DTrace)
* Sendmail (http://mail.opensolaris.org/pipermail/dtrace-discuss/2006...)
* Python
(http://blogs.sun.com/levon/entry/python_and_dtrace_in_build)
Granted, the last two are still experimental.
(
Log in to post comments)