Browse Source

etw: update prototypes to match dtrace provider

The DTrace probes were updated to accomodate platforms that can't
handle structs, update the prototypes for ETW but it's not necessary
to do anything with the new arguments as it's redundant information.
v0.11.1-release
Timothy J Fontaine 12 years ago
committed by Bert Belder
parent
commit
b3a8e0da4a
  1. 20
      src/node_win32_etw_provider-inl.h
  2. 20
      src/node_win32_etw_provider.h

20
src/node_win32_etw_provider-inl.h

@ -112,7 +112,8 @@ extern int events_enabled;
void NODE_HTTP_SERVER_REQUEST(node_dtrace_http_server_request_t* req, void NODE_HTTP_SERVER_REQUEST(node_dtrace_http_server_request_t* req,
node_dtrace_connection_t* conn) { node_dtrace_connection_t* conn, const char *remote, int port,
const char *method, const char *url, int fd) {
EVENT_DATA_DESCRIPTOR descriptors[7]; EVENT_DATA_DESCRIPTOR descriptors[7];
ETW_WRITE_HTTP_SERVER_REQUEST(descriptors, req); ETW_WRITE_HTTP_SERVER_REQUEST(descriptors, req);
ETW_WRITE_NET_CONNECTION(descriptors + 3, conn); ETW_WRITE_NET_CONNECTION(descriptors + 3, conn);
@ -120,7 +121,8 @@ void NODE_HTTP_SERVER_REQUEST(node_dtrace_http_server_request_t* req,
} }
void NODE_HTTP_SERVER_RESPONSE(node_dtrace_connection_t* conn) { void NODE_HTTP_SERVER_RESPONSE(node_dtrace_connection_t* conn,
const char *remote, int port, int fd) {
EVENT_DATA_DESCRIPTOR descriptors[4]; EVENT_DATA_DESCRIPTOR descriptors[4];
ETW_WRITE_NET_CONNECTION(descriptors, conn); ETW_WRITE_NET_CONNECTION(descriptors, conn);
ETW_WRITE_EVENT(NODE_HTTP_SERVER_RESPONSE_EVENT, descriptors); ETW_WRITE_EVENT(NODE_HTTP_SERVER_RESPONSE_EVENT, descriptors);
@ -128,7 +130,8 @@ void NODE_HTTP_SERVER_RESPONSE(node_dtrace_connection_t* conn) {
void NODE_HTTP_CLIENT_REQUEST(node_dtrace_http_client_request_t* req, void NODE_HTTP_CLIENT_REQUEST(node_dtrace_http_client_request_t* req,
node_dtrace_connection_t* conn) { node_dtrace_connection_t* conn, const char *remote, int port,
const char *method, const char *url, int fd) {
EVENT_DATA_DESCRIPTOR descriptors[6]; EVENT_DATA_DESCRIPTOR descriptors[6];
ETW_WRITE_HTTP_CLIENT_REQUEST(descriptors, req); ETW_WRITE_HTTP_CLIENT_REQUEST(descriptors, req);
ETW_WRITE_NET_CONNECTION(descriptors + 2, conn); ETW_WRITE_NET_CONNECTION(descriptors + 2, conn);
@ -136,21 +139,24 @@ void NODE_HTTP_CLIENT_REQUEST(node_dtrace_http_client_request_t* req,
} }
void NODE_HTTP_CLIENT_RESPONSE(node_dtrace_connection_t* conn) { void NODE_HTTP_CLIENT_RESPONSE(node_dtrace_connection_t* conn,
const char *remote, int port, int fd) {
EVENT_DATA_DESCRIPTOR descriptors[4]; EVENT_DATA_DESCRIPTOR descriptors[4];
ETW_WRITE_NET_CONNECTION(descriptors, conn); ETW_WRITE_NET_CONNECTION(descriptors, conn);
ETW_WRITE_EVENT(NODE_HTTP_CLIENT_RESPONSE_EVENT, descriptors); ETW_WRITE_EVENT(NODE_HTTP_CLIENT_RESPONSE_EVENT, descriptors);
} }
void NODE_NET_SERVER_CONNECTION(node_dtrace_connection_t* conn) { void NODE_NET_SERVER_CONNECTION(node_dtrace_connection_t* conn,
const char *remote, int port, int fd) {
EVENT_DATA_DESCRIPTOR descriptors[4]; EVENT_DATA_DESCRIPTOR descriptors[4];
ETW_WRITE_NET_CONNECTION(descriptors, conn); ETW_WRITE_NET_CONNECTION(descriptors, conn);
ETW_WRITE_EVENT(NODE_NET_SERVER_CONNECTION_EVENT, descriptors); ETW_WRITE_EVENT(NODE_NET_SERVER_CONNECTION_EVENT, descriptors);
} }
void NODE_NET_STREAM_END(node_dtrace_connection_t* conn) { void NODE_NET_STREAM_END(node_dtrace_connection_t* conn,
const char *remote, int port, int fd) {
EVENT_DATA_DESCRIPTOR descriptors[4]; EVENT_DATA_DESCRIPTOR descriptors[4];
ETW_WRITE_NET_CONNECTION(descriptors, conn); ETW_WRITE_NET_CONNECTION(descriptors, conn);
ETW_WRITE_EVENT(NODE_NET_STREAM_END_EVENT, descriptors); ETW_WRITE_EVENT(NODE_NET_STREAM_END_EVENT, descriptors);
@ -262,4 +268,4 @@ bool NODE_NET_SOCKET_READ_ENABLED() { return events_enabled > 0; }
bool NODE_NET_SOCKET_WRITE_ENABLED() { return events_enabled > 0; } bool NODE_NET_SOCKET_WRITE_ENABLED() { return events_enabled > 0; }
bool NODE_V8SYMBOL_ENABLED() { return events_enabled > 0; } bool NODE_V8SYMBOL_ENABLED() { return events_enabled > 0; }
} }
#endif // SRC_ETW_INL_H_ #endif // SRC_ETW_INL_H_

20
src/node_win32_etw_provider.h

@ -57,13 +57,19 @@ void init_etw();
void shutdown_etw(); void shutdown_etw();
INLINE void NODE_HTTP_SERVER_REQUEST(node_dtrace_http_server_request_t* req, INLINE void NODE_HTTP_SERVER_REQUEST(node_dtrace_http_server_request_t* req,
node_dtrace_connection_t* conn); node_dtrace_connection_t* conn, const char *remote, int port,
INLINE void NODE_HTTP_SERVER_RESPONSE(node_dtrace_connection_t* conn); const char *method, const char *url, int fd);
INLINE void NODE_HTTP_SERVER_RESPONSE(node_dtrace_connection_t* conn,
const char *remote, int port, int fd);
INLINE void NODE_HTTP_CLIENT_REQUEST(node_dtrace_http_client_request_t* req, INLINE void NODE_HTTP_CLIENT_REQUEST(node_dtrace_http_client_request_t* req,
node_dtrace_connection_t* conn); node_dtrace_connection_t* conn, const char *remote, int port,
INLINE void NODE_HTTP_CLIENT_RESPONSE(node_dtrace_connection_t* conn); const char *method, const char *url, int fd);
INLINE void NODE_NET_SERVER_CONNECTION(node_dtrace_connection_t* conn); INLINE void NODE_HTTP_CLIENT_RESPONSE(node_dtrace_connection_t* conn,
INLINE void NODE_NET_STREAM_END(node_dtrace_connection_t* conn); const char *remote, int port, int fd);
INLINE void NODE_NET_SERVER_CONNECTION(node_dtrace_connection_t* conn,
const char *remote, int port, int fd);
INLINE void NODE_NET_STREAM_END(node_dtrace_connection_t* conn,
const char *remote, int port, int fd);
INLINE void NODE_GC_START(GCType type, GCCallbackFlags flags); INLINE void NODE_GC_START(GCType type, GCCallbackFlags flags);
INLINE void NODE_GC_DONE(GCType type, GCCallbackFlags flags); INLINE void NODE_GC_DONE(GCType type, GCCallbackFlags flags);
INLINE void NODE_V8SYMBOL_REMOVE(const void* addr1, const void* addr2); INLINE void NODE_V8SYMBOL_REMOVE(const void* addr1, const void* addr2);
@ -87,4 +93,4 @@ INLINE bool NODE_V8SYMBOL_ENABLED();
#define NODE_NET_SOCKET_READ(arg0, arg1) #define NODE_NET_SOCKET_READ(arg0, arg1)
#define NODE_NET_SOCKET_WRITE(arg0, arg1) #define NODE_NET_SOCKET_WRITE(arg0, arg1)
} }
#endif // SRC_ETW_H_ #endif // SRC_ETW_H_

Loading…
Cancel
Save