summaryrefslogtreecommitdiff
path: root/src/node_dtrace.cc
diff options
context:
space:
mode:
authorIgor Zinkovsky <igorzi@microsoft.com>2012-06-11 16:23:17 -0700
committerIgor Zinkovsky <igorzi@microsoft.com>2012-06-13 15:36:08 -0700
commit35a1421e9670e7b5bc042758170d20673aed666f (patch)
tree147bad29287b926081406d4ec5dcdd4c8b1cd762 /src/node_dtrace.cc
parent74c8041fb6d781981e5f7e58167dd4ac3c487a7d (diff)
downloadandroid-node-v8-35a1421e9670e7b5bc042758170d20673aed666f.tar.gz
android-node-v8-35a1421e9670e7b5bc042758170d20673aed666f.tar.bz2
android-node-v8-35a1421e9670e7b5bc042758170d20673aed666f.zip
Windows: Enable ETW events.
This commit enables ETW events to be fired on Windows for existing DTrace probes. ETW instrumentation is enabled by default. It is possible to build node.exe without ETW instrumentation by using --without-etw option with configure script.
Diffstat (limited to 'src/node_dtrace.cc')
-rw-r--r--src/node_dtrace.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/node_dtrace.cc b/src/node_dtrace.cc
index 01ea7b87fd..e560999c52 100644
--- a/src/node_dtrace.cc
+++ b/src/node_dtrace.cc
@@ -24,6 +24,9 @@
#ifdef HAVE_DTRACE
#include "node_provider.h"
+#elif HAVE_ETW
+#include "node_win32_etw_provider.h"
+#include "node_win32_etw_provider-inl.h"
#else
#define NODE_HTTP_SERVER_REQUEST(arg0, arg1)
#define NODE_HTTP_SERVER_REQUEST_ENABLED() (0)
@@ -315,7 +318,11 @@ void InitDTrace(Handle<Object> target) {
target->Set(String::NewSymbol(tab[i].name), tab[i].templ->GetFunction());
}
-#ifdef HAVE_DTRACE
+#ifdef HAVE_ETW
+ init_etw();
+#endif
+
+#if defined HAVE_DTRACE || defined HAVE_ETW
v8::V8::AddGCPrologueCallback((GCPrologueCallback)dtrace_gc_start);
v8::V8::AddGCEpilogueCallback((GCEpilogueCallback)dtrace_gc_done);
#endif