summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/node_win32_perfctr_provider.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/node_win32_perfctr_provider.cc b/src/node_win32_perfctr_provider.cc
index 8135726852..903150ed61 100644
--- a/src/node_win32_perfctr_provider.cc
+++ b/src/node_win32_perfctr_provider.cc
@@ -172,6 +172,13 @@ void InitPerfCountersWin32() {
ZeroMemory(&providerContext, sizeof(providerContext));
providerContext.ContextSize = sizeof(providerContext);
+ if (!perfctr_startProvider ||
+ !perfctr_setCounterSetInfo ||
+ !perfctr_createInstance) {
+ NodeCounterProvider = NULL;
+ return;
+ }
+
status = perfctr_startProvider(&NodeCounterSetGuid,
&providerContext,
&NodeCounterProvider);