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

Side by Side Diff: base/debug/trace_event_impl.h

Issue 22796009: Shrink trace_event buffers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Shrink non-ring-buffer also Created 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | base/debug/trace_event_impl.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 5
6 #ifndef BASE_DEBUG_TRACE_EVENT_IMPL_H_ 6 #ifndef BASE_DEBUG_TRACE_EVENT_IMPL_H_
7 #define BASE_DEBUG_TRACE_EVENT_IMPL_H_ 7 #define BASE_DEBUG_TRACE_EVENT_IMPL_H_
8 8
9 #include <stack> 9 #include <stack>
10 #include <string> 10 #include <string>
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 public: 143 public:
144 virtual ~TraceBuffer() {} 144 virtual ~TraceBuffer() {}
145 145
146 virtual void AddEvent(const TraceEvent& event) = 0; 146 virtual void AddEvent(const TraceEvent& event) = 0;
147 virtual bool HasMoreEvents() const = 0; 147 virtual bool HasMoreEvents() const = 0;
148 virtual const TraceEvent& NextEvent() = 0; 148 virtual const TraceEvent& NextEvent() = 0;
149 virtual bool IsFull() const = 0; 149 virtual bool IsFull() const = 0;
150 virtual size_t CountEnabledByName(const unsigned char* category, 150 virtual size_t CountEnabledByName(const unsigned char* category,
151 const std::string& event_name) const = 0; 151 const std::string& event_name) const = 0;
152 virtual size_t Size() const = 0; 152 virtual size_t Size() const = 0;
153 virtual size_t Capacity() const = 0;
153 virtual const TraceEvent& GetEventAt(size_t index) const = 0; 154 virtual const TraceEvent& GetEventAt(size_t index) const = 0;
154 }; 155 };
155 156
156 // TraceResultBuffer collects and converts trace fragments returned by TraceLog 157 // TraceResultBuffer collects and converts trace fragments returned by TraceLog
157 // to JSON output. 158 // to JSON output.
158 class BASE_EXPORT TraceResultBuffer { 159 class BASE_EXPORT TraceResultBuffer {
159 public: 160 public:
160 typedef base::Callback<void(const std::string&)> OutputCallback; 161 typedef base::Callback<void(const std::string&)> OutputCallback;
161 162
162 // If you don't need to stream JSON chunks out efficiently, and just want to 163 // If you don't need to stream JSON chunks out efficiently, and just want to
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 587
587 CategoryFilter category_filter_; 588 CategoryFilter category_filter_;
588 589
589 DISALLOW_COPY_AND_ASSIGN(TraceLog); 590 DISALLOW_COPY_AND_ASSIGN(TraceLog);
590 }; 591 };
591 592
592 } // namespace debug 593 } // namespace debug
593 } // namespace base 594 } // namespace base
594 595
595 #endif // BASE_DEBUG_TRACE_EVENT_IMPL_H_ 596 #endif // BASE_DEBUG_TRACE_EVENT_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | base/debug/trace_event_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698