Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(188)

Unified Diff: src/heap/gc-tracer.cc

Issue 2313193002: [Tracing] Fix runtime call stats tracing for GC. (Closed)
Patch Set: Remove duplicate runtime call stats in counters Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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.
}
« src/counters-inl.h ('K') | « src/counters-inl.h ('k') | src/heap/heap-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698