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

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

Issue 1717283003: tracing: Make ConvertableToTraceFormat move-only scoped_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 10 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
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 #ifndef BASE_TRACE_EVENT_TRACE_LOG_H_ 5 #ifndef BASE_TRACE_EVENT_TRACE_LOG_H_
6 #define BASE_TRACE_EVENT_TRACE_LOG_H_ 6 #define BASE_TRACE_EVENT_TRACE_LOG_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 TraceEventHandle AddTraceEvent( 184 TraceEventHandle AddTraceEvent(
185 char phase, 185 char phase,
186 const unsigned char* category_group_enabled, 186 const unsigned char* category_group_enabled,
187 const char* name, 187 const char* name,
188 const char* scope, 188 const char* scope,
189 unsigned long long id, 189 unsigned long long id,
190 int num_args, 190 int num_args,
191 const char** arg_names, 191 const char** arg_names,
192 const unsigned char* arg_types, 192 const unsigned char* arg_types,
193 const unsigned long long* arg_values, 193 const unsigned long long* arg_values,
194 const scoped_refptr<ConvertableToTraceFormat>* convertable_values, 194 scoped_ptr<ConvertableToTraceFormat>* convertable_values,
195 unsigned int flags); 195 unsigned int flags);
196 TraceEventHandle AddTraceEventWithBindId( 196 TraceEventHandle AddTraceEventWithBindId(
197 char phase, 197 char phase,
198 const unsigned char* category_group_enabled, 198 const unsigned char* category_group_enabled,
199 const char* name, 199 const char* name,
200 const char* scope, 200 const char* scope,
201 unsigned long long id, 201 unsigned long long id,
202 unsigned long long bind_id, 202 unsigned long long bind_id,
203 int num_args, 203 int num_args,
204 const char** arg_names, 204 const char** arg_names,
205 const unsigned char* arg_types, 205 const unsigned char* arg_types,
206 const unsigned long long* arg_values, 206 const unsigned long long* arg_values,
207 const scoped_refptr<ConvertableToTraceFormat>* convertable_values, 207 scoped_ptr<ConvertableToTraceFormat>* convertable_values,
208 unsigned int flags); 208 unsigned int flags);
209 TraceEventHandle AddTraceEventWithProcessId( 209 TraceEventHandle AddTraceEventWithProcessId(
210 char phase, 210 char phase,
211 const unsigned char* category_group_enabled, 211 const unsigned char* category_group_enabled,
212 const char* name, 212 const char* name,
213 const char* scope, 213 const char* scope,
214 unsigned long long id, 214 unsigned long long id,
215 int process_id, 215 int process_id,
216 int num_args, 216 int num_args,
217 const char** arg_names, 217 const char** arg_names,
218 const unsigned char* arg_types, 218 const unsigned char* arg_types,
219 const unsigned long long* arg_values, 219 const unsigned long long* arg_values,
220 const scoped_refptr<ConvertableToTraceFormat>* convertable_values, 220 scoped_ptr<ConvertableToTraceFormat>* convertable_values,
221 unsigned int flags); 221 unsigned int flags);
222 TraceEventHandle AddTraceEventWithThreadIdAndTimestamp( 222 TraceEventHandle AddTraceEventWithThreadIdAndTimestamp(
223 char phase, 223 char phase,
224 const unsigned char* category_group_enabled, 224 const unsigned char* category_group_enabled,
225 const char* name, 225 const char* name,
226 const char* scope, 226 const char* scope,
227 unsigned long long id, 227 unsigned long long id,
228 int thread_id, 228 int thread_id,
229 const TimeTicks& timestamp, 229 const TimeTicks& timestamp,
230 int num_args, 230 int num_args,
231 const char** arg_names, 231 const char** arg_names,
232 const unsigned char* arg_types, 232 const unsigned char* arg_types,
233 const unsigned long long* arg_values, 233 const unsigned long long* arg_values,
234 const scoped_refptr<ConvertableToTraceFormat>* convertable_values, 234 scoped_ptr<ConvertableToTraceFormat>* convertable_values,
235 unsigned int flags); 235 unsigned int flags);
236 TraceEventHandle AddTraceEventWithThreadIdAndTimestamp( 236 TraceEventHandle AddTraceEventWithThreadIdAndTimestamp(
237 char phase, 237 char phase,
238 const unsigned char* category_group_enabled, 238 const unsigned char* category_group_enabled,
239 const char* name, 239 const char* name,
240 const char* scope, 240 const char* scope,
241 unsigned long long id, 241 unsigned long long id,
242 unsigned long long bind_id, 242 unsigned long long bind_id,
243 int thread_id, 243 int thread_id,
244 const TimeTicks& timestamp, 244 const TimeTicks& timestamp,
245 int num_args, 245 int num_args,
246 const char** arg_names, 246 const char** arg_names,
247 const unsigned char* arg_types, 247 const unsigned char* arg_types,
248 const unsigned long long* arg_values, 248 const unsigned long long* arg_values,
249 const scoped_refptr<ConvertableToTraceFormat>* convertable_values, 249 scoped_ptr<ConvertableToTraceFormat>* convertable_values,
250 unsigned int flags); 250 unsigned int flags);
251 251
252 // Adds a metadata event that will be written when the trace log is flushed. 252 // Adds a metadata event that will be written when the trace log is flushed.
253 void AddMetadataEvent( 253 void AddMetadataEvent(
254 const char* name, 254 const char* name,
255 int num_args, 255 int num_args,
256 const char** arg_names, 256 const char** arg_names,
257 const unsigned char* arg_types, 257 const unsigned char* arg_types,
258 const unsigned long long* arg_values, 258 const unsigned long long* arg_values,
259 const scoped_refptr<ConvertableToTraceFormat>* convertable_values, 259 scoped_ptr<ConvertableToTraceFormat>* convertable_values,
260 unsigned int flags); 260 unsigned int flags);
261 261
262 void UpdateTraceEventDuration(const unsigned char* category_group_enabled, 262 void UpdateTraceEventDuration(const unsigned char* category_group_enabled,
263 const char* name, 263 const char* name,
264 TraceEventHandle handle); 264 TraceEventHandle handle);
265 265
266 // For every matching event, the callback will be called. 266 // For every matching event, the callback will be called.
267 typedef base::Callback<void()> WatchEventCallback; 267 typedef base::Callback<void()> WatchEventCallback;
268 void SetWatchEvent(const std::string& category_name, 268 void SetWatchEvent(const std::string& category_name,
269 const std::string& event_name, 269 const std::string& event_name,
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 subtle::AtomicWord generation_; 496 subtle::AtomicWord generation_;
497 bool use_worker_thread_; 497 bool use_worker_thread_;
498 498
499 DISALLOW_COPY_AND_ASSIGN(TraceLog); 499 DISALLOW_COPY_AND_ASSIGN(TraceLog);
500 }; 500 };
501 501
502 } // namespace trace_event 502 } // namespace trace_event
503 } // namespace base 503 } // namespace base
504 504
505 #endif // BASE_TRACE_EVENT_TRACE_LOG_H_ 505 #endif // BASE_TRACE_EVENT_TRACE_LOG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698