Index: src/tracing/tracing-category-observer.cc |
diff --git a/src/tracing/tracing-category-observer.cc b/src/tracing/tracing-category-observer.cc |
index e6bd06ae17547fa2257152c1fb23eee2d20111c6..3fffd2f9ca63d23b396752c71b754525be66337e 100644 |
--- a/src/tracing/tracing-category-observer.cc |
+++ b/src/tracing/tracing-category-observer.cc |
@@ -20,6 +20,7 @@ void TracingCategoryObserver::SetUp() { |
TRACE_EVENT_WARMUP_CATEGORY(TRACE_DISABLED_BY_DEFAULT("v8.runtime_stats")); |
TRACE_EVENT_WARMUP_CATEGORY( |
TRACE_DISABLED_BY_DEFAULT("v8.runtime_stats_sampling")); |
+ TRACE_EVENT_WARMUP_CATEGORY(TRACE_DISABLED_BY_DEFAULT("v8.gc_stats")); |
} |
void TracingCategoryObserver::TearDown() { |
@@ -40,11 +41,17 @@ void TracingCategoryObserver::OnTraceEnabled() { |
if (enabled) { |
v8::internal::FLAG_runtime_stats |= ENABLED_BY_SAMPLING; |
} |
+ TRACE_EVENT_CATEGORY_GROUP_ENABLED(TRACE_DISABLED_BY_DEFAULT("v8.gc_stats"), |
+ &enabled); |
+ if (enabled) { |
+ v8::internal::FLAG_gc_stats |= ENABLED_BY_TRACING; |
+ } |
} |
void TracingCategoryObserver::OnTraceDisabled() { |
v8::internal::FLAG_runtime_stats &= |
~(ENABLED_BY_TRACING | ENABLED_BY_SAMPLING); |
+ v8::internal::FLAG_gc_stats &= ~ENABLED_BY_TRACING; |
} |
} // namespace tracing |