Index: src/heap/gc-tracer.cc |
diff --git a/src/heap/gc-tracer.cc b/src/heap/gc-tracer.cc |
index 9527942681a56ffcb1c2cfe7fa26d896027bf1e0..1ce98199235a57d1148d986e37f3b59adf495ea0 100644 |
--- a/src/heap/gc-tracer.cc |
+++ b/src/heap/gc-tracer.cc |
@@ -31,7 +31,8 @@ |
STATIC_ASSERT(FIRST_INCREMENTAL_SCOPE == 0); |
start_time_ = tracer_->heap_->MonotonicallyIncreasingTimeInMs(); |
// TODO(cbruni): remove once we fully moved to a trace-based system. |
- if (V8_UNLIKELY(FLAG_runtime_stats)) { |
+ if (TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_ENABLED() || |
+ FLAG_runtime_call_stats) { |
RuntimeCallStats::Enter( |
tracer_->heap_->isolate()->counters()->runtime_call_stats(), &timer_, |
&RuntimeCallStats::GC); |
@@ -42,7 +43,8 @@ |
tracer_->AddScopeSample( |
scope_, tracer_->heap_->MonotonicallyIncreasingTimeInMs() - start_time_); |
// TODO(cbruni): remove once we fully moved to a trace-based system. |
- if (V8_UNLIKELY(FLAG_runtime_stats)) { |
+ if (TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_ENABLED() || |
+ FLAG_runtime_call_stats) { |
RuntimeCallStats::Leave( |
tracer_->heap_->isolate()->counters()->runtime_call_stats(), &timer_); |
} |
@@ -203,7 +205,8 @@ |
committed_memory); |
counters->aggregated_memory_heap_used()->AddSample(start_time, used_memory); |
// TODO(cbruni): remove once we fully moved to a trace-based system. |
- if (V8_UNLIKELY(FLAG_runtime_stats)) { |
+ if (TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_ENABLED() || |
+ FLAG_runtime_call_stats) { |
RuntimeCallStats::Enter(heap_->isolate()->counters()->runtime_call_stats(), |
&timer_, &RuntimeCallStats::GC); |
} |
@@ -293,7 +296,8 @@ |
} |
// TODO(cbruni): remove once we fully moved to a trace-based system. |
- if (V8_UNLIKELY(FLAG_runtime_stats)) { |
+ if (TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_ENABLED() || |
+ FLAG_runtime_call_stats) { |
RuntimeCallStats::Leave(heap_->isolate()->counters()->runtime_call_stats(), |
&timer_); |
} |