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

Unified Diff: src/counters.cc

Issue 2460973003: [Tracing] Use TracingCategoryObserver in runtime statistics (Closed)
Patch Set: address cbruni's comments Created 4 years, 1 month 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.h ('k') | src/counters-inl.h » ('j') | src/isolate.cc » ('J')
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 ec66d885fda70fcd119cfa46f3e542769e17f93f..c7aa0e9dc46f2a09d4088ab7f963167d09d47156 100644
--- a/src/counters.cc
+++ b/src/counters.cc
@@ -344,9 +344,9 @@ void RuntimeCallStats::Print(std::ostream& os) {
}
void RuntimeCallStats::Reset() {
- if (!FLAG_runtime_call_stats &&
- !TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_ENABLED())
+ if (V8_LIKELY(FLAG_runtime_stats == 0)) {
alph 2016/10/31 20:46:53 nit: no need {} for return;
lpy 2016/10/31 20:54:19 I think Yang once mentioned V8 prefers {}
alph 2016/10/31 21:17:19 Interesting. the code style guide https://google.g
return;
+ }
#define RESET_COUNTER(name) this->name.Reset();
FOR_EACH_MANUAL_COUNTER(RESET_COUNTER)
#undef RESET_COUNTER
« no previous file with comments | « src/counters.h ('k') | src/counters-inl.h » ('j') | src/isolate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698