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

Unified Diff: src/tracing/trace-event.cc

Issue 2457523002: [Tracing] Fix inaccurate timer calculation in runtime statistics. (Closed)
Patch Set: Address cbruni's comments Created 4 years, 2 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/counters.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/tracing/trace-event.cc
diff --git a/src/tracing/trace-event.cc b/src/tracing/trace-event.cc
index a24ebc0d975b2fb75c61fc30b2d4b8db74315b74..ebee5345997756c3a77fc902eac3089de7b16369 100644
--- a/src/tracing/trace-event.cc
+++ b/src/tracing/trace-event.cc
@@ -49,7 +49,7 @@ void CallStatsScopedTracer::Initialize(v8::internal::Isolate* isolate,
p_data_ = &data_;
RuntimeCallStats* table = isolate->counters()->runtime_call_stats();
has_parent_scope_ = table->InUse();
- if (!has_parent_scope_) table->Reset();
+ if (!has_parent_scope_ && table->current_timer() == NULL) table->Reset();
v8::internal::tracing::AddTraceEvent(
TRACE_EVENT_PHASE_BEGIN, category_group_enabled, name,
v8::internal::tracing::kGlobalScope, v8::internal::tracing::kNoId,
« no previous file with comments | « src/counters.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698