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

Side by Side Diff: trace_event/trace_log.cc

Issue 2045303002: Update to Chromium //base at Chromium commit 3e81715e6d3a4324362635aea46ce1f1a163cca1. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/domokit/base@master
Patch Set: Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « trace_event/trace_event_etw_export_win.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/trace_event/trace_log.h" 5 #include "base/trace_event/trace_log.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/base_switches.h" 10 #include "base/base_switches.h"
(...skipping 1644 matching lines...) Expand 10 before | Expand all | Expand 10 after
1655 void TraceLog::UpdateETWCategoryGroupEnabledFlags() { 1655 void TraceLog::UpdateETWCategoryGroupEnabledFlags() {
1656 AutoLock lock(lock_); 1656 AutoLock lock(lock_);
1657 size_t category_index = base::subtle::NoBarrier_Load(&g_category_index); 1657 size_t category_index = base::subtle::NoBarrier_Load(&g_category_index);
1658 // Go through each category and set/clear the ETW bit depending on whether the 1658 // Go through each category and set/clear the ETW bit depending on whether the
1659 // category is enabled. 1659 // category is enabled.
1660 for (size_t i = 0; i < category_index; i++) { 1660 for (size_t i = 0; i < category_index; i++) {
1661 const char* category_group = g_category_groups[i]; 1661 const char* category_group = g_category_groups[i];
1662 DCHECK(category_group); 1662 DCHECK(category_group);
1663 if (base::trace_event::TraceEventETWExport::IsCategoryGroupEnabled( 1663 if (base::trace_event::TraceEventETWExport::IsCategoryGroupEnabled(
1664 category_group)) { 1664 category_group)) {
1665 g_category_group_enabled[category_index] |= ENABLED_FOR_ETW_EXPORT; 1665 g_category_group_enabled[i] |= ENABLED_FOR_ETW_EXPORT;
1666 } else { 1666 } else {
1667 g_category_group_enabled[category_index] &= ~ENABLED_FOR_ETW_EXPORT; 1667 g_category_group_enabled[i] &= ~ENABLED_FOR_ETW_EXPORT;
1668 } 1668 }
1669 } 1669 }
1670 } 1670 }
1671 #endif // defined(OS_WIN) 1671 #endif // defined(OS_WIN)
1672 1672
1673 void ConvertableToTraceFormat::EstimateTraceMemoryOverhead( 1673 void ConvertableToTraceFormat::EstimateTraceMemoryOverhead(
1674 TraceEventMemoryOverhead* overhead) { 1674 TraceEventMemoryOverhead* overhead) {
1675 overhead->Add("ConvertableToTraceFormat(Unknown)", sizeof(*this)); 1675 overhead->Add("ConvertableToTraceFormat(Unknown)", sizeof(*this));
1676 } 1676 }
1677 1677
(...skipping 24 matching lines...) Expand all
1702 } 1702 }
1703 1703
1704 ScopedTraceBinaryEfficient::~ScopedTraceBinaryEfficient() { 1704 ScopedTraceBinaryEfficient::~ScopedTraceBinaryEfficient() {
1705 if (*category_group_enabled_) { 1705 if (*category_group_enabled_) {
1706 TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION(category_group_enabled_, name_, 1706 TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION(category_group_enabled_, name_,
1707 event_handle_); 1707 event_handle_);
1708 } 1708 }
1709 } 1709 }
1710 1710
1711 } // namespace trace_event_internal 1711 } // namespace trace_event_internal
OLDNEW
« no previous file with comments | « trace_event/trace_event_etw_export_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698