Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

etw: fix descriptors of events 9 and 23 #5742

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions src/node_win32_etw_provider-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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);
}
}

Expand Down Expand Up @@ -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);
}
}
Expand Down