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

Unified Diff: base/trace_event/trace_log.cc

Issue 1279353002: [ETW Export] Add polling for ETW keyword. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nit. Created 5 years, 4 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 | « base/trace_event/trace_log.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/trace_event/trace_log.cc
diff --git a/base/trace_event/trace_log.cc b/base/trace_event/trace_log.cc
index 8eb46c521492c60186b06112b965b6792d1de579..af2124efd007c1f17b7279190ec7482244ebc869 100644
--- a/base/trace_event/trace_log.cc
+++ b/base/trace_event/trace_log.cc
@@ -1707,6 +1707,25 @@ TraceBuffer* TraceLog::CreateTraceBuffer() {
kTraceEventVectorBufferChunks);
}
+#if defined(OS_WIN)
+void TraceLog::UpdateETWCategoryGroupEnabledFlags() {
+ AutoLock lock(lock_);
+ size_t category_index = base::subtle::NoBarrier_Load(&g_category_index);
+ // Go through each category and set/clear the ETW bit depending on whether the
+ // category is enabled.
+ for (size_t i = 0; i < category_index; i++) {
+ const char* category_group = g_category_groups[i];
+ DCHECK(category_group);
+ if (base::trace_event::TraceEventETWExport::IsCategoryGroupEnabled(
+ category_group)) {
+ g_category_group_enabled[category_index] |= ENABLED_FOR_ETW_EXPORT;
+ } else {
+ g_category_group_enabled[category_index] &= ~ENABLED_FOR_ETW_EXPORT;
+ }
+ }
+}
+#endif // defined(OS_WIN)
+
void ConvertableToTraceFormat::EstimateTraceMemoryOverhead(
TraceEventMemoryOverhead* overhead) {
overhead->Add("ConvertableToTraceFormat(Unknown)", sizeof(*this));
« no previous file with comments | « base/trace_event/trace_log.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698