We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 64c89d2 commit 9e41032Copy full SHA for 9e41032
src/node_perf.cc
@@ -272,6 +272,9 @@ void MarkGarbageCollectionEnd(Isolate* isolate,
272
v8::GCCallbackFlags flags,
273
void* data) {
274
Environment* env = static_cast<Environment*>(data);
275
+ // If no one is listening to gc performance entries, do not create them.
276
+ if (!env->performance_state()->observers[NODE_PERFORMANCE_ENTRY_TYPE_GC])
277
+ return;
278
GCPerformanceEntry* entry =
279
new GCPerformanceEntry(env,
280
static_cast<PerformanceGCKind>(type),
0 commit comments