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

Side by Side Diff: base/trace_event/trace_log.cc

Issue 1805363002: Add traces for main omnibox providers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added TBR=oysteine@chromium.org Created 4 years, 9 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 | « no previous file | components/omnibox/browser/autocomplete_controller.cc » ('j') | 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 #include <utility> 9 #include <utility>
10 10
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 kTraceEventVectorBufferChunks <= TraceBufferChunk::kMaxChunkIndex, 78 kTraceEventVectorBufferChunks <= TraceBufferChunk::kMaxChunkIndex,
79 "Too many vector buffer chunks"); 79 "Too many vector buffer chunks");
80 const size_t kTraceEventRingBufferChunks = kTraceEventVectorBufferChunks / 4; 80 const size_t kTraceEventRingBufferChunks = kTraceEventVectorBufferChunks / 4;
81 81
82 // ECHO_TO_CONSOLE needs a small buffer to hold the unfinished COMPLETE events. 82 // ECHO_TO_CONSOLE needs a small buffer to hold the unfinished COMPLETE events.
83 const size_t kEchoToConsoleTraceEventBufferChunks = 256; 83 const size_t kEchoToConsoleTraceEventBufferChunks = 256;
84 84
85 const size_t kTraceEventBufferSizeInBytes = 100 * 1024; 85 const size_t kTraceEventBufferSizeInBytes = 100 * 1024;
86 const int kThreadFlushTimeoutMs = 3000; 86 const int kThreadFlushTimeoutMs = 3000;
87 87
88 #define MAX_CATEGORY_GROUPS 100 88 #define MAX_CATEGORY_GROUPS 105
89 89
90 // Parallel arrays g_category_groups and g_category_group_enabled are separate 90 // Parallel arrays g_category_groups and g_category_group_enabled are separate
91 // so that a pointer to a member of g_category_group_enabled can be easily 91 // so that a pointer to a member of g_category_group_enabled can be easily
92 // converted to an index into g_category_groups. This allows macros to deal 92 // converted to an index into g_category_groups. This allows macros to deal
93 // only with char enabled pointers from g_category_group_enabled, and we can 93 // only with char enabled pointers from g_category_group_enabled, and we can
94 // convert internally to determine the category name from the char enabled 94 // convert internally to determine the category name from the char enabled
95 // pointer. 95 // pointer.
96 const char* g_category_groups[MAX_CATEGORY_GROUPS] = { 96 const char* g_category_groups[MAX_CATEGORY_GROUPS] = {
97 "toplevel", 97 "toplevel",
98 "tracing already shutdown", 98 "tracing already shutdown",
(...skipping 1634 matching lines...) Expand 10 before | Expand all | Expand 10 after
1733 } 1733 }
1734 1734
1735 ScopedTraceBinaryEfficient::~ScopedTraceBinaryEfficient() { 1735 ScopedTraceBinaryEfficient::~ScopedTraceBinaryEfficient() {
1736 if (*category_group_enabled_) { 1736 if (*category_group_enabled_) {
1737 TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION(category_group_enabled_, name_, 1737 TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION(category_group_enabled_, name_,
1738 event_handle_); 1738 event_handle_);
1739 } 1739 }
1740 } 1740 }
1741 1741
1742 } // namespace trace_event_internal 1742 } // namespace trace_event_internal
OLDNEW
« no previous file with comments | « no previous file | components/omnibox/browser/autocomplete_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698