joyent/node — pull request #6432 by bnoordhuis (2013-10-28 21:15:52+00:00)
Title: build: use zero overhead systemtap probes

Profiling suggested that on Linux sometimes over 10% of CPU time was
being spent inside the systemtap probe entry points in the binding
layer, even when the process was not actively being traced with the
`stap` tool.

That's why this commit makes it possible to use the *_ENABLED() macros
and bail out early when we're not being traced, reducing the overhead
of unused probes to (almost) zero.

Said macros were already being generated by `dtrace -h` but were not
usable because they rely on external definitions. To remedy that, we
now generate the accompanying object files with `dtrace -G`.

Suggested reviewer: @tjfontaine. There's one change to uv.gyp that I need to land separately. It's included here so it actually builds.