[RndTbl] Question in last night's meeting about dtrace and user code

Stuart Williams stuartw at mts.net
Wed Mar 15 09:21:35 CST 2006


Someone asked a question during last night's presentation by Willem
van Schaik regarding dtrace's ability to instrument user code.  The
answer as I understood it was that dtrace can't do that, that it can
only trace OS events.

I vaguely recalled from Bryan Cantrill's presentation and my
subsequent reading that user code could be instrumented, and it can!

Section 7 of the Usenix paper mentions this
(http://www.sun.com/bigadmin/content/dtrace/dtrace_usenix.pdf) and
there's a good slide presentation on Adam Leventhal's blog
(http://blogs.sun.com/roller/page/ahl/20050301) that briefly explains
how it's done.

In a limited sense it's not dtrace doing this instrumentation but the
pid provider.  This provider is written to work with dtrace, and it's
written using an OS trap (when a probe is enabled), similar to how
dtrace is implemented on x86.

Stuart Williams.


More information about the Roundtable mailing list