Node.js  v8.x
Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine
node_win32_etw_provider.h
Go to the documentation of this file.
1 // Copyright Joyent, Inc. and other Node contributors.
2 //
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:
10 //
11 // The above copyright notice and this permission notice shall be included
12 // in all copies or substantial portions of the Software.
13 //
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.
21 
22 #ifndef SRC_NODE_WIN32_ETW_PROVIDER_H_
23 #define SRC_NODE_WIN32_ETW_PROVIDER_H_
24 
25 #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
26 
27 #include "node_dtrace.h"
28 #include <evntprov.h>
29 
30 namespace node {
31 
32 #if defined(_MSC_VER)
33 # define INLINE __forceinline
34 #else
35 # define INLINE inline
36 #endif
37 
38 typedef ULONG (NTAPI *EventRegisterFunc)(
39  LPCGUID ProviderId,
40  PENABLECALLBACK EnableCallback,
41  PVOID CallbackContext,
42  PREGHANDLE RegHandle
43 );
44 
45 typedef ULONG (NTAPI *EventUnregisterFunc)(
46  REGHANDLE RegHandle
47 );
48 
49 typedef ULONG (NTAPI *EventWriteFunc)(
50  REGHANDLE RegHandle,
51  PCEVENT_DESCRIPTOR EventDescriptor,
52  ULONG UserDataCount,
53  PEVENT_DATA_DESCRIPTOR UserData
54 );
55 
56 void init_etw();
57 void shutdown_etw();
58 
60  node_dtrace_connection_t* conn, const char *remote, int port,
61  const char *method, const char *url, int fd);
63  const char *remote, int port, int fd);
65  node_dtrace_connection_t* conn, const char *remote, int port,
66  const char *method, const char *url, int fd);
68  const char *remote, int port, int fd);
70  const char *remote, int port, int fd);
72  const char *remote, int port, int fd);
73 INLINE void NODE_GC_START(v8::GCType type,
74  v8::GCCallbackFlags flags,
75  v8::Isolate* isolate);
76 INLINE void NODE_GC_DONE(v8::GCType type,
77  v8::GCCallbackFlags flags,
78  v8::Isolate* isolate);
79 INLINE void NODE_V8SYMBOL_REMOVE(const void* addr1, const void* addr2);
80 INLINE void NODE_V8SYMBOL_MOVE(const void* addr1, const void* addr2);
81 INLINE void NODE_V8SYMBOL_RESET();
82 INLINE void NODE_V8SYMBOL_ADD(LPCSTR symbol,
83  int symbol_len,
84  const void* addr1,
85  int len);
86 
92 INLINE bool NODE_NET_STREAM_END_ENABLED();
93 INLINE bool NODE_V8SYMBOL_ENABLED();
94 
95 } // namespace node
96 
97 #endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
98 
99 #endif // SRC_NODE_WIN32_ETW_PROVIDER_H_
#define NODE_HTTP_CLIENT_RESPONSE(arg0)
Definition: node_dtrace.cc:36
#define NODE_NET_STREAM_END_ENABLED()
Definition: node_dtrace.cc:41
int len
Definition: cares_wrap.cc:485
#define NODE_NET_STREAM_END(arg0)
Definition: node_dtrace.cc:40
#define NODE_GC_DONE(arg0, arg1, arg2)
Definition: node_dtrace.cc:43
#define NODE_HTTP_CLIENT_REQUEST(arg0, arg1)
Definition: node_dtrace.cc:34
#define NODE_HTTP_SERVER_REQUEST_ENABLED()
Definition: node_dtrace.cc:31
#define NODE_NET_SERVER_CONNECTION_ENABLED()
Definition: node_dtrace.cc:39
#define NODE_HTTP_CLIENT_REQUEST_ENABLED()
Definition: node_dtrace.cc:35
#define NODE_HTTP_SERVER_RESPONSE_ENABLED()
Definition: node_dtrace.cc:33
#define NODE_HTTP_CLIENT_RESPONSE_ENABLED()
Definition: node_dtrace.cc:37
uv_fs_t req
Definition: node_file.cc:374
method
Definition: node.d:195
#define NODE_NET_SERVER_CONNECTION(arg0)
Definition: node_dtrace.cc:38
#define NODE_GC_START(arg0, arg1, arg2)
Definition: node_dtrace.cc:42
#define NODE_HTTP_SERVER_RESPONSE(arg0)
Definition: node_dtrace.cc:32
#define NODE_HTTP_SERVER_REQUEST(arg0, arg1)
Definition: node_dtrace.cc:30