The data contained in this repository can be downloaded to your computer using one of several clients.
Please see the documentation of your version control software client for more information.
Please select the desired protocol below to get the URL.
This URL has Read-Only access.
main_repo / src / node_win32_etw_provider.h @ 35a1421e
History | View | Annotate | Download (2.81 KB)
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_ETW_H_
|
23 |
#define SRC_ETW_H_
|
24 |
|
25 |
#include <evntprov.h> |
26 |
#include "node_dtrace.h" |
27 |
|
28 |
namespace node { |
29 |
|
30 |
using namespace v8; |
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 |
|
59 |
INLINE void NODE_HTTP_SERVER_REQUEST(node_dtrace_http_server_request_t* req,
|
60 |
node_dtrace_connection_t* conn); |
61 |
INLINE void NODE_HTTP_SERVER_RESPONSE(node_dtrace_connection_t* conn);
|
62 |
INLINE void NODE_HTTP_CLIENT_REQUEST(node_dtrace_http_client_request_t* req,
|
63 |
node_dtrace_connection_t* conn); |
64 |
INLINE void NODE_HTTP_CLIENT_RESPONSE(node_dtrace_connection_t* conn);
|
65 |
INLINE void NODE_NET_SERVER_CONNECTION(node_dtrace_connection_t* conn);
|
66 |
INLINE void NODE_NET_STREAM_END(node_dtrace_connection_t* conn);
|
67 |
INLINE void NODE_GC_START(GCType type, GCCallbackFlags flags);
|
68 |
INLINE void NODE_GC_DONE(GCType type, GCCallbackFlags flags);
|
69 |
|
70 |
INLINE bool NODE_HTTP_SERVER_REQUEST_ENABLED();
|
71 |
INLINE bool NODE_HTTP_SERVER_RESPONSE_ENABLED();
|
72 |
INLINE bool NODE_HTTP_CLIENT_REQUEST_ENABLED();
|
73 |
INLINE bool NODE_HTTP_CLIENT_RESPONSE_ENABLED();
|
74 |
INLINE bool NODE_NET_SERVER_CONNECTION_ENABLED();
|
75 |
INLINE bool NODE_NET_STREAM_END_ENABLED();
|
76 |
INLINE bool NODE_NET_SOCKET_READ_ENABLED();
|
77 |
INLINE bool NODE_NET_SOCKET_WRITE_ENABLED();
|
78 |
|
79 |
#define NODE_NET_SOCKET_READ(arg0, arg1)
|
80 |
#define NODE_NET_SOCKET_WRITE(arg0, arg1)
|
81 |
} |
82 |
#endif // SRC_ETW_H_ |