summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoão Reis <reis@janeasystems.com>2016-03-16 16:31:18 +0000
committerJoão Reis <reis@janeasystems.com>2016-03-23 14:12:25 +0000
commit387b6b49737be96574be536ce622f37229f4d4df (patch)
tree3d9be5fa6d71465cca239e9e4ffa80efead11a43 /src
parent91466b855f0ced0df9a2d7444eea8ac7b89e278e (diff)
downloadandroid-node-v8-387b6b49737be96574be536ce622f37229f4d4df.tar.gz
android-node-v8-387b6b49737be96574be536ce622f37229f4d4df.tar.bz2
android-node-v8-387b6b49737be96574be536ce622f37229f4d4df.zip
etw: fix descriptors of events 9 and 23
Event 9 must include the string terminator in the last descriptor. Event 23 must be published with no descriptors, in accordance with the manifest. PR-URL: https://github.com/nodejs/node/pull/5742 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/node_win32_etw_provider-inl.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/node_win32_etw_provider-inl.h b/src/node_win32_etw_provider-inl.h
index de53203cb3..3fef20cc14 100644
--- a/src/node_win32_etw_provider-inl.h
+++ b/src/node_win32_etw_provider-inl.h
@@ -94,6 +94,13 @@ extern int events_enabled;
dataDescriptors); \
CHECK_EQ(status, ERROR_SUCCESS);
+#define ETW_WRITE_EMPTY_EVENT(eventDescriptor) \
+ DWORD status = event_write(node_provider, \
+ &eventDescriptor, \
+ 0, \
+ NULL); \
+ CHECK_EQ(status, ERROR_SUCCESS);
+
void NODE_HTTP_SERVER_REQUEST(node_dtrace_http_server_request_t* req,
node_dtrace_connection_t* conn, const char *remote, int port,
@@ -189,10 +196,7 @@ void NODE_V8SYMBOL_MOVE(const void* addr1, const void* addr2) {
void NODE_V8SYMBOL_RESET() {
if (events_enabled > 0) {
- int val = 0;
- EVENT_DATA_DESCRIPTOR descriptors[1];
- ETW_WRITE_INT32_DATA(descriptors, &val);
- ETW_WRITE_EVENT(NODE_V8SYMBOL_RESET_EVENT, descriptors);
+ ETW_WRITE_EMPTY_EVENT(NODE_V8SYMBOL_RESET_EVENT);
}
}
@@ -244,7 +248,7 @@ void NODE_V8SYMBOL_ADD(LPCSTR symbol,
line,
col,
symbuf,
- symbol_len * sizeof(symbuf[0]));
+ (symbol_len + 1) * sizeof(symbuf[0]));
ETW_WRITE_EVENT(MethodLoad, descriptors);
}
}