1 // Copyright Joyent, Inc. and other Node contributors.
3 // Permission is hereby granted, free of charge, to any person obtaining a
4 // copy of this software and associated documentation files (the
5 // "Software"), to deal in the Software without restriction, including
6 // without limitation the rights to use, copy, modify, merge, publish,
7 // distribute, sublicense, and/or sell copies of the Software, and to permit
8 // persons to whom the Software is furnished to do so, subject to the
9 // following conditions:
11 // The above copyright notice and this permission notice shall be included
12 // in all copies or substantial portions of the Software.
14 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
17 // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
19 // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
20 // USE OR OTHER DEALINGS IN THE SOFTWARE.
22 #ifndef SRC_NODE_WIN32_ETW_PROVIDER_H_
23 #define SRC_NODE_WIN32_ETW_PROVIDER_H_
25 #include "node_dtrace.h"
31 # define INLINE __forceinline
33 # define INLINE inline
36 typedef ULONG (NTAPI *EventRegisterFunc)(
38 PENABLECALLBACK EnableCallback,
39 PVOID CallbackContext,
43 typedef ULONG (NTAPI *EventUnregisterFunc)(
47 typedef ULONG (NTAPI *EventWriteFunc)(
49 PCEVENT_DESCRIPTOR EventDescriptor,
51 PEVENT_DATA_DESCRIPTOR UserData
57 INLINE void NODE_HTTP_SERVER_REQUEST(node_dtrace_http_server_request_t* req,
58 node_dtrace_connection_t* conn, const char *remote, int port,
59 const char *method, const char *url, int fd);
60 INLINE void NODE_HTTP_SERVER_RESPONSE(node_dtrace_connection_t* conn,
61 const char *remote, int port, int fd);
62 INLINE void NODE_HTTP_CLIENT_REQUEST(node_dtrace_http_client_request_t* req,
63 node_dtrace_connection_t* conn, const char *remote, int port,
64 const char *method, const char *url, int fd);
65 INLINE void NODE_HTTP_CLIENT_RESPONSE(node_dtrace_connection_t* conn,
66 const char *remote, int port, int fd);
67 INLINE void NODE_NET_SERVER_CONNECTION(node_dtrace_connection_t* conn,
68 const char *remote, int port, int fd);
69 INLINE void NODE_NET_STREAM_END(node_dtrace_connection_t* conn,
70 const char *remote, int port, int fd);
71 INLINE void NODE_GC_START(v8::GCType type, v8::GCCallbackFlags flags);
72 INLINE void NODE_GC_DONE(v8::GCType type, v8::GCCallbackFlags flags);
73 INLINE void NODE_V8SYMBOL_REMOVE(const void* addr1, const void* addr2);
74 INLINE void NODE_V8SYMBOL_MOVE(const void* addr1, const void* addr2);
75 INLINE void NODE_V8SYMBOL_RESET();
76 INLINE void NODE_V8SYMBOL_ADD(LPCSTR symbol,
81 INLINE bool NODE_HTTP_SERVER_REQUEST_ENABLED();
82 INLINE bool NODE_HTTP_SERVER_RESPONSE_ENABLED();
83 INLINE bool NODE_HTTP_CLIENT_REQUEST_ENABLED();
84 INLINE bool NODE_HTTP_CLIENT_RESPONSE_ENABLED();
85 INLINE bool NODE_NET_SERVER_CONNECTION_ENABLED();
86 INLINE bool NODE_NET_STREAM_END_ENABLED();
87 INLINE bool NODE_NET_SOCKET_READ_ENABLED();
88 INLINE bool NODE_NET_SOCKET_WRITE_ENABLED();
89 INLINE bool NODE_V8SYMBOL_ENABLED();
91 #define NODE_NET_SOCKET_READ(arg0, arg1)
92 #define NODE_NET_SOCKET_WRITE(arg0, arg1)
95 #endif // SRC_NODE_WIN32_ETW_PROVIDER_H_