etw,build: always generate .rc and .h files

We can assume the Windows SDK is installed, hence the intermediate
files generated from manifest should not be part of the source tree.
This also fixes incorrect detection of ctrpp.exe, that should be in
the path.

PR-URL: https://github.com/nodejs/node/pull/5657
Reviewed-By: Alexis Campailla <orangemocha@nodejs.org>
This commit is contained in:
João Reis 2016-03-11 10:26:20 +00:00
parent b6475b9a9d
commit ccd81889fa
9 changed files with 3 additions and 173 deletions

1
.gitignore vendored
View File

@ -50,6 +50,7 @@ ipch/
/dist-osx
/npm.wxs
/tools/msvs/npm.wixobj
/tools/msvs/genfiles/
/tools/osx-pkg.pmdoc/index.xml
/test/addons/??_*/
email.md

16
configure vendored
View File

@ -846,21 +846,6 @@ def configure_static(o):
o['libraries'] += ['-static-libasan']
def configure_winsdk(o):
if flavor != 'win':
return
winsdk_dir = os.environ.get('WindowsSdkDir')
if winsdk_dir and os.path.isfile(winsdk_dir + '\\bin\\ctrpp.exe'):
print('Found ctrpp in WinSDK--will build generated files '
'into tools/msvs/genfiles.')
o['variables']['node_has_winsdk'] = 'true'
return
print('ctrpp not found in WinSDK path--using pre-gen files '
'from tools/msvs/genfiles.')
def write(filename, data):
filename = os.path.join(root_dir, filename)
print 'creating ', filename
@ -1139,7 +1124,6 @@ configure_library('http_parser', output)
configure_library('libuv', output)
configure_v8(output)
configure_openssl(output)
configure_winsdk(output)
configure_intl(output)
configure_static(output)

View File

