build: use zero overhead systemtap probes
authorBen Noordhuis <info@bnoordhuis.nl>
Mon, 28 Oct 2013 19:18:59 +0000 (20:18 +0100)
committerBen Noordhuis <info@bnoordhuis.nl>
Tue, 29 Oct 2013 20:55:48 +0000 (21:55 +0100)
commitc4def505cb333d96915fa234b296327ae3a274c6
tree7bdd2a6e2420d67c4e3990fe609fac208cbfe769
parentba7c9ce9649886edf77d01cdcec216c8a0c76f48
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`.

This commit includes a change to libuv that has been landed upstream in
commit joyent/libuv@3c172ea.
configure
deps/uv/uv.gyp
node.gyp
src/node.cc
src/node_dtrace.cc