Index: src/heap/gc-tracer.cc |
diff --git a/src/heap/gc-tracer.cc b/src/heap/gc-tracer.cc |
index 706d3546a2c5d574d7224e118395ca5c81ff6691..620a021be0959940edb4e58eee45f43211de76da 100644 |
--- a/src/heap/gc-tracer.cc |
+++ b/src/heap/gc-tracer.cc |
@@ -25,23 +25,23 @@ GCTracer::Scope::Scope(GCTracer* tracer, ScopeId scope) |
: tracer_(tracer), scope_(scope) { |
start_time_ = tracer_->heap_->MonotonicallyIncreasingTimeInMs(); |
// TODO(cbruni): remove once we fully moved to a trace-based system. |
- if (FLAG_runtime_call_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); |
} |
- // TODO(lpy): Add a tracing equivalent for the runtime call stats. |
} |
GCTracer::Scope::~Scope() { |
tracer_->AddScopeSample( |
scope_, tracer_->heap_->MonotonicallyIncreasingTimeInMs() - start_time_); |
// TODO(cbruni): remove once we fully moved to a trace-based system. |
- if (FLAG_runtime_call_stats) { |
+ if (TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_ENABLED() || |
+ FLAG_runtime_call_stats) { |
RuntimeCallStats::Leave( |
tracer_->heap_->isolate()->counters()->runtime_call_stats(), &timer_); |
} |
- // TODO(lpy): Add a tracing equivalent for the runtime call stats. |
} |
const char* GCTracer::Scope::Name(ScopeId id) { |
@@ -217,11 +217,11 @@ void GCTracer::Start(GarbageCollector collector, |
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 (FLAG_runtime_call_stats) { |
+ if (TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_ENABLED() || |
+ FLAG_runtime_call_stats) { |
RuntimeCallStats::Enter(heap_->isolate()->counters()->runtime_call_stats(), |
&timer_, &RuntimeCallStats::GC); |
} |
- // TODO(lpy): Add a tracing equivalent for the runtime call stats. |
} |
void GCTracer::MergeBaseline(const Event& baseline) { |
@@ -323,11 +323,11 @@ void GCTracer::Stop(GarbageCollector collector) { |
} |
// TODO(cbruni): remove once we fully moved to a trace-based system. |
- if (FLAG_runtime_call_stats) { |
+ if (TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_ENABLED() || |
+ FLAG_runtime_call_stats) { |
RuntimeCallStats::Leave(heap_->isolate()->counters()->runtime_call_stats(), |
&timer_); |
} |
- // TODO(lpy): Add a tracing equivalent for the runtime call stats. |
} |