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

Unified Diff: src/counters.cc

Issue 2461733005: Introduce RuntimeCallStats::IsEnabled (Closed)
Patch Set: 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
« src/counters.h ('K') | « src/counters.h ('k') | src/counters-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/counters.cc
diff --git a/src/counters.cc b/src/counters.cc
index 8fcfd541411d433911bf2003d4ce46d8535ff873..33dc1f001ff394b819d3c9a76f6d18f0b895bec6 100644
--- a/src/counters.cc
+++ b/src/counters.cc
@@ -341,9 +341,7 @@ void RuntimeCallStats::Print(std::ostream& os) {
}
void RuntimeCallStats::Reset() {
- if (!FLAG_runtime_call_stats &&
- !TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_ENABLED())
- return;
+ if (!IsEnabled()) return;
#define RESET_COUNTER(name) this->name.Reset();
FOR_EACH_MANUAL_COUNTER(RESET_COUNTER)
#undef RESET_COUNTER
« src/counters.h ('K') | « src/counters.h ('k') | src/counters-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698