summaryrefslogtreecommitdiff
path: root/src/node.cc
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2013-10-28 20:18:59 +0100
committerBen Noordhuis <info@bnoordhuis.nl>2013-10-29 21:55:48 +0100
commitc4def505cb333d96915fa234b296327ae3a274c6 (patch)
tree7bdd2a6e2420d67c4e3990fe609fac208cbfe769 /src/node.cc
parentba7c9ce9649886edf77d01cdcec216c8a0c76f48 (diff)
downloadnode-new-c4def505cb333d96915fa234b296327ae3a274c6.tar.gz
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.
Diffstat (limited to 'src/node.cc')
-rw-r--r--src/node.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/node.cc b/src/node.cc
index b6bd8b70f8..4e30269e0d 100644
--- a/src/node.cc
+++ b/src/node.cc
@@ -35,14 +35,10 @@
#include "node_crypto.h"
#endif
-#if defined HAVE_DTRACE || defined HAVE_ETW || defined HAVE_SYSTEMTAP
+#if defined HAVE_DTRACE || defined HAVE_ETW
#include "node_dtrace.h"
#endif
-#if HAVE_SYSTEMTAP
-#include "node_provider.h"
-#endif
-
#include "ares.h"
#include "env.h"
#include "env-inl.h"
@@ -2656,7 +2652,7 @@ void Load(Environment* env) {
// Add a reference to the global object
Local<Object> global = env->context()->Global();
-#if defined HAVE_DTRACE || defined HAVE_ETW || defined HAVE_SYSTEMTAP
+#if defined HAVE_DTRACE || defined HAVE_ETW
InitDTrace(global);
#endif