| Index: src/heap/gc-tracer.cc
|
| diff --git a/src/heap/gc-tracer.cc b/src/heap/gc-tracer.cc
|
| index 4d02fdeff57071ef61ec73ca3feb90653ca27eb2..5166b6e62be6da6bfe56caa72a360ec287fac02c 100644
|
| --- a/src/heap/gc-tracer.cc
|
| +++ b/src/heap/gc-tracer.cc
|
| @@ -24,6 +24,13 @@ static intptr_t CountTotalHolesSize(Heap* heap) {
|
| 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) {
|
| + RuntimeCallStats* stats =
|
| + tracer_->heap_->isolate()->counters()->runtime_call_stats();
|
| + timer_.Initialize(&stats->GC, stats->current_timer());
|
| + stats->Enter(&timer_);
|
| + }
|
| }
|
|
|
|
|
| @@ -31,6 +38,10 @@ GCTracer::Scope::~Scope() {
|
| DCHECK(scope_ < NUMBER_OF_SCOPES); // scope_ is unsigned.
|
| tracer_->current_.scopes[scope_] +=
|
| tracer_->heap_->MonotonicallyIncreasingTimeInMs() - start_time_;
|
| + // TODO(cbruni): remove once we fully moved to a trace-based system.
|
| + if (FLAG_runtime_call_stats) {
|
| + tracer_->heap_->isolate()->counters()->runtime_call_stats()->Leave(&timer_);
|
| + }
|
| }
|
|
|
|
|
|
|