Revision 35a1421e

View differences:

configure
115 115
    dest="without_dtrace",
116 116
    help="Build without DTrace")
117 117

  
118
parser.add_option("--with-etw",
119
    action="store_true",
120
    dest="with_etw",
121
    help="Build with ETW (default is true on Windows)")
122

  
123
parser.add_option("--without-etw",
124
    action="store_true",
125
    dest="without_etw",
126
    help="Build without ETW")
127

  
118 128
# CHECKME does this still work with recent releases of V8?
119 129
parser.add_option("--gdb",
120 130
    action="store_true",
......
273 283
    o['variables']['node_use_dtrace'] = 'false'
274 284

  
275 285

  
286
  # By default, enable ETW on Windows.
287
  if sys.platform.startswith('win32'):
288
    o['variables']['node_use_etw'] = b(not options.without_etw);
289
  elif b(options.with_etw) == 'true':
290
    raise Exception('ETW is only supported on Windows.')
291
  else:
292
    o['variables']['node_use_etw'] = 'false'
293

  
294

  
276 295
def configure_libz(o):
277 296
  o['variables']['node_shared_zlib'] = b(options.shared_zlib)
278 297

  
node.gyp
5 5
    # See http://codereview.chromium.org/8159015
6 6
    'werror': '',
7 7
    'node_use_dtrace%': 'false',
8
    'node_use_etw%': 'false',
8 9
    'node_shared_v8%': 'false',
9 10
    'node_shared_zlib%': 'false',
10 11
    'node_use_openssl%': 'true',
......
163 164
            }
164 165
          ] ],
165 166
        } ],
166

  
167
        [ 'node_use_etw=="true"', {
168
          'defines': [ 'HAVE_ETW=1' ],
169
          'dependencies': [ 'node_etw' ],
170
          'sources': [
171
            'src/node_win32_etw_provider.h',
172
            'src/node_win32_etw_provider-inl.h',
173
            'src/node_win32_etw_provider.cc',
174
            'src/node_dtrace.cc',
175
            '<(SHARED_INTERMEDIATE_DIR)/node_etw_provider.h',
176
            '<(SHARED_INTERMEDIATE_DIR)/node_etw_provider.rc',
177
          ]
178
        } ],
167 179
        [ 'node_shared_v8=="true"', {
168 180
          'sources': [
169 181
            '<(node_shared_v8_includes)/v8.h',
......
228 240
        },
229 241
      },
230 242
    },
231

  
243
    # generate ETW header and resource files
244
    {
245
      'target_name': 'node_etw',
246
      'type': 'none',
247
      'conditions': [
248
        [ 'node_use_etw=="true"', {
249
          'actions': [
250
            {
251
              'action_name': 'node_etw',
252
              'inputs': [ 'src/res/node_etw_provider.man' ],
253
              'outputs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
254
              'action': [ 'mc <@(_inputs) -h <@(_outputs) -r <@(_outputs)' ]
255
            }
256
          ]
257
        } ]
258
      ]
259
    },
