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

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

Issue 2043883003: Re-enable TestMemoryInfra browser tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@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 | « no previous file | chrome/test/base/tracing_browsertest.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 <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 kTraceEventVectorBufferChunks <= TraceBufferChunk::kMaxChunkIndex, 79 kTraceEventVectorBufferChunks <= TraceBufferChunk::kMaxChunkIndex,
80 "Too many vector buffer chunks"); 80 "Too many vector buffer chunks");
81 const size_t kTraceEventRingBufferChunks = kTraceEventVectorBufferChunks / 4; 81 const size_t kTraceEventRingBufferChunks = kTraceEventVectorBufferChunks / 4;
82 82
83 // ECHO_TO_CONSOLE needs a small buffer to hold the unfinished COMPLETE events. 83 // ECHO_TO_CONSOLE needs a small buffer to hold the unfinished COMPLETE events.
84 const size_t kEchoToConsoleTraceEventBufferChunks = 256; 84 const size_t kEchoToConsoleTraceEventBufferChunks = 256;
85 85
86 const size_t kTraceEventBufferSizeInBytes = 100 * 1024; 86 const size_t kTraceEventBufferSizeInBytes = 100 * 1024;
87 const int kThreadFlushTimeoutMs = 3000; 87 const int kThreadFlushTimeoutMs = 3000;
88 88
89 #define MAX_CATEGORY_GROUPS 105 89 #define MAX_CATEGORY_GROUPS 200
90 90
91 // Parallel arrays g_category_groups and g_category_group_enabled are separate 91 // Parallel arrays g_category_groups and g_category_group_enabled are separate
92 // so that a pointer to a member of g_category_group_enabled can be easily 92 // so that a pointer to a member of g_category_group_enabled can be easily
93 // converted to an index into g_category_groups. This allows macros to deal 93 // converted to an index into g_category_groups. This allows macros to deal
94 // only with char enabled pointers from g_category_group_enabled, and we can 94 // only with char enabled pointers from g_category_group_enabled, and we can
95 // convert internally to determine the category name from the char enabled 95 // convert internally to determine the category name from the char enabled
96 // pointer. 96 // pointer.
97 const char* g_category_groups[MAX_CATEGORY_GROUPS] = { 97 const char* g_category_groups[MAX_CATEGORY_GROUPS] = {
98 "toplevel", 98 "toplevel",
99 "tracing already shutdown", 99 "tracing already shutdown",
(...skipping 1686 matching lines...) Expand 10 before | Expand all | Expand 10 after
1786 } 1786 }
1787 1787
1788 ScopedTraceBinaryEfficient::~ScopedTraceBinaryEfficient() { 1788 ScopedTraceBinaryEfficient::~ScopedTraceBinaryEfficient() {
1789 if (*category_group_enabled_) { 1789 if (*category_group_enabled_) {
1790 TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION(category_group_enabled_, name_, 1790 TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION(category_group_enabled_, name_,
1791 event_handle_); 1791 event_handle_);
1792 } 1792 }
1793 } 1793 }
1794 1794
1795 } // namespace trace_event_internal 1795 } // namespace trace_event_internal
OLDNEW
« no previous file with comments | « no previous file | chrome/test/base/tracing_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698