summaryrefslogtreecommitdiff
path: root/src/node_win32_etw_provider-inl.h
diff options
context:
space:
mode:
authorJoão Reis <reis@janeasystems.com>2017-09-22 20:10:52 +0100
committerMyles Borins <myles.borins@gmail.com>2017-10-25 04:09:44 -0400
commitb1668375510d764d3efe06a6f6f54a4617e78637 (patch)
treee3de77cf9e4efac74744e10980e8f530f14df29d /src/node_win32_etw_provider-inl.h
parenteefa0a2dccbf76c8bcf1885092ed094649bff5aa (diff)
downloadnode-new-b1668375510d764d3efe06a6f6f54a4617e78637.tar.gz
src,etw: fix event 9 on 64 bit Windows
The event manifest specifies the MethodID field as a 32 bit integer. The 32 bit node executable publishes this correctly, but the 64 bit executable published a 64 bit integer, making the event undecodable. PR-URL: https://github.com/nodejs/node/pull/15563 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Hitesh Kanwathirtha <hiteshk@microsoft.com>
Diffstat (limited to 'src/node_win32_etw_provider-inl.h')
-rw-r--r--src/node_win32_etw_provider-inl.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/node_win32_etw_provider-inl.h b/src/node_win32_etw_provider-inl.h
index efc11ab0b9..ffda2f8f59 100644
--- a/src/node_win32_etw_provider-inl.h
+++ b/src/node_win32_etw_provider-inl.h
@@ -6,12 +6,6 @@
#include "node_win32_etw_provider.h"
#include "node_etw_provider.h"
-#if defined(_WIN64)
-# define ETW_WRITE_INTPTR_DATA ETW_WRITE_INT64_DATA
-#else
-# define ETW_WRITE_INTPTR_DATA ETW_WRITE_INT32_DATA
-#endif
-
namespace node {
// From node_win32_etw_provider.cc
@@ -79,7 +73,7 @@ extern int events_enabled;
ETW_WRITE_ADDRESS_DATA(descriptors, &context); \
ETW_WRITE_ADDRESS_DATA(descriptors + 1, &startAddr); \
ETW_WRITE_INT64_DATA(descriptors + 2, &size); \
- ETW_WRITE_INTPTR_DATA(descriptors + 3, &id); \
+ ETW_WRITE_INT32_DATA(descriptors + 3, &id); \
ETW_WRITE_INT16_DATA(descriptors + 4, &flags); \
ETW_WRITE_INT16_DATA(descriptors + 5, &rangeId); \
ETW_WRITE_INT64_DATA(descriptors + 6, &sourceId); \
@@ -232,7 +226,7 @@ void NODE_V8SYMBOL_ADD(LPCSTR symbol,
}
void* context = nullptr;
INT64 size = (INT64)len;
- INT_PTR id = (INT_PTR)addr1;
+ INT32 id = (INT32)addr1;
INT16 flags = 0;
INT16 rangeid = 1;
INT32 col = 1;