232 260
    {
233 261
      'target_name': 'node_js2c',
234 262
      'type': 'none',
......
251 279
          # action?
252 280

  
253 281
          'conditions': [
254
            [ 'node_use_dtrace=="true"', {
282
            [ 'node_use_dtrace=="true" or node_use_etw=="true"', {
255 283
              'action': [
256 284
                'python',
257 285
                'tools/js2c.py',
src/node.cc
26 26
#include "uv.h"
27 27

  
28 28
#include "v8-debug.h"
29
#ifdef HAVE_DTRACE
29
#if defined HAVE_DTRACE || defined HAVE_ETW
30 30
# include "node_dtrace.h"
31 31
#endif
32 32

  
33
#ifdef HAVE_ETW
34
# include "node_win32_etw_provider.h"
35
#endif
36

  
33 37
#include <locale.h>
34 38
#include <signal.h>
35 39
#include <stdio.h>
......
2325 2329
  Local<Object> global = v8::Context::GetCurrent()->Global();
2326 2330
  Local<Value> args[1] = { Local<Value>::New(process_l) };
2327 2331

  
2328
#ifdef HAVE_DTRACE
2332
#if defined HAVE_DTRACE || defined HAVE_ETW
2329 2333
  InitDTrace(global);
2330 2334
#endif
2331 2335

  
......
2894 2898
    // watchers, it blocks.
2895 2899
    uv_run(uv_default_loop());
2896 2900

  
2901
#ifdef HAVE_ETW
2902
    shutdown_etw();
2903
#endif
2904

  
2897 2905
    EmitExit(process_l);
2898 2906
    RunAtExit();
2899 2907

  
src/node_dtrace.cc
24 24

  
25 25
#ifdef HAVE_DTRACE
26 26
#include "node_provider.h"
27
#elif HAVE_ETW
28
#include "node_win32_etw_provider.h"
29
#include "node_win32_etw_provider-inl.h"
27 30
#else
28 31
#define NODE_HTTP_SERVER_REQUEST(arg0, arg1)
29 32
#define NODE_HTTP_SERVER_REQUEST_ENABLED() (0)
......
315 318
    target->Set(String::NewSymbol(tab[i].name), tab[i].templ->GetFunction());
316 319
  }
317 320

  
318
#ifdef HAVE_DTRACE
321
#ifdef HAVE_ETW
322
  init_etw();
323
#endif
324

  
325
#if defined HAVE_DTRACE || defined HAVE_ETW
319 326
  v8::V8::AddGCPrologueCallback((GCPrologueCallback)dtrace_gc_start);
320 327
  v8::V8::AddGCEpilogueCallback((GCEpilogueCallback)dtrace_gc_done);
321 328
#endif
src/node_win32_etw_provider-inl.h
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_INL_H_
23
#define SRC_ETW_INL_H_
24

  
25
#include "node_win32_etw_provider.h"
26
#include "node_etw_provider.h"
27

  
28
namespace node {
29

  
30
using namespace v8;
31

  
32
// From node_win32_etw_provider.cc
33
extern REGHANDLE node_provider;
34
extern EventWriteFunc event_write;
35
extern int events_enabled;
36

  
37
#define ETW_WRITE_STRING_DATA(data_descriptor, data)                          \
38
  EventDataDescCreate(data_descriptor,                                        \
39
                      data,                                                   \
40
                      (strlen(data) + 1) * sizeof(char));
41

  
42
#define ETW_WRITE_INT32_DATA(data_descriptor, data)  \
43
  EventDataDescCreate(data_descriptor, data, sizeof(int32_t));
44

  
45
#define ETW_WRITE_NET_CONNECTION(descriptors, conn)                           \
46
  ETW_WRITE_INT32_DATA(descriptors, &conn->fd);                               \
47
  ETW_WRITE_INT32_DATA(descriptors + 1, &conn->port);                         \
48
  ETW_WRITE_STRING_DATA(descriptors + 2, conn->remote);                       \
49
  ETW_WRITE_INT32_DATA(descriptors + 3, &conn->buffered);
50

  
51
#define ETW_WRITE_HTTP_SERVER_REQUEST(descriptors, req)                       \
52
  ETW_WRITE_STRING_DATA(descriptors, req->url);                               \
53
  ETW_WRITE_STRING_DATA(descriptors + 1, req->method);                        \
54
  ETW_WRITE_STRING_DATA(descriptors + 2, req->forwardedFor);
55

  
56
#define ETW_WRITE_HTTP_CLIENT_REQUEST(descriptors, req)                       \
57
  ETW_WRITE_STRING_DATA(descriptors, req->url);                               \
58
  ETW_WRITE_STRING_DATA(descriptors + 1, req->method);
59

  
60
#define ETW_WRITE_GC(descriptors, type, flags)                                \
61
  ETW_WRITE_INT32_DATA(descriptors, &type);                                   \
62
  ETW_WRITE_INT32_DATA(descriptors + 1, &flags);
63

  
64
#define ETW_WRITE_EVENT(eventDescriptor, dataDescriptors)                     \
65
  DWORD status = event_write(node_provider,                                   \
66
                             &eventDescriptor,                                \
67
                             sizeof(dataDescriptors)/sizeof(*dataDescriptors),\
68
                             dataDescriptors);                                \
69
  assert(status == ERROR_SUCCESS);
70

  
71

  
72
void NODE_HTTP_SERVER_REQUEST(node_dtrace_http_server_request_t* req,
73
    node_dtrace_connection_t* conn) {
74
  EVENT_DATA_DESCRIPTOR descriptors[7];
75
  ETW_WRITE_HTTP_SERVER_REQUEST(descriptors, req);
76
  ETW_WRITE_NET_CONNECTION(descriptors + 3, conn);
77
  ETW_WRITE_EVENT(NODE_HTTP_SERVER_REQUEST_EVENT, descriptors);
78
}
79

  
80

  
81
void NODE_HTTP_SERVER_RESPONSE(node_dtrace_connection_t* conn) {
82
  EVENT_DATA_DESCRIPTOR descriptors[4];
83
  ETW_WRITE_NET_CONNECTION(descriptors, conn);
84
  ETW_WRITE_EVENT(NODE_HTTP_SERVER_RESPONSE_EVENT, descriptors);
85
}
86

  
87

  
88
void NODE_HTTP_CLIENT_REQUEST(node_dtrace_http_client_request_t* req,
89
    node_dtrace_connection_t* conn) {
90
  EVENT_DATA_DESCRIPTOR descriptors[6];
91
  ETW_WRITE_HTTP_CLIENT_REQUEST(descriptors, req);
92
  ETW_WRITE_NET_CONNECTION(descriptors + 2, conn);
93
  ETW_WRITE_EVENT(NODE_HTTP_CLIENT_REQUEST_EVENT, descriptors);
94
}
95

  
96

  
97
void NODE_HTTP_CLIENT_RESPONSE(node_dtrace_connection_t* conn) {
98
  EVENT_DATA_DESCRIPTOR descriptors[4];
99
  ETW_WRITE_NET_CONNECTION(descriptors, conn);
100
  ETW_WRITE_EVENT(NODE_HTTP_CLIENT_RESPONSE_EVENT, descriptors);
101
}
102

  
103

  
104
void NODE_NET_SERVER_CONNECTION(node_dtrace_connection_t* conn) {
105
  EVENT_DATA_DESCRIPTOR descriptors[4];
106
  ETW_WRITE_NET_CONNECTION(descriptors, conn);
107
  ETW_WRITE_EVENT(NODE_NET_SERVER_CONNECTION_EVENT, descriptors);
108
}
109

  
110

  
111
void NODE_NET_STREAM_END(node_dtrace_connection_t* conn) {
112
  EVENT_DATA_DESCRIPTOR descriptors[4];
113
  ETW_WRITE_NET_CONNECTION(descriptors, conn);
114
  ETW_WRITE_EVENT(NODE_NET_STREAM_END_EVENT, descriptors);
115
}
116

  
117

  
118
void NODE_GC_START(GCType type, GCCallbackFlags flags) {
119
  EVENT_DATA_DESCRIPTOR descriptors[2];
120
  ETW_WRITE_GC(descriptors, type, flags);
121
  ETW_WRITE_EVENT(NODE_GC_START_EVENT, descriptors);
122
}
123

  
124

  
125
void NODE_GC_DONE(GCType type, GCCallbackFlags flags) {
126
  EVENT_DATA_DESCRIPTOR descriptors[2];
127
  ETW_WRITE_GC(descriptors, type, flags);
128
  ETW_WRITE_EVENT(NODE_GC_DONE_EVENT, descriptors);
129
}
130

  
131

  
132
bool NODE_HTTP_SERVER_REQUEST_ENABLED() { return events_enabled > 0; }
133
bool NODE_HTTP_SERVER_RESPONSE_ENABLED() { return events_enabled > 0; }
134
bool NODE_HTTP_CLIENT_REQUEST_ENABLED() { return events_enabled > 0; }
135
bool NODE_HTTP_CLIENT_RESPONSE_ENABLED() { return events_enabled > 0; }
136
bool NODE_NET_SERVER_CONNECTION_ENABLED() { return events_enabled > 0; }
137
bool NODE_NET_STREAM_END_ENABLED() { return events_enabled > 0; }
138
bool NODE_NET_SOCKET_READ_ENABLED() { return events_enabled > 0; }
139
bool NODE_NET_SOCKET_WRITE_ENABLED() { return events_enabled > 0; }
140
}
141
#endif  // SRC_ETW_INL_H_
src/node_win32_etw_provider.cc
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
#include "node_dtrace.h"
23
#include "node_win32_etw_provider.h"
24
#include "node_etw_provider.h"
25

  
26
namespace node {
27

  
28
using namespace v8;
29

  
30
HMODULE advapi;
31
REGHANDLE node_provider;
32
EventRegisterFunc event_register;
33
EventUnregisterFunc event_unregister;
34
EventWriteFunc event_write;
35
int events_enabled;
36

  
37
// This callback is called by ETW when consumers of our provider
38
// are enabled or disabled.
39
// The callback is dispatched on ETW thread.
40
void NTAPI etw_events_enable_callback(
41
  LPCGUID SourceId,
42
  ULONG IsEnabled,
43
  UCHAR Level,
44
  ULONGLONG MatchAnyKeyword,
45
  ULONGLONG MatchAllKeywords,
46
  PEVENT_FILTER_DESCRIPTOR FilterData,
47
  PVOID CallbackContext) {
48
  if (IsEnabled) {
49
    events_enabled++;
50
  } else {
51
    events_enabled--;
52
  }
53
}
54

  
55

  
56
void init_etw() {
57
  events_enabled = 0;
58

  
59
  advapi = LoadLibrary("advapi32.dll");
60
  if (advapi) {
61
    event_register = (EventRegisterFunc)
62
      GetProcAddress(advapi, "EventRegister");
63
    event_unregister = (EventUnregisterFunc)
64
      GetProcAddress(advapi, "EventUnregister");
65
    event_write = (EventWriteFunc)GetProcAddress(advapi, "EventWrite");
66

  
67
    if (event_register) {    
68
      DWORD status = event_register(&NODE_ETW_PROVIDER,
69
                                    etw_events_enable_callback,
70
                                    NULL,
71
                                    &node_provider);
72
      assert(status == ERROR_SUCCESS);
73
    }
74
  }
75
}
76

  
77

  
78
void shutdown_etw() {
79
  if (advapi && event_unregister && node_provider) {
80
    event_unregister(node_provider);
81
    node_provider = 0;
82
  }
83

  
84
  events_enabled = 0;
85

  
86
  if (advapi) {
87
    FreeLibrary(advapi);
88
    advapi = NULL;
89
  }
90
}
91
}
src/node_win32_etw_provider.h
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_
src/res/node_etw_provider.man
1
<instrumentationManifest
2
    xmlns="http://schemas.microsoft.com/win/2004/08/events" 
3
    xmlns:win="http://manifests.microsoft.com/win/2004/08/windows/events"
4
    xmlns:xs="http://www.w3.org/2001/XMLSchema">
5
    <instrumentation>
6
        <events>
7
            <provider name="NodeJS-ETW-provider" 
8
                guid="{77754E9B-264B-4D8D-B981-E4135C1ECB0C}" 
9
                symbol="NODE_ETW_PROVIDER" 
10
                resourceFileName="node.exe" 
11
                messageFileName="node.exe">
12

  
13
                <opcodes>
14
                    <opcode name="NODE_HTTP_SERVER_REQUEST" value="10"/>
15
                    <opcode name="NODE_HTTP_SERVER_RESPONSE" value="11"/>
16
                    <opcode name="NODE_HTTP_CLIENT_REQUEST" value="12"/>
17
                    <opcode name="NODE_HTTP_CLIENT_RESPONSE" value="13"/>
18
                    <opcode name="NODE_NET_SERVER_CONNECTION" value="14"/>
19
                    <opcode name="NODE_NET_STREAM_END" value="15"/>
20
                    <opcode name="NODE_GC_START" value="16"/>
21
                    <opcode name="NODE_GC_DONE" value="17"/>
22
                </opcodes>
23

  
24
                <templates>
25
                    <template tid="node_connection">
26
                        <data name="fd" inType="win:UInt32" />
27
                        <data name="port" inType="win:UInt32" />
28
                        <data name="remote" inType="win:AnsiString" />
29
                        <data name="buffered" inType="win:UInt32" />
30
                    </template>
31

  
32
                    <template tid="node_http_client_request">
33
                        <data name="url" inType="win:AnsiString" />
34
                        <data name="method" inType="win:AnsiString" />
35
                        <data name="fd" inType="win:UInt32" />
36
                        <data name="port" inType="win:UInt32" />
37
                        <data name="remote" inType="win:AnsiString" />
38
                        <data name="buffered" inType="win:UInt32" />
39
                    </template>
40

  
41
                    <template tid="node_http_server_request">
42
                        <data name="url" inType="win:AnsiString" />
43
                        <data name="method" inType="win:AnsiString" />
44
                        <data name="forwardedFor" inType="win:AnsiString" />
45
                        <data name="fd" inType="win:UInt32" />
46
                        <data name="port" inType="win:UInt32" />
47
                        <data name="remote" inType="win:AnsiString" />
48
                        <data name="buffered" inType="win:UInt32" />
49
                    </template>
50

  
51
                    <template tid="node_gc">
52
                        <data name="gctype" inType="win:UInt32" />
53
                        <data name="gccallbackflags" inType="win:UInt32" />
54
                    </template>
55
                </templates>
56

  
57
                <events>
58
                    <event value="1" 
59
                        opcode="NODE_HTTP_SERVER_REQUEST"
60
                        template="node_http_server_request"
61
                        symbol="NODE_HTTP_SERVER_REQUEST_EVENT"
62
                        level="win:Informational"/>
63
                    <event value="2" 
64
                        opcode="NODE_HTTP_SERVER_RESPONSE"
65
                        template="node_connection"
66
                        symbol="NODE_HTTP_SERVER_RESPONSE_EVENT"
67
                        level="win:Informational"/>
68
                    <event value="3" 
69
                        opcode="NODE_HTTP_CLIENT_REQUEST"
70
                        template="node_http_client_request"
71
                        symbol="NODE_HTTP_CLIENT_REQUEST_EVENT"
72
                        level="win:Informational"/>
73
                    <event value="4" 
74
                        opcode="NODE_HTTP_CLIENT_RESPONSE"
75
                        template="node_connection"
76
                        symbol="NODE_HTTP_CLIENT_RESPONSE_EVENT"
77
                        level="win:Informational"/>
78
                    <event value="5" 
79
                        opcode="NODE_NET_SERVER_CONNECTION"
80
                        template="node_connection"
81
                        symbol="NODE_NET_SERVER_CONNECTION_EVENT"
82
                        level="win:Informational"/>
83
                    <event value="6" 
84
                        opcode="NODE_NET_STREAM_END"
85
                        template="node_connection"
86
                        symbol="NODE_NET_STREAM_END_EVENT"
87
                        level="win:Informational"/>
88
                    <event value="7" 
89
                        opcode="NODE_GC_START"
90
                        template="node_gc"
91
                        symbol="NODE_GC_START_EVENT"
92
                        level="win:Informational"/>
93
                    <event value="8" 
94
                        opcode="NODE_GC_DONE"
95
                        template="node_gc"
96
                        symbol="NODE_GC_DONE_EVENT"
97
                        level="win:Informational"/>
98
                </events>
99
            </provider>
100
        </events>
101
    </instrumentation>
102
</instrumentationManifest>
tools/msvs/msi/nodemsi.wixproj
16 16
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
17 17
    <OutputPath>..\..\..\$(Configuration)\</OutputPath>
18 18
    <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
19
    <DefineConstants>Debug;ProductVersion=$(NodeVersion);NPMSourceDir=..\..\..\deps\npm\;ProgramFilesFolderId=ProgramFilesFolder</DefineConstants>
19
    <DefineConstants>Debug;ProductVersion=$(NodeVersion);NoETW=$(NoETW);NPMSourceDir=..\..\..\deps\npm\;ProgramFilesFolderId=ProgramFilesFolder</DefineConstants>
20 20
  </PropertyGroup>
21 21
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
22 22
    <OutputPath>..\..\..\$(Configuration)\</OutputPath>
23 23
    <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
24
    <DefineConstants>Debug;ProductVersion=$(NodeVersion);NPMSourceDir=..\..\..\deps\npm\;ProgramFilesFolderId=ProgramFilesFolder</DefineConstants>
24
    <DefineConstants>Debug;ProductVersion=$(NodeVersion);NoETW=$(NoETW);NPMSourceDir=..\..\..\deps\npm\;ProgramFilesFolderId=ProgramFilesFolder</DefineConstants>
25 25
  </PropertyGroup>
26 26
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
27 27
    <OutputPath>..\..\..\$(Configuration)\</OutputPath>
28 28
    <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
29
    <DefineConstants>Debug;ProductVersion=$(NodeVersion);NPMSourceDir=..\..\..\deps\npm\;ProgramFilesFolderId=ProgramFiles64Folder</DefineConstants>
29
    <DefineConstants>Debug;ProductVersion=$(NodeVersion);NoETW=$(NoETW);NPMSourceDir=..\..\..\deps\npm\;ProgramFilesFolderId=ProgramFiles64Folder</DefineConstants>
30 30
  </PropertyGroup>
31 31
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
32 32
    <OutputPath>..\..\..\$(Configuration)\</OutputPath>
33 33
    <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
34
    <DefineConstants>Debug;ProductVersion=$(NodeVersion);NPMSourceDir=..\..\..\deps\npm\;ProgramFilesFolderId=ProgramFiles64Folder</DefineConstants>
34
    <DefineConstants>Debug;ProductVersion=$(NodeVersion);NoETW=$(NoETW);NPMSourceDir=..\..\..\deps\npm\;ProgramFilesFolderId=ProgramFiles64Folder</DefineConstants>
35 35
  </PropertyGroup>
36 36
  <ItemGroup>
37 37
    <Compile Include="product.wxs" />
tools/msvs/msi/product.wxs
40 40
          </Directory>
41 41
          <Component Id="nodeexe" Guid="AEC0F08E-89B3-4C35-A286-8DB8598597F2">
42 42
            <File Id="filenodeexe" KeyPath="yes" Source="$(var.SourceDir)\node.exe" />
43
            <?if $(var.NoETW) != 1 ?>
44
            <File Id="node_etw_provider_man" Name="node_etw_provider.man" Source="$(var.RepoDir)\src\res\node_etw_provider.man" >
45
              <util:EventManifest MessageFile="[APPLICATIONROOTDIRECTORY]node.exe" ResourceFile="[APPLICATIONROOTDIRECTORY]node.exe"/>
46
            </File>
47
            <?endif?>
43 48
            <Environment Id="npm_env"
44 49
                         Action="set"
45 50
                         Name="PATH"
vcbuild.bat
28 28
set licensertf=
29 29
set upload=
30 30
set jslint=
31
set noetw=
32
set noetw_arg=
33
set noetw_msi_arg=
31 34

  
32 35
:next-arg
33 36
if "%1"=="" goto args-done
......
41 44
if /i "%1"=="nobuild"       set nobuild=1&goto arg-ok
42 45
if /i "%1"=="nosign"        set nosign=1&goto arg-ok
43 46
if /i "%1"=="nosnapshot"    set nosnapshot=1&goto arg-ok
47
if /i "%1"=="noetw"         set noetw=1&goto arg-ok
44 48
if /i "%1"=="licensertf"    set licensertf=1&goto arg-ok
45 49
if /i "%1"=="test-uv"       set test=test-uv&goto arg-ok
46 50
if /i "%1"=="test-internet" set test=test-internet&goto arg-ok
......
65 69
if "%config%"=="Debug" set debug_arg=--debug
66 70
if "%target_arch%"=="x64" set msiplatform=x64
67 71
if defined nosnapshot set nosnapshot_arg=--without-snapshot
72
if defined noetw set noetw_arg=--without-etw& set noetw_msi_arg=/p:NoETW=1
68 73

  
69 74
:project-gen
70 75
@rem Skip project generation if requested.
71 76
if defined noprojgen goto msbuild
72 77

  
73 78
@rem Generate the VS project.
74
python configure %debug_arg% %nosnapshot_arg% --dest-cpu=%target_arch%
79
python configure %debug_arg% %nosnapshot_arg% %noetw_arg% --dest-cpu=%target_arch%
75 80
if errorlevel 1 goto create-msvs-files-failed
76 81
if not exist node.sln goto create-msvs-files-failed
77 82
echo Project files generated.
......
116 121
python "%~dp0tools\getnodeversion.py" > "%temp%\node_version.txt"
117 122
if not errorlevel 0 echo Cannot determine current version of node.js & goto exit
118 123
for /F "tokens=*" %%i in (%temp%\node_version.txt) do set NODE_VERSION=%%i
119
msbuild "%~dp0tools\msvs\msi\nodemsi.sln" /m /t:Clean,Build /p:Configuration=%config% /p:Platform=%msiplatform% /p:NodeVersion=%NODE_VERSION% /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo
124
msbuild "%~dp0tools\msvs\msi\nodemsi.sln" /m /t:Clean,Build /p:Configuration=%config% /p:Platform=%msiplatform% /p:NodeVersion=%NODE_VERSION% %noetw_msi_arg% /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo
120 125
if errorlevel 1 goto exit
121 126

  
122 127
if defined nosign goto run

Also available in: Unified diff