Theo Schlossnagle wrote:
Heh. Syscall probes and FBT probes in Dtrace have zero overhead.
User-space probes do have overhead, but it is only a few instructions
(two I think). Besically, the probe points are replaced by illegal
instructions and the kernel infrastructure for Dtrace will fasttrap
the ops and then act. So, it is tiny tiny overhead. Little enough
that it isn't unreasonable to instrument things like s_lock which are
tiny.
Theo, you're a genius. FBT (funciton boundary tracing) probes have zero
overhead (section 4.1) and user-space probes has two instructions over
head (section 4.2). I was incorrect about making a general zero overhead
statement. But it's so close to zero :-)
http://www.sun.com/bigadmin/content/dtrace/dtrace_usenix.pdf
The reason that Robert proposes user-space probes (I assume) is that
tracing C functions can be too granular and not conveniently expose
the "right" information to make tracing useful.
Yes, I'm proposing user-space probes (aka User Statically-Defined
Tracing - USDT). USDT provides a high-level abstraction so the
application can expose well defined probes without the user having to
know the detailed implementation. For example, instead of having to
know the function LWLockAcquire(), a well documented probe called
lwlock_acquire with the appropriate args is much more usable.
Regards,
Robert
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match