@ -6,7 +6,6 @@
'node_use_etw%': 'false',
'node_use_perfctr%': 'false',
'node_no_browser_globals%': 'false',
'node_has_winsdk%': 'false',
'node_shared_zlib%': 'false',
'node_shared_http_parser%': 'false',
'node_shared_libuv%': 'false',
@ -471,7 +470,7 @@
'target_name': 'node_etw',
'type': 'none',
'conditions': [
[ 'node_use_etw=="true" and node_has_winsdk=="true"', {
[ 'node_use_etw=="true"', {
'actions': [
{
'action_name': 'node_etw',
@ -492,7 +491,7 @@
'target_name': 'node_perfctr',
'type': 'none',
'conditions': [
[ 'node_use_perfctr=="true" and node_has_winsdk=="true"', {
[ 'node_use_perfctr=="true"', {
'actions': [
{
'action_name': 'node_perfctr_man',

Binary file not shown.

View File

@ -1,59 +0,0 @@
//**********************************************************************`
//* This is an include file generated by Message Compiler. *`
//* *`
//* Copyright (c) Microsoft Corporation. All Rights Reserved. *`
//**********************************************************************`
#pragma once
//+
// Provider NodeJS-ETW-provider Event Count 12
//+
EXTERN_C __declspec(selectany) const GUID NODE_ETW_PROVIDER = {0x77754e9b, 0x264b, 0x4d8d, {0xb9, 0x81, 0xe4, 0x13, 0x5c, 0x1e, 0xcb, 0x0c}};
//
// Opcodes
//
#define NODE_ETW_PROVIDER_OPCODE_NODE_HTTP_SERVER_REQUEST 0xa
#define NODE_ETW_PROVIDER_OPCODE_NODE_HTTP_SERVER_RESPONSE 0xb
#define NODE_ETW_PROVIDER_OPCODE_NODE_HTTP_CLIENT_REQUEST 0xc
#define NODE_ETW_PROVIDER_OPCODE_NODE_HTTP_CLIENT_RESPONSE 0xd
#define NODE_ETW_PROVIDER_OPCODE_NODE_NET_SERVER_CONNECTION 0xe
#define NODE_ETW_PROVIDER_OPCODE_NODE_NET_STREAM_END 0xf
#define NODE_ETW_PROVIDER_OPCODE_NODE_GC_START 0x10
#define NODE_ETW_PROVIDER_OPCODE_NODE_GC_DONE 0x11
#define NODE_ETW_PROVIDER_OPCODE_NODE_V8SYMBOL_REMOVE 0x15
#define NODE_ETW_PROVIDER_OPCODE_NODE_V8SYMBOL_MOVE 0x16
#define NODE_ETW_PROVIDER_OPCODE_NODE_V8SYMBOL_RESET 0x17
#define JSCRIPT_METHOD_METHODLOAD_OPCODE 0xa
//
// Tasks
//
#define JSCRIPT_METHOD_RUNTIME_TASK 0x1
//
// Event Descriptors
//
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR NODE_HTTP_SERVER_REQUEST_EVENT = {0x1, 0x0, 0x0, 0x4, 0xa, 0x0, 0x0};
#define NODE_HTTP_SERVER_REQUEST_EVENT_value 0x1
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR NODE_HTTP_SERVER_RESPONSE_EVENT = {0x2, 0x0, 0x0, 0x4, 0xb, 0x0, 0x0};
#define NODE_HTTP_SERVER_RESPONSE_EVENT_value 0x2
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR NODE_HTTP_CLIENT_REQUEST_EVENT = {0x3, 0x0, 0x0, 0x4, 0xc, 0x0, 0x0};
#define NODE_HTTP_CLIENT_REQUEST_EVENT_value 0x3
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR NODE_HTTP_CLIENT_RESPONSE_EVENT = {0x4, 0x0, 0x0, 0x4, 0xd, 0x0, 0x0};
#define NODE_HTTP_CLIENT_RESPONSE_EVENT_value 0x4
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR NODE_NET_SERVER_CONNECTION_EVENT = {0x5, 0x0, 0x0, 0x4, 0xe, 0x0, 0x0};
#define NODE_NET_SERVER_CONNECTION_EVENT_value 0x5
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR NODE_NET_STREAM_END_EVENT = {0x6, 0x0, 0x0, 0x4, 0xf, 0x0, 0x0};
#define NODE_NET_STREAM_END_EVENT_value 0x6
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR NODE_GC_START_EVENT = {0x7, 0x0, 0x0, 0x4, 0x10, 0x0, 0x0};
#define NODE_GC_START_EVENT_value 0x7
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR NODE_GC_DONE_EVENT = {0x8, 0x0, 0x0, 0x4, 0x11, 0x0, 0x0};
#define NODE_GC_DONE_EVENT_value 0x8
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR MethodLoad = {0x9, 0x0, 0x0, 0x4, 0xa, 0x1, 0x0};
#define MethodLoad_value 0x9
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR NODE_V8SYMBOL_REMOVE_EVENT = {0x15, 0x0, 0x0, 0x4, 0x15, 0x0, 0x0};
#define NODE_V8SYMBOL_REMOVE_EVENT_value 0x15
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR NODE_V8SYMBOL_MOVE_EVENT = {0x16, 0x0, 0x0, 0x4, 0x16, 0x0, 0x0};
#define NODE_V8SYMBOL_MOVE_EVENT_value 0x16
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR NODE_V8SYMBOL_RESET_EVENT = {0x17, 0x0, 0x0, 0x4, 0x17, 0x0, 0x0};
#define NODE_V8SYMBOL_RESET_EVENT_value 0x17

View File

@ -1,3 +0,0 @@
LANGUAGE 0x9,0x1
1 11 "MSG00001.bin"
1 WEVT_TEMPLATE "node_etw_providerTEMP.BIN"

View File

@ -1,92 +0,0 @@
//------------------------------------------------------------------
// !!! WARNING !!!
//
// This file is auto generated by ctrpp.exe utility from performance
// counters manifest:
//
// src\res\node_perfctr_provider.man
//
// It should be regenerated every time the code is built.
// Do not check it in.
//-------------------------------------------------------------------
#pragma once
#include <winperf.h>
#include <perflib.h>
EXTERN_C DECLSPEC_SELECTANY GUID NodeCounterProviderGuid = { 0x1e2e15d7, 0x3760, 0x470e, 0x86, 0x99, 0xb9, 0xdb, 0x52, 0x48, 0xed, 0xd5 };
EXTERN_C DECLSPEC_SELECTANY GUID NodeCounterSetGuid = { 0x3a22a8ec, 0x297c, 0x48ac, 0xab, 0x15, 0x33, 0xec, 0x93, 0x3, 0x3f, 0xd8 };
EXTERN_C DECLSPEC_SELECTANY HANDLE NodeCounterProvider = NULL;
EXTERN_C DECLSPEC_SELECTANY struct {
PERF_COUNTERSET_INFO CounterSet;
PERF_COUNTER_INFO Counter0;
PERF_COUNTER_INFO Counter1;
PERF_COUNTER_INFO Counter2;
PERF_COUNTER_INFO Counter3;
PERF_COUNTER_INFO Counter4;
PERF_COUNTER_INFO Counter5;
PERF_COUNTER_INFO Counter6;
PERF_COUNTER_INFO Counter7;
PERF_COUNTER_INFO Counter8;
PERF_COUNTER_INFO Counter9;
} NodeCounterSetInfo = {
{ { 0x3a22a8ec, 0x297c, 0x48ac, 0xab, 0x15, 0x33, 0xec, 0x93, 0x3, 0x3f, 0xd8 }, { 0x1e2e15d7, 0x3760, 0x470e, 0x86, 0x99, 0xb9, 0xdb, 0x52, 0x48, 0xed, 0xd5 }, 10, PERF_COUNTERSET_MULTI_AGGREGATE },
{ 1, PERF_COUNTER_COUNTER, 0, sizeof(ULONG), PERF_DETAIL_NOVICE, 0, 0 },
{ 2, PERF_COUNTER_COUNTER, 0, sizeof(ULONG), PERF_DETAIL_NOVICE, 0, 0 },
{ 3, PERF_COUNTER_COUNTER, 0, sizeof(ULONG), PERF_DETAIL_NOVICE, 0, 0 },
{ 4, PERF_COUNTER_COUNTER, 0, sizeof(ULONG), PERF_DETAIL_NOVICE, 0, 0 },
{ 5, PERF_COUNTER_RAWCOUNT, 0, sizeof(ULONG), PERF_DETAIL_NOVICE, 0, 0 },
{ 6, PERF_COUNTER_BULK_COUNT, 0, sizeof(ULONGLONG), PERF_DETAIL_NOVICE, 4294967293, 0 },
{ 7, PERF_COUNTER_BULK_COUNT, 0, sizeof(ULONGLONG), PERF_DETAIL_NOVICE, 4294967293, 0 },
{ 8, PERF_COUNTER_RAWCOUNT, 0, sizeof(ULONG), PERF_DETAIL_NOVICE, 0, 0 },
{ 9, PERF_COUNTER_BULK_COUNT, 0, sizeof(ULONGLONG), PERF_DETAIL_NOVICE, 4294967293, 0 },
{ 10, PERF_COUNTER_BULK_COUNT, 0, sizeof(ULONGLONG), PERF_DETAIL_NOVICE, 4294967293, 0 },
};
EXTERN_C FORCEINLINE
VOID
CounterCleanup(
VOID
)
{
if (NodeCounterProvider != NULL) {
PerfStopProvider(NodeCounterProvider);
NodeCounterProvider = NULL;
}
}
EXTERN_C FORCEINLINE
ULONG
CounterInitialize(
VOID
)
{
ULONG Status;
PERF_PROVIDER_CONTEXT ProviderContext;
ZeroMemory(&ProviderContext, sizeof(PERF_PROVIDER_CONTEXT));
ProviderContext.ContextSize = sizeof(PERF_PROVIDER_CONTEXT);
Status = PerfStartProviderEx(&NodeCounterProviderGuid,
&ProviderContext,
&NodeCounterProvider);
if (Status != ERROR_SUCCESS) {
NodeCounterProvider = NULL;
return Status;
}
Status = PerfSetCounterSetInfo(NodeCounterProvider,
&NodeCounterSetInfo.CounterSet,
sizeof NodeCounterSetInfo);
if (Status != ERROR_SUCCESS) {
CounterCleanup();
return Status;
}
return ERROR_SUCCESS;
}