diff --git a/configure.py b/configure.py index da696a92b48c1a..349dca827e81c7 100755 --- a/configure.py +++ b/configure.py @@ -455,11 +455,6 @@ parser.add_option_group(http2_optgroup) -parser.add_option('--with-perfctr', - action='store_true', - dest='with_perfctr', - help='build with performance counters (default is true on Windows)') - parser.add_option('--without-dtrace', action='store_true', dest='without_dtrace', @@ -475,11 +470,6 @@ dest='without_npm', help='do not install the bundled npm (package manager)') -parser.add_option('--without-perfctr', - action='store_true', - dest='without_perfctr', - help='build without performance counters') - # Dummy option for backwards compatibility parser.add_option('--with-snapshot', action='store_true', @@ -1018,14 +1008,6 @@ def configure_node(o): else: o['variables']['node_use_etw'] = 'false' - # By default, enable Performance counters on Windows. - if flavor == 'win': - o['variables']['node_use_perfctr'] = b(not options.without_perfctr) - elif options.with_perfctr: - raise Exception('Performance counter is only supported on Windows.') - else: - o['variables']['node_use_perfctr'] = 'false' - o['variables']['node_with_ltcg'] = b(options.with_ltcg) if flavor != 'win' and options.with_ltcg: raise Exception('Link Time Code Generation is only supported on Windows.') diff --git a/lib/_http_client.js b/lib/_http_client.js index 372ac0f953ff51..cbc77744894bd9 100644 --- a/lib/_http_client.js +++ b/lib/_http_client.js @@ -285,7 +285,6 @@ util.inherits(ClientRequest, OutgoingMessage); ClientRequest.prototype._finish = function _finish() { DTRACE_HTTP_CLIENT_REQUEST(this, this.connection); - COUNTER_HTTP_CLIENT_REQUEST(); OutgoingMessage.prototype._finish.call(this); }; @@ -554,7 +553,6 @@ function parserOnIncomingClient(res, shouldKeepAlive) { } DTRACE_HTTP_CLIENT_RESPONSE(socket, req); - COUNTER_HTTP_CLIENT_RESPONSE(); req.res = res; res.req = req; diff --git a/lib/_http_server.js b/lib/_http_server.js index 6e1b2c90e5351d..b216eab32a3542 100644 --- a/lib/_http_server.js +++ b/lib/_http_server.js @@ -140,7 +140,6 @@ util.inherits(ServerResponse, OutgoingMessage); ServerResponse.prototype._finish = function _finish() { DTRACE_HTTP_SERVER_RESPONSE(this.connection); - COUNTER_HTTP_SERVER_RESPONSE(); OutgoingMessage.prototype._finish.call(this); }; @@ -624,7 +623,6 @@ function parserOnIncoming(server, socket, state, req, keepAlive) { res.shouldKeepAlive = keepAlive; DTRACE_HTTP_SERVER_REQUEST(req, socket); - COUNTER_HTTP_SERVER_REQUEST(); if (socket._httpMessage) { // There are already pending outgoing res, append. diff --git a/lib/internal/bootstrap/node.js b/lib/internal/bootstrap/node.js index 265bc81d0c8711..bc7a59bcbc702e 100644 --- a/lib/internal/bootstrap/node.js +++ b/lib/internal/bootstrap/node.js @@ -171,11 +171,11 @@ NativeModule.require('internal/process/esm_loader').setup(); } + const { deprecate } = NativeModule.require('internal/util'); { // Install legacy getters on the `util` binding for typechecking. // TODO(addaleax): Turn into a full runtime deprecation. const { pendingDeprecation } = process.binding('config'); - const { deprecate } = NativeModule.require('internal/util'); const utilBinding = internalBinding('util'); const types = internalBinding('types'); for (const name of [ @@ -194,6 +194,31 @@ } } + // TODO(jasnell): The following have been globals since around 2012. + // That's just silly. The underlying perfctr support has been removed + // so these are now deprecated non-ops that can be removed after one + // major release cycle. + if (process.platform === 'win32') { + function noop() {} + const names = [ + 'NET_SERVER_CONNECTION', + 'NET_SERVER_CONNECTION_CLOSE', + 'HTTP_SERVER_REQUEST', + 'HTTP_SERVER_RESPONSE', + 'HTTP_CLIENT_REQUEST', + 'HTTP_CLIENT_RESPONSE' + ]; + for (var n = 0; n < names.length; n++) { + Object.defineProperty(global, `COUNTER_${names[n]}`, { + configurable: true, + enumerable: false, + value: deprecate(noop, + `COUNTER_${names[n]}() is deprecated.`, + 'DEP00XX') + }); + } + } + perf.markMilestone(NODE_PERFORMANCE_MILESTONE_BOOTSTRAP_COMPLETE); setupAllowedFlags(); diff --git a/lib/net.js b/lib/net.js index 981ee876ba0dbb..fdf7e8a1d0f910 100644 --- a/lib/net.js +++ b/lib/net.js @@ -615,7 +615,6 @@ Socket.prototype._destroy = function(exception, cb) { cb(exception); if (this._server) { - COUNTER_NET_SERVER_CONNECTION_CLOSE(this); debug('has server'); this._server._connections--; if (this._server._emitCloseIfDrained) { @@ -1522,7 +1521,6 @@ function onconnection(err, clientHandle) { socket._server = self; DTRACE_NET_SERVER_CONNECTION(socket); - COUNTER_NET_SERVER_CONNECTION(socket); self.emit('connection', socket); } diff --git a/node.gyp b/node.gyp index 3f71e154b98958..04875ec457f6d0 100644 --- a/node.gyp +++ b/node.gyp @@ -4,7 +4,6 @@ 'v8_trace_maps%': 0, 'node_use_dtrace%': 'false', 'node_use_etw%': 'false', - 'node_use_perfctr%': 'false', 'node_no_browser_globals%': 'false', 'node_code_cache_path%': '', 'node_use_v8_platform%': 'true', @@ -285,11 +284,6 @@ 'sources': [ 'tools/msvs/genfiles/node_etw_provider.rc' ], - }], - [ 'node_use_perfctr=="true"', { - 'sources': [ - 'tools/msvs/genfiles/node_perfctr_provider.rc', - ], }] ], }], @@ -565,28 +559,6 @@ }], ], }], - [ 'node_use_perfctr=="true"', { - 'defines': [ 'HAVE_PERFCTR=1' ], - 'dependencies': [ 'node_perfctr' ], - 'include_dirs': [ - 'src', - 'tools/msvs/genfiles', - '<(SHARED_INTERMEDIATE_DIR)' # for node_natives.h - ], - 'sources': [ - 'src/node_win32_perfctr_provider.h', - 'src/node_win32_perfctr_provider.cc', - 'src/node_counters.cc', - 'src/node_counters.h', - ], - 'conditions': [ - ['node_intermediate_lib_type != "static_library"', { - 'sources': [ - 'tools/msvs/genfiles/node_perfctr_provider.rc', - ], - }], - ], - }], [ 'node_use_dtrace=="true"', { 'defines': [ 'HAVE_DTRACE=1' ], 'dependencies': [ @@ -710,30 +682,6 @@ } ] ] }, - # generate perf counter header and resource files - { - 'target_name': 'node_perfctr', - 'type': 'none', - 'conditions': [ - [ 'node_use_perfctr=="true"', { - 'actions': [ - { - 'action_name': 'node_perfctr_man', - 'inputs': [ 'src/res/node_perfctr_provider.man' ], - 'outputs': [ - 'tools/msvs/genfiles/node_perfctr_provider.h', - 'tools/msvs/genfiles/node_perfctr_provider.rc', - 'tools/msvs/genfiles/MSG00001.BIN', - ], - 'action': [ 'ctrpp <@(_inputs) ' - '-o tools/msvs/genfiles/node_perfctr_provider.h ' - '-rc tools/msvs/genfiles/node_perfctr_provider.rc' - ] - }, - ], - } ] - ] - }, { 'target_name': 'node_js2c', 'type': 'none', @@ -754,9 +702,6 @@ [ 'node_use_dtrace=="false" and node_use_etw=="false"', { 'inputs': [ 'src/notrace_macros.py' ] }], - [ 'node_use_perfctr=="false"', { - 'inputs': [ 'src/noperfctr_macros.py' ] - }], [ 'node_debug_lib=="false"', { 'inputs': [ 'tools/nodcheck_macros.py' ] }], @@ -985,9 +930,6 @@ 'HAVE_OPENSSL=1', ], }], - [ 'node_use_perfctr=="true"', { - 'defines': [ 'HAVE_PERFCTR=1' ], - }], ['v8_enable_inspector==1', { 'sources': [ 'test/cctest/test_inspector_socket.cc', diff --git a/src/node.cc b/src/node.cc index 72a83d538ff5d5..b1fbbc36be7763 100644 --- a/src/node.cc +++ b/src/node.cc @@ -31,10 +31,6 @@ #include "node_context_data.h" #include "tracing/traced_value.h" -#if defined HAVE_PERFCTR -#include "node_counters.h" -#endif - #if HAVE_OPENSSL #include "node_crypto.h" #endif @@ -2229,10 +2225,6 @@ void LoadEnvironment(Environment* env) { InitDTrace(env, global); #endif -#if defined HAVE_PERFCTR - InitPerfCounters(env, global); -#endif - // Enable handling of uncaught exceptions // (FatalException(), break on uncaught exception in debugger) // diff --git a/src/node_counters.cc b/src/node_counters.cc deleted file mode 100644 index 99b3b8fd8ba1ac..00000000000000 --- a/src/node_counters.cc +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -#include "node_counters.h" -#include "node_internals.h" -#include "uv.h" -#include "env-inl.h" - -#include - - -namespace node { - -using v8::FunctionCallbackInfo; -using v8::FunctionTemplate; -using v8::GCCallbackFlags; -using v8::GCType; -using v8::HandleScope; -using v8::Isolate; -using v8::Local; -using v8::Object; -using v8::String; -using v8::Value; - -static uint64_t counter_gc_start_time; -static uint64_t counter_gc_end_time; - - -void COUNTER_NET_SERVER_CONNECTION(const FunctionCallbackInfo&) { - NODE_COUNT_SERVER_CONN_OPEN(); -} - - -void COUNTER_NET_SERVER_CONNECTION_CLOSE(const FunctionCallbackInfo&) { - NODE_COUNT_SERVER_CONN_CLOSE(); -} - - -void COUNTER_HTTP_SERVER_REQUEST(const FunctionCallbackInfo&) { - NODE_COUNT_HTTP_SERVER_REQUEST(); -} - - -void COUNTER_HTTP_SERVER_RESPONSE(const FunctionCallbackInfo&) { - NODE_COUNT_HTTP_SERVER_RESPONSE(); -} - - -void COUNTER_HTTP_CLIENT_REQUEST(const FunctionCallbackInfo&) { - NODE_COUNT_HTTP_CLIENT_REQUEST(); -} - - -void COUNTER_HTTP_CLIENT_RESPONSE(const FunctionCallbackInfo&) { - NODE_COUNT_HTTP_CLIENT_RESPONSE(); -} - - -static void counter_gc_start(Isolate* isolate, - GCType type, - GCCallbackFlags flags) { - counter_gc_start_time = NODE_COUNT_GET_GC_RAWTIME(); -} - - -static void counter_gc_done(Isolate* isolate, - GCType type, - GCCallbackFlags flags) { - uint64_t endgc = NODE_COUNT_GET_GC_RAWTIME(); - if (endgc != 0) { - uint64_t totalperiod = endgc - counter_gc_end_time; - uint64_t gcperiod = endgc - counter_gc_start_time; - - if (totalperiod > 0) { - unsigned int percent = static_cast( - (gcperiod * 100) / totalperiod); - - NODE_COUNT_GC_PERCENTTIME(percent); - counter_gc_end_time = endgc; - } - } -} - - -void InitPerfCounters(Environment* env, Local target) { - HandleScope scope(env->isolate()); - - static struct { - const char* name; - void (*func)(const FunctionCallbackInfo&); - } tab[] = { -#define NODE_PROBE(name) #name, name - { NODE_PROBE(COUNTER_NET_SERVER_CONNECTION) }, - { NODE_PROBE(COUNTER_NET_SERVER_CONNECTION_CLOSE) }, - { NODE_PROBE(COUNTER_HTTP_SERVER_REQUEST) }, - { NODE_PROBE(COUNTER_HTTP_SERVER_RESPONSE) }, - { NODE_PROBE(COUNTER_HTTP_CLIENT_REQUEST) }, - { NODE_PROBE(COUNTER_HTTP_CLIENT_RESPONSE) } -#undef NODE_PROBE - }; - - for (size_t i = 0; i < arraysize(tab); i++) { - Local key = OneByteString(env->isolate(), tab[i].name); - Local val = env->NewFunctionTemplate(tab[i].func)->GetFunction(); - target->Set(key, val); - } - - // Only Windows performance counters supported - // To enable other OS, use conditional compilation here - InitPerfCountersWin32(); - - // init times for GC percent calculation and hook callbacks - counter_gc_start_time = NODE_COUNT_GET_GC_RAWTIME(); - counter_gc_end_time = counter_gc_start_time; - - env->isolate()->AddGCPrologueCallback(counter_gc_start); - env->isolate()->AddGCEpilogueCallback(counter_gc_done); -} - - -void TermPerfCounters(Local target) { - // Only Windows performance counters supported - // To enable other OS, use conditional compilation here - TermPerfCountersWin32(); -} - -} // namespace node diff --git a/src/node_counters.h b/src/node_counters.h deleted file mode 100644 index c8a1a88f0b25e0..00000000000000 --- a/src/node_counters.h +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -#ifndef SRC_NODE_COUNTERS_H_ -#define SRC_NODE_COUNTERS_H_ - -#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS - -#include "node_internals.h" - -#ifdef HAVE_PERFCTR -#include "node_win32_perfctr_provider.h" -#else -#define NODE_COUNTER_ENABLED() (false) -#define NODE_COUNT_GC_PERCENTTIME(percent) do { } while (false) -#define NODE_COUNT_GET_GC_RAWTIME() do { } while (false) -#define NODE_COUNT_HTTP_CLIENT_REQUEST() do { } while (false) -#define NODE_COUNT_HTTP_CLIENT_RESPONSE() do { } while (false) -#define NODE_COUNT_HTTP_SERVER_REQUEST() do { } while (false) -#define NODE_COUNT_HTTP_SERVER_RESPONSE() do { } while (false) -#define NODE_COUNT_NET_BYTES_RECV(bytes) do { } while (false) -#define NODE_COUNT_NET_BYTES_SENT(bytes) do { } while (false) -#define NODE_COUNT_PIPE_BYTES_RECV(bytes) do { } while (false) -#define NODE_COUNT_PIPE_BYTES_SENT(bytes) do { } while (false) -#define NODE_COUNT_SERVER_CONN_CLOSE() do { } while (false) -#define NODE_COUNT_SERVER_CONN_OPEN() do { } while (false) -#endif - -#include "v8.h" -#include "env.h" - -namespace node { - -void InitPerfCounters(Environment* env, v8::Local target); -void TermPerfCounters(v8::Local target); - -} // namespace node - -#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS - -#endif // SRC_NODE_COUNTERS_H_ diff --git a/src/node_internals.h b/src/node_internals.h index 5cf606ddeecd72..1afe6ca2cbc94c 100644 --- a/src/node_internals.h +++ b/src/node_internals.h @@ -132,7 +132,7 @@ struct sockaddr; V(string_decoder) \ V(symbols) \ V(tcp_wrap) \ - V(timers) \ + V(timers) \ V(trace_events) \ V(tty_wrap) \ V(types) \ diff --git a/src/node_win32_perfctr_provider.cc b/src/node_win32_perfctr_provider.cc deleted file mode 100644 index 7e94db9fed97ea..00000000000000 --- a/src/node_win32_perfctr_provider.cc +++ /dev/null @@ -1,345 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -#define __INIT_node_perfctr_provider_IMP -#include "node_counters.h" -#include "node_win32_perfctr_provider.h" - -#include - -#include "node_perfctr_provider.h" - - -typedef ULONG (WINAPI* PerfStartProviderExFunc)( - __in LPGUID ProviderGuid, - __in_opt PPERF_PROVIDER_CONTEXT ProviderContext, - __out PHANDLE Provider); - -typedef ULONG (WINAPI* PerfStopProviderFunc)( - __in HANDLE ProviderHandle); - -typedef ULONG (WINAPI* PerfSetCounterSetInfoFunc)( - __in HANDLE ProviderHandle, - __inout_bcount(TemplateSize) PPERF_COUNTERSET_INFO Template, - __in ULONG TemplateSize); - -typedef PPERF_COUNTERSET_INSTANCE (WINAPI* PerfCreateInstanceFunc)( - __in HANDLE ProviderHandle, - __in LPCGUID CounterSetGuid, - __in PCWSTR Name, - __in ULONG Id); - -typedef ULONG (WINAPI* PerfDeleteInstanceFunc)( - __in HANDLE Provider, - __in PPERF_COUNTERSET_INSTANCE InstanceBlock); - -typedef ULONG (WINAPI* PerfSetULongCounterValueFunc)( - __in HANDLE Provider, - __inout PPERF_COUNTERSET_INSTANCE Instance, - __in ULONG CounterId, - __in ULONG Value); - -typedef ULONG (WINAPI* PerfSetULongLongCounterValueFunc)( - __in HANDLE Provider, - __inout PPERF_COUNTERSET_INSTANCE Instance, - __in ULONG CounterId, - __in ULONGLONG Value); - -typedef ULONG (WINAPI* PerfIncrementULongCounterValueFunc)( - __in HANDLE Provider, - __inout PPERF_COUNTERSET_INSTANCE Instance, - __in ULONG CounterId, - __in ULONG Value); - -typedef ULONG (WINAPI* PerfIncrementULongLongCounterValueFunc)( - __in HANDLE Provider, - __inout PPERF_COUNTERSET_INSTANCE Instance, - __in ULONG CounterId, - __in ULONGLONG Value); - -typedef ULONG (WINAPI* PerfDecrementULongCounterValueFunc)( - __in HANDLE Provider, - __inout PPERF_COUNTERSET_INSTANCE Instance, - __in ULONG CounterId, - __in ULONG Value); - -typedef ULONG (WINAPI* PerfDecrementULongLongCounterValueFunc)( - __in HANDLE Provider, - __inout PPERF_COUNTERSET_INSTANCE Instance, - __in ULONG CounterId, - __in ULONGLONG Value); - - -HMODULE advapimod; -PerfStartProviderExFunc perfctr_startProvider; -PerfStopProviderFunc perfctr_stopProvider; -PerfSetCounterSetInfoFunc perfctr_setCounterSetInfo; -PerfCreateInstanceFunc perfctr_createInstance; -PerfDeleteInstanceFunc perfctr_deleteInstance; -PerfSetULongCounterValueFunc perfctr_setULongValue; -PerfSetULongLongCounterValueFunc perfctr_setULongLongValue; -PerfIncrementULongCounterValueFunc perfctr_incrementULongValue; -PerfIncrementULongLongCounterValueFunc perfctr_incrementULongLongValue; -PerfDecrementULongCounterValueFunc perfctr_decrementULongValue; -PerfDecrementULongLongCounterValueFunc perfctr_decrementULongLongValue; - -PPERF_COUNTERSET_INSTANCE perfctr_instance; - - -#define NODE_COUNTER_HTTP_SERVER_REQUEST 1 -#define NODE_COUNTER_HTTP_SERVER_RESPONSE 2 -#define NODE_COUNTER_HTTP_CLIENT_REQUEST 3 -#define NODE_COUNTER_HTTP_CLIENT_RESPONSE 4 -#define NODE_COUNTER_SERVER_CONNS 5 -#define NODE_COUNTER_NET_BYTES_SENT 6 -#define NODE_COUNTER_NET_BYTES_RECV 7 -#define NODE_COUNTER_GC_PERCENTTIME 8 -#define NODE_COUNTER_PIPE_BYTES_SENT 9 -#define NODE_COUNTER_PIPE_BYTES_RECV 10 - - -namespace node { - - -HANDLE NodeCounterProvider = nullptr; - -void InitPerfCountersWin32() { - ULONG status; - PERF_PROVIDER_CONTEXT providerContext; - - // create instance name using pid -#define INST_MAX_LEN 32 -#define INST_PREFIX_LEN 5 -#define INST_PREFIX L"node_" - - wchar_t Inst[INST_MAX_LEN]; - DWORD pid = GetCurrentProcessId(); - wcscpy_s(Inst, INST_MAX_LEN, INST_PREFIX); - _itow_s(pid, Inst + INST_PREFIX_LEN, INST_MAX_LEN - INST_PREFIX_LEN, 10); - - advapimod = LoadLibraryW(L"advapi32.dll"); - if (advapimod) { - perfctr_startProvider = (PerfStartProviderExFunc) - GetProcAddress(advapimod, "PerfStartProviderEx"); - perfctr_stopProvider = (PerfStopProviderFunc) - GetProcAddress(advapimod, "PerfStopProvider"); - perfctr_setCounterSetInfo = (PerfSetCounterSetInfoFunc) - GetProcAddress(advapimod, "PerfSetCounterSetInfo"); - perfctr_createInstance = (PerfCreateInstanceFunc) - GetProcAddress(advapimod, "PerfCreateInstance"); - perfctr_deleteInstance = (PerfDeleteInstanceFunc) - GetProcAddress(advapimod, "PerfDeleteInstance"); - perfctr_setULongValue = (PerfSetULongCounterValueFunc) - GetProcAddress(advapimod, "PerfSetULongCounterValue"); - perfctr_setULongLongValue = (PerfSetULongLongCounterValueFunc) - GetProcAddress(advapimod, "PerfSetULongLongCounterValue"); - perfctr_incrementULongValue = (PerfIncrementULongCounterValueFunc) - GetProcAddress(advapimod, "PerfIncrementULongCounterValue"); - perfctr_incrementULongLongValue = (PerfIncrementULongLongCounterValueFunc) - GetProcAddress(advapimod, "PerfIncrementULongLongCounterValue"); - perfctr_decrementULongValue = (PerfDecrementULongCounterValueFunc) - GetProcAddress(advapimod, "PerfDecrementULongCounterValue"); - perfctr_decrementULongLongValue = (PerfDecrementULongLongCounterValueFunc) - GetProcAddress(advapimod, "PerfDecrementULongLongCounterValue"); - - ZeroMemory(&providerContext, sizeof(providerContext)); - providerContext.ContextSize = sizeof(providerContext); - - if (!perfctr_startProvider || - !perfctr_setCounterSetInfo || - !perfctr_createInstance) { - NodeCounterProvider = nullptr; - return; - } - - status = perfctr_startProvider(&NodeCounterSetGuid, - &providerContext, - &NodeCounterProvider); - if (status != ERROR_SUCCESS) { - NodeCounterProvider = nullptr; - return; - } - - status = perfctr_setCounterSetInfo(NodeCounterProvider, - &NodeCounterSetInfo.CounterSet, - sizeof(NodeCounterSetInfo.CounterSet)); - if (status != ERROR_SUCCESS) { - perfctr_stopProvider(NodeCounterProvider); - NodeCounterProvider = nullptr; - return; - } - - perfctr_instance = perfctr_createInstance(NodeCounterProvider, - &NodeCounterSetGuid, - Inst, - 1); - if (perfctr_instance == nullptr) { - perfctr_stopProvider(NodeCounterProvider); - NodeCounterProvider = nullptr; - } - } -} - - -void TermPerfCountersWin32() { - if (NodeCounterProvider != nullptr && - perfctr_stopProvider != nullptr) { - perfctr_stopProvider(NodeCounterProvider); - NodeCounterProvider = nullptr; - } - - if (advapimod) { - FreeLibrary(advapimod); - advapimod = nullptr; - } -} - - -void NODE_COUNT_HTTP_SERVER_REQUEST() { - if (NodeCounterProvider != nullptr && - perfctr_incrementULongValue != nullptr) { - perfctr_incrementULongValue(NodeCounterProvider, - perfctr_instance, - NODE_COUNTER_HTTP_SERVER_REQUEST, - 1); - } -} - - -void NODE_COUNT_HTTP_SERVER_RESPONSE() { - if (NodeCounterProvider != nullptr && - perfctr_incrementULongValue != nullptr) { - perfctr_incrementULongValue(NodeCounterProvider, - perfctr_instance, - NODE_COUNTER_HTTP_SERVER_RESPONSE, - 1); - } -} - - -void NODE_COUNT_HTTP_CLIENT_REQUEST() { - if (NodeCounterProvider != nullptr && - perfctr_incrementULongValue != nullptr) { - perfctr_incrementULongValue(NodeCounterProvider, - perfctr_instance, - NODE_COUNTER_HTTP_CLIENT_REQUEST, - 1); - } -} - - -void NODE_COUNT_HTTP_CLIENT_RESPONSE() { - if (NodeCounterProvider != nullptr && - perfctr_incrementULongValue != nullptr) { - perfctr_incrementULongValue(NodeCounterProvider, - perfctr_instance, - NODE_COUNTER_HTTP_CLIENT_RESPONSE, - 1); - } -} - - -void NODE_COUNT_SERVER_CONN_OPEN() { - if (NodeCounterProvider != nullptr && - perfctr_incrementULongValue != nullptr) { - perfctr_incrementULongValue(NodeCounterProvider, - perfctr_instance, - NODE_COUNTER_SERVER_CONNS, - 1); - } -} - - -void NODE_COUNT_SERVER_CONN_CLOSE() { - if (NodeCounterProvider != nullptr && - perfctr_decrementULongValue != nullptr) { - perfctr_decrementULongValue(NodeCounterProvider, - perfctr_instance, - NODE_COUNTER_SERVER_CONNS, - 1); - } -} - - -void NODE_COUNT_NET_BYTES_SENT(int bytes) { - if (NodeCounterProvider != nullptr && - perfctr_incrementULongLongValue != nullptr) { - perfctr_incrementULongLongValue(NodeCounterProvider, - perfctr_instance, - NODE_COUNTER_NET_BYTES_SENT, - static_cast(bytes)); - } -} - - -void NODE_COUNT_NET_BYTES_RECV(int bytes) { - if (NodeCounterProvider != nullptr && - perfctr_incrementULongLongValue != nullptr) { - perfctr_incrementULongLongValue(NodeCounterProvider, - perfctr_instance, - NODE_COUNTER_NET_BYTES_RECV, - static_cast(bytes)); - } -} - - -uint64_t NODE_COUNT_GET_GC_RAWTIME() { - LARGE_INTEGER timegc; - if (QueryPerformanceCounter(&timegc)) { - return timegc.QuadPart; - } else { - return static_cast(GetTickCount()); - } -} - - -void NODE_COUNT_GC_PERCENTTIME(unsigned int percent) { - if (NodeCounterProvider != nullptr && perfctr_setULongValue != nullptr) { - perfctr_setULongValue(NodeCounterProvider, - perfctr_instance, - NODE_COUNTER_GC_PERCENTTIME, - percent); - } -} - - -void NODE_COUNT_PIPE_BYTES_SENT(int bytes) { - if (NodeCounterProvider != nullptr && - perfctr_incrementULongLongValue != nullptr) { - perfctr_incrementULongLongValue(NodeCounterProvider, - perfctr_instance, - NODE_COUNTER_PIPE_BYTES_SENT, - static_cast(bytes)); - } -} - - -void NODE_COUNT_PIPE_BYTES_RECV(int bytes) { - if (NodeCounterProvider != nullptr && - perfctr_incrementULongLongValue != nullptr) { - perfctr_incrementULongLongValue(NodeCounterProvider, - perfctr_instance, - NODE_COUNTER_PIPE_BYTES_RECV, - static_cast(bytes)); - } -} - -} // namespace node diff --git a/src/node_win32_perfctr_provider.h b/src/node_win32_perfctr_provider.h deleted file mode 100644 index 35185aa187e1f8..00000000000000 --- a/src/node_win32_perfctr_provider.h +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -#ifndef SRC_NODE_WIN32_PERFCTR_PROVIDER_H_ -#define SRC_NODE_WIN32_PERFCTR_PROVIDER_H_ - -#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS - -#if defined(_MSC_VER) -# define INLINE __forceinline -#else -# define INLINE inline -#endif - -namespace node { - -extern HANDLE NodeCounterProvider; - -INLINE bool NODE_COUNTER_ENABLED() { return NodeCounterProvider != nullptr; } -void NODE_COUNT_HTTP_SERVER_REQUEST(); -void NODE_COUNT_HTTP_SERVER_RESPONSE(); -void NODE_COUNT_HTTP_CLIENT_REQUEST(); -void NODE_COUNT_HTTP_CLIENT_RESPONSE(); -void NODE_COUNT_SERVER_CONN_OPEN(); -void NODE_COUNT_SERVER_CONN_CLOSE(); -void NODE_COUNT_NET_BYTES_SENT(int bytes); -void NODE_COUNT_NET_BYTES_RECV(int bytes); -uint64_t NODE_COUNT_GET_GC_RAWTIME(); -void NODE_COUNT_GC_PERCENTTIME(unsigned int percent); -void NODE_COUNT_PIPE_BYTES_SENT(int bytes); -void NODE_COUNT_PIPE_BYTES_RECV(int bytes); - -void InitPerfCountersWin32(); -void TermPerfCountersWin32(); - -} // namespace node - -#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS - -#endif // SRC_NODE_WIN32_PERFCTR_PROVIDER_H_ diff --git a/src/noperfctr_macros.py b/src/noperfctr_macros.py deleted file mode 100644 index 2f7e3cbf82993f..00000000000000 --- a/src/noperfctr_macros.py +++ /dev/null @@ -1,9 +0,0 @@ -# This file is used by tools/js2c.py to preprocess out the performance counters -# symbols in builds that don't support counters. This is not used in builds -# that support performance counters. -macro COUNTER_NET_SERVER_CONNECTION(x) = ; -macro COUNTER_NET_SERVER_CONNECTION_CLOSE(x) = ; -macro COUNTER_HTTP_SERVER_REQUEST(x) = ; -macro COUNTER_HTTP_SERVER_RESPONSE(x) = ; -macro COUNTER_HTTP_CLIENT_REQUEST(x) = ; -macro COUNTER_HTTP_CLIENT_RESPONSE(x) = ; diff --git a/src/res/node_perfctr_provider.man b/src/res/node_perfctr_provider.man deleted file mode 100644 index 2f77e332f7f157..00000000000000 --- a/src/res/node_perfctr_provider.man +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/stream_wrap.cc b/src/stream_wrap.cc index 59f7eb9503f4b0..350aae335ae67a 100644 --- a/src/stream_wrap.cc +++ b/src/stream_wrap.cc @@ -25,7 +25,6 @@ #include "env-inl.h" #include "handle_wrap.h" #include "node_buffer.h" -#include "node_counters.h" #include "pipe_wrap.h" #include "req_wrap-inl.h" #include "tcp_wrap.h" @@ -206,12 +205,6 @@ void LibuvStreamWrap::OnUvRead(ssize_t nread, const uv_buf_t* buf) { CHECK_EQ(persistent().IsEmpty(), false); if (nread > 0) { - if (is_tcp()) { - NODE_COUNT_NET_BYTES_RECV(nread); - } else if (is_named_pipe()) { - NODE_COUNT_PIPE_BYTES_RECV(nread); - } - Local pending_obj; if (type == UV_TCP) { @@ -351,11 +344,6 @@ int LibuvStreamWrap::DoWrite(WriteWrap* req_wrap, size_t bytes = 0; for (size_t i = 0; i < count; i++) bytes += bufs[i].len; - if (stream()->type == UV_TCP) { - NODE_COUNT_NET_BYTES_SENT(bytes); - } else if (stream()->type == UV_NAMED_PIPE) { - NODE_COUNT_PIPE_BYTES_SENT(bytes); - } } return r; diff --git a/src/tls_wrap.cc b/src/tls_wrap.cc index c2efc0c0b87002..7ff8b068ebc88f 100644 --- a/src/tls_wrap.cc +++ b/src/tls_wrap.cc @@ -26,7 +26,6 @@ #include "node_crypto_bio.h" // NodeBIO // ClientHelloParser #include "node_crypto_clienthello-inl.h" -#include "node_counters.h" #include "node_internals.h" #include "stream_base-inl.h" #include "util-inl.h" @@ -283,8 +282,6 @@ void TLSWrap::EncOut() { return; } - NODE_COUNT_NET_BYTES_SENT(write_size_); - if (!res.async) { HandleScope handle_scope(env()->isolate()); diff --git a/test/parallel/test-bootstrap-modules.js b/test/parallel/test-bootstrap-modules.js index 81563355d246ff..fdd651d3eeed84 100644 --- a/test/parallel/test-bootstrap-modules.js +++ b/test/parallel/test-bootstrap-modules.js @@ -11,4 +11,4 @@ const list = process.moduleLoadList.slice(); const assert = require('assert'); -assert(list.length <= 74, list); +assert(list.length <= 75, list); diff --git a/tools/msvs/msi/i18n/de-de.wxl b/tools/msvs/msi/i18n/de-de.wxl index 432d1eeaace3fb..9983168a01c66e 100644 --- a/tools/msvs/msi/i18n/de-de.wxl +++ b/tools/msvs/msi/i18n/de-de.wxl @@ -12,9 +12,6 @@ Node.js-Laufzeitumgebung Installation der [ProductName]-Laufzeitumgebung (node.exe). - Performance Counter - Installiert Unterstützung für [ProductName]-spezifische Performance Counter. - Event Tracing (ETW) Installiert Unterstützung für Event Tracing (ETW)-Events, generiert von [ProductName]. diff --git a/tools/msvs/msi/i18n/en-us.wxl b/tools/msvs/msi/i18n/en-us.wxl index 71c17014911033..e69ea7bbece830 100644 --- a/tools/msvs/msi/i18n/en-us.wxl +++ b/tools/msvs/msi/i18n/en-us.wxl @@ -20,9 +20,6 @@ Node.js runtime Install the core [ProductName] runtime (node.exe). - Performance counters - Installs support for [ProductName]-specific performance counters. - Event tracing (ETW) Installs support for event tracing (ETW) events generated by [ProductName]. diff --git a/tools/msvs/msi/i18n/it-it.wxl b/tools/msvs/msi/i18n/it-it.wxl index 54a251ea2530b4..e3a5a5dcba0881 100644 --- a/tools/msvs/msi/i18n/it-it.wxl +++ b/tools/msvs/msi/i18n/it-it.wxl @@ -12,9 +12,6 @@ Node.js runtime Installa [ProductName] runtime (node.exe). - Performance counters - Installa il supporto per i performance counters specifici di [ProductName]. - Event tracing (ETW) Installa il supporto per gli eventi "event tracing" (ETW) generati da [ProductName]. diff --git a/tools/msvs/msi/i18n/zh-cn.wxl b/tools/msvs/msi/i18n/zh-cn.wxl index 605eea70927c14..e351436d05e653 100644 --- a/tools/msvs/msi/i18n/zh-cn.wxl +++ b/tools/msvs/msi/i18n/zh-cn.wxl @@ -12,9 +12,6 @@ Node.js 运行时 安装核心 [ProductName] 运行时(node.exe)。 - 性能计数器 - 为 [ProductName] 安装特定的性能计数器支持。 - 事件追踪(ETW) 为 [ProductName] 生成的事件安装事件追踪(ETW)的支持。 diff --git a/tools/msvs/msi/nodemsi.wixproj b/tools/msvs/msi/nodemsi.wixproj index 892f19040a32dc..6c23c1650baed3 100644 --- a/tools/msvs/msi/nodemsi.wixproj +++ b/tools/msvs/msi/nodemsi.wixproj @@ -16,23 +16,23 @@ ..\..\..\ obj\$(Configuration)\ - Debug;ProductVersion=$(NodeVersion);FullVersion=$(FullVersion);DistTypeDir=$(DistTypeDir);NoETW=$(NoETW);NoPerfCtr=$(NoPerfCtr);NpmSourceDir=..\..\..\deps\npm\;ProgramFilesFolderId=ProgramFilesFolder + Debug;ProductVersion=$(NodeVersion);FullVersion=$(FullVersion);DistTypeDir=$(DistTypeDir);NoETW=$(NoETW);NpmSourceDir=..\..\..\deps\npm\;ProgramFilesFolderId=ProgramFilesFolder ..\..\..\ obj\$(Configuration)\ - Debug;ProductVersion=$(NodeVersion);FullVersion=$(FullVersion);DistTypeDir=$(DistTypeDir);NoETW=$(NoETW);NoPerfCtr=$(NoPerfCtr);NpmSourceDir=..\..\..\deps\npm\;ProgramFilesFolderId=ProgramFilesFolder + Debug;ProductVersion=$(NodeVersion);FullVersion=$(FullVersion);DistTypeDir=$(DistTypeDir);NoETW=$(NoETW);NpmSourceDir=..\..\..\deps\npm\;ProgramFilesFolderId=ProgramFilesFolder ..\..\..\ obj\$(Configuration)\ - Debug;ProductVersion=$(NodeVersion);FullVersion=$(FullVersion);DistTypeDir=$(DistTypeDir);NoETW=$(NoETW);NoPerfCtr=$(NoPerfCtr);NpmSourceDir=..\..\..\deps\npm\;ProgramFilesFolderId=ProgramFiles64Folder + Debug;ProductVersion=$(NodeVersion);FullVersion=$(FullVersion);DistTypeDir=$(DistTypeDir);NoETW=$(NoETW);NpmSourceDir=..\..\..\deps\npm\;ProgramFilesFolderId=ProgramFiles64Folder en-US ..\..\..\ obj\$(Configuration)\ - Debug;ProductVersion=$(NodeVersion);FullVersion=$(FullVersion);DistTypeDir=$(DistTypeDir);NoETW=$(NoETW);NoPerfCtr=$(NoPerfCtr);NpmSourceDir=..\..\..\deps\npm\;ProgramFilesFolderId=ProgramFiles64Folder + Debug;ProductVersion=$(NodeVersion);FullVersion=$(FullVersion);DistTypeDir=$(DistTypeDir);NoETW=$(NoETW);NpmSourceDir=..\..\..\deps\npm\;ProgramFilesFolderId=ProgramFiles64Folder True diff --git a/tools/msvs/msi/product.wxs b/tools/msvs/msi/product.wxs index ad48fedafd9ea0..b21e86fc7c7a0b 100755 --- a/tools/msvs/msi/product.wxs +++ b/tools/msvs/msi/product.wxs @@ -76,13 +76,6 @@ - - - - - - - - - - - - diff --git a/vcbuild.bat b/vcbuild.bat index e237cf9ee547b8..d916df17b731b7 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -35,8 +35,6 @@ set lint_md= set lint_md_build= set noetw= set noetw_msi_arg= -set noperfctr= -set noperfctr_msi_arg= set i18n_arg= set download_arg= set build_release= @@ -75,7 +73,6 @@ if /i "%1"=="nosign" set "sign="&echo Note: vcbuild no longer signs by de if /i "%1"=="sign" set sign=1&goto arg-ok if /i "%1"=="nosnapshot" set nosnapshot=1&goto arg-ok if /i "%1"=="noetw" set noetw=1&goto arg-ok -if /i "%1"=="noperfctr" set noperfctr=1&goto arg-ok if /i "%1"=="ltcg" set ltcg=1&goto arg-ok if /i "%1"=="nopch" set "pch="&goto arg-ok if /i "%1"=="licensertf" set licensertf=1&goto arg-ok @@ -165,7 +162,6 @@ if "%target_env%"=="vs2017" set "node_gyp_exe=%node_gyp_exe% --msvs_version=2017 if "%config%"=="Debug" set configure_flags=%configure_flags% --debug if defined nosnapshot set configure_flags=%configure_flags% --without-snapshot if defined noetw set configure_flags=%configure_flags% --without-etw& set noetw_msi_arg=/p:NoETW=1 -if defined noperfctr set configure_flags=%configure_flags% --without-perfctr& set noperfctr_msi_arg=/p:NoPerfCtr=1 if defined ltcg set configure_flags=%configure_flags% --with-ltcg if defined pch set configure_flags=%configure_flags% --with-pch if defined release_urlbase set configure_flags=%configure_flags% --release-urlbase=%release_urlbase% @@ -352,10 +348,6 @@ if not defined noetw ( copy /Y ..\src\res\node_etw_provider.man node-v%FULLVERSION%-win-%target_arch%\ > nul if errorlevel 1 echo Cannot copy node_etw_provider.man && goto package_error ) -if not defined noperfctr ( - copy /Y ..\src\res\node_perfctr_provider.man node-v%FULLVERSION%-win-%target_arch%\ > nul - if errorlevel 1 echo Cannot copy node_perfctr_provider.man && goto package_error -) echo Creating node-v%FULLVERSION%-win-%target_arch%.7z del node-v%FULLVERSION%-win-%target_arch%.7z > nul 2> nul @@ -391,7 +383,7 @@ if not defined msi goto install-doctools echo Building node-v%FULLVERSION%-%target_arch%.msi set "msbsdk=" if defined WindowsSDKVersion set "msbsdk=/p:WindowsTargetPlatformVersion=%WindowsSDKVersion:~0,-1%" -msbuild "%~dp0tools\msvs\msi\nodemsi.sln" /m /t:Clean,Build %msbsdk% /p:PlatformToolset=%PLATFORM_TOOLSET% /p:GypMsvsVersion=%GYP_MSVS_VERSION% /p:Configuration=%config% /p:Platform=%target_arch% /p:NodeVersion=%NODE_VERSION% /p:FullVersion=%FULLVERSION% /p:DistTypeDir=%DISTTYPEDIR% %noetw_msi_arg% %noperfctr_msi_arg% /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo +msbuild "%~dp0tools\msvs\msi\nodemsi.sln" /m /t:Clean,Build %msbsdk% /p:PlatformToolset=%PLATFORM_TOOLSET% /p:GypMsvsVersion=%GYP_MSVS_VERSION% /p:Configuration=%config% /p:Platform=%target_arch% /p:NodeVersion=%NODE_VERSION% /p:FullVersion=%FULLVERSION% /p:DistTypeDir=%DISTTYPEDIR% %noetw_msi_arg% /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo if errorlevel 1 goto exit if not defined sign goto upload @@ -630,7 +622,7 @@ del .used_configure_flags goto exit :help -echo vcbuild.bat [debug/release] [msi] [doc] [test/test-ci/test-all/test-addons/test-addons-napi/test-internet/test-pummel/test-simple/test-message/test-tick-processor/test-known-issues/test-node-inspect/test-check-deopts/test-npm/test-async-hooks/test-v8/test-v8-intl/test-v8-benchmarks/test-v8-all] [ignore-flaky] [static/dll] [noprojgen] [projgen] [small-icu/full-icu/without-intl] [nobuild] [nosnapshot] [noetw] [noperfctr] [ltcg] [nopch] [licensetf] [sign] [ia32/x86/x64] [vs2017] [download-all] [enable-vtune] [lint/lint-ci/lint-js/lint-js-ci/lint-md] [lint-md-build] [package] [build-release] [upload] [no-NODE-OPTIONS] [link-module path-to-module] [debug-http2] [debug-nghttp2] [clean] [no-cctest] [openssl-no-asm] +echo vcbuild.bat [debug/release] [msi] [doc] [test/test-ci/test-all/test-addons/test-addons-napi/test-internet/test-pummel/test-simple/test-message/test-tick-processor/test-known-issues/test-node-inspect/test-check-deopts/test-npm/test-async-hooks/test-v8/test-v8-intl/test-v8-benchmarks/test-v8-all] [ignore-flaky] [static/dll] [noprojgen] [projgen] [small-icu/full-icu/without-intl] [nobuild] [nosnapshot] [noetw] [ltcg] [nopch] [licensetf] [sign] [ia32/x86/x64] [vs2017] [download-all] [enable-vtune] [lint/lint-ci/lint-js/lint-js-ci/lint-md] [lint-md-build] [package] [build-release] [upload] [no-NODE-OPTIONS] [link-module path-to-module] [debug-http2] [debug-nghttp2] [clean] [no-cctest] [openssl-no-asm] echo Examples: echo vcbuild.bat : builds release build echo vcbuild.bat debug : builds debug build