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

Unified Diff: src/tracing/tracing-category-observer.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
« src/log.cc ('K') | « src/tracing/trace-event.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/tracing/tracing-category-observer.cc
diff --git a/src/tracing/tracing-category-observer.cc b/src/tracing/tracing-category-observer.cc
index f9315b4ce456beb5d55b0b02c6ca06d00e6b006e..dcf67253071351d51e9aa28d7c4cee87b7b96727 100644
--- a/src/tracing/tracing-category-observer.cc
+++ b/src/tracing/tracing-category-observer.cc
@@ -17,7 +17,9 @@ std::unique_ptr<TracingCategoryObserver> TracingCategoryObserver::Create() {
new TracingCategoryObserverImpl());
}
-TracingCategoryObserverImpl::TracingCategoryObserverImpl() {}
+TracingCategoryObserverImpl::TracingCategoryObserverImpl() {
+ TRACE_EVENT_WARMUP_CATEGORY(TRACE_DISABLED_BY_DEFAULT("v8.runtime_stats"));
+}
TracingCategoryObserverImpl::~TracingCategoryObserverImpl() {
OnTraceDisabled();
@@ -33,7 +35,7 @@ void TracingCategoryObserverImpl::OnTraceEnabled() {
}
void TracingCategoryObserverImpl::OnTraceDisabled() {
- v8::internal::FLAG_runtime_stats &= ~ENABLED_BY_TRACING;
+ v8::internal::FLAG_runtime_stats ^= ENABLED_BY_TRACING;
alph 2016/10/31 20:46:53 This won't work. The category might not have been
lpy 2016/10/31 20:54:19 Done. ah you are right, I think the original one
}
} // namespace tracing
« src/log.cc ('K') | « src/tracing/trace-event.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698