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.