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

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

Issue 2296243002: [RuntimeCallStats] Move tracing runtime instrumentation closer to the original version. (Closed)
Patch Set: Rebase 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
« no previous file with comments | « src/full-codegen/full-codegen.cc ('k') | src/interpreter/interpreter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/gc-tracer.cc
diff --git a/src/heap/gc-tracer.cc b/src/heap/gc-tracer.cc
index bbdbf7fb304900e49f5c604c98c56b2ab15dc0f7..98be41d3693be9e79c2faf20e077f7d13093668f 100644
--- a/src/heap/gc-tracer.cc
+++ b/src/heap/gc-tracer.cc
@@ -26,9 +26,11 @@ GCTracer::Scope::Scope(GCTracer* tracer, ScopeId scope)
start_time_ = tracer_->heap_->MonotonicallyIncreasingTimeInMs();
// TODO(cbruni): remove once we fully moved to a trace-based system.
if (FLAG_runtime_call_stats) {
- RuntimeCallStats::Enter(tracer_->heap_->isolate(), &timer_,
- &RuntimeCallStats::GC);
+ 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() {
@@ -36,8 +38,10 @@ GCTracer::Scope::~Scope() {
scope_, tracer_->heap_->MonotonicallyIncreasingTimeInMs() - start_time_);
// TODO(cbruni): remove once we fully moved to a trace-based system.
if (FLAG_runtime_call_stats) {
- RuntimeCallStats::Leave(tracer_->heap_->isolate(), &timer_);
+ 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) {
@@ -206,8 +210,10 @@ void GCTracer::Start(GarbageCollector collector, const char* gc_reason,
start_time, used_memory);
// TODO(cbruni): remove once we fully moved to a trace-based system.
if (FLAG_runtime_call_stats) {
- RuntimeCallStats::Enter(heap_->isolate(), &timer_, &RuntimeCallStats::GC);
+ 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) {
@@ -310,8 +316,10 @@ void GCTracer::Stop(GarbageCollector collector) {
// TODO(cbruni): remove once we fully moved to a trace-based system.
if (FLAG_runtime_call_stats) {
- RuntimeCallStats::Leave(heap_->isolate(), &timer_);
+ RuntimeCallStats::Leave(heap_->isolate()->counters()->runtime_call_stats(),
+ &timer_);
}
+ // TODO(lpy): Add a tracing equivalent for the runtime call stats.
}
« no previous file with comments | « src/full-codegen/full-codegen.cc ('k') | src/interpreter/interpreter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698