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

Side by Side Diff: content/browser/tracing/tracing_controller_impl.h

Issue 717083003: Report trace buffer usage as number of events, not only percentage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 6 years, 1 month 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #ifndef CONTENT_BROWSER_TRACING_TRACING_CONTROLLER_IMPL_H_ 5 #ifndef CONTENT_BROWSER_TRACING_TRACING_CONTROLLER_IMPL_H_
6 #define CONTENT_BROWSER_TRACING_TRACING_CONTROLLER_IMPL_H_ 6 #define CONTENT_BROWSER_TRACING_TRACING_CONTROLLER_IMPL_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 const std::vector<std::string>& known_category_groups); 109 const std::vector<std::string>& known_category_groups);
110 110
111 #if defined(OS_CHROMEOS) || defined(OS_WIN) 111 #if defined(OS_CHROMEOS) || defined(OS_WIN)
112 void OnEndSystemTracingAcked( 112 void OnEndSystemTracingAcked(
113 const scoped_refptr<base::RefCountedString>& events_str_ptr); 113 const scoped_refptr<base::RefCountedString>& events_str_ptr);
114 #endif 114 #endif
115 115
116 void OnCaptureMonitoringSnapshotAcked( 116 void OnCaptureMonitoringSnapshotAcked(
117 TraceMessageFilter* trace_message_filter); 117 TraceMessageFilter* trace_message_filter);
118 118
119 void OnTraceBufferPercentFullReply( 119 void OnTraceBufferUsageReply(TraceMessageFilter* trace_message_filter,
120 TraceMessageFilter* trace_message_filter, 120 float percent_full,
121 float percent_full); 121 size_t approximate_event_count);
122 122
123 void OnWatchEventMatched(); 123 void OnWatchEventMatched();
124 124
125 void SetEnabledOnFileThread( 125 void SetEnabledOnFileThread(
126 const base::debug::CategoryFilter& category_filter, 126 const base::debug::CategoryFilter& category_filter,
127 int mode, 127 int mode,
128 const base::debug::TraceOptions& trace_options, 128 const base::debug::TraceOptions& trace_options,
129 const base::Closure& callback); 129 const base::Closure& callback);
130 void SetDisabledOnFileThread(const base::Closure& callback); 130 void SetDisabledOnFileThread(const base::Closure& callback);
131 void OnEnableRecordingDone(const base::debug::CategoryFilter& category_filter, 131 void OnEnableRecordingDone(const base::debug::CategoryFilter& category_filter,
(...skipping 13 matching lines...) Expand all
145 // Pending acks for DisableRecording. 145 // Pending acks for DisableRecording.
146 int pending_disable_recording_ack_count_; 146 int pending_disable_recording_ack_count_;
147 TraceMessageFilterSet pending_disable_recording_filters_; 147 TraceMessageFilterSet pending_disable_recording_filters_;
148 // Pending acks for CaptureMonitoringSnapshot. 148 // Pending acks for CaptureMonitoringSnapshot.
149 int pending_capture_monitoring_snapshot_ack_count_; 149 int pending_capture_monitoring_snapshot_ack_count_;
150 TraceMessageFilterSet pending_capture_monitoring_filters_; 150 TraceMessageFilterSet pending_capture_monitoring_filters_;
151 // Pending acks for GetTraceBufferPercentFull. 151 // Pending acks for GetTraceBufferPercentFull.
152 int pending_trace_buffer_percent_full_ack_count_; 152 int pending_trace_buffer_percent_full_ack_count_;
153 TraceMessageFilterSet pending_trace_buffer_percent_full_filters_; 153 TraceMessageFilterSet pending_trace_buffer_percent_full_filters_;
154 float maximum_trace_buffer_percent_full_; 154 float maximum_trace_buffer_percent_full_;
155 size_t approximate_event_count_;
155 156
156 #if defined(OS_CHROMEOS) || defined(OS_WIN) 157 #if defined(OS_CHROMEOS) || defined(OS_WIN)
157 bool is_system_tracing_; 158 bool is_system_tracing_;
158 #endif 159 #endif
159 bool is_recording_; 160 bool is_recording_;
160 bool is_monitoring_; 161 bool is_monitoring_;
161 base::debug::TraceOptions trace_options_; 162 base::debug::TraceOptions trace_options_;
162 163
163 GetCategoriesDoneCallback pending_get_categories_done_callback_; 164 GetCategoriesDoneCallback pending_get_categories_done_callback_;
164 GetTraceBufferPercentFullCallback pending_trace_buffer_percent_full_callback_; 165 GetTraceBufferPercentFullCallback pending_trace_buffer_percent_full_callback_;
165 166
166 std::string watch_category_name_; 167 std::string watch_category_name_;
167 std::string watch_event_name_; 168 std::string watch_event_name_;
168 WatchEventCallback watch_event_callback_; 169 WatchEventCallback watch_event_callback_;
169 170
170 std::set<std::string> known_category_groups_; 171 std::set<std::string> known_category_groups_;
171 std::set<TracingUI*> tracing_uis_; 172 std::set<TracingUI*> tracing_uis_;
172 scoped_refptr<TraceDataSink> trace_data_sink_; 173 scoped_refptr<TraceDataSink> trace_data_sink_;
173 scoped_refptr<TraceDataSink> monitoring_data_sink_; 174 scoped_refptr<TraceDataSink> monitoring_data_sink_;
174 DISALLOW_COPY_AND_ASSIGN(TracingControllerImpl); 175 DISALLOW_COPY_AND_ASSIGN(TracingControllerImpl);
175 }; 176 };
176 177
177 } // namespace content 178 } // namespace content
178 179
179 #endif // CONTENT_BROWSER_TRACING_TRACING_CONTROLLER_IMPL_H_ 180 #endif // CONTENT_BROWSER_TRACING_TRACING_CONTROLLER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698