| OLD | NEW |
| 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 Loading... |
| 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 unsigned char* category_group_enabled, | 254 const unsigned char* category_group_enabled, |
| 255 const char* name, | 255 const char* name, |
| 256 int num_args, | 256 int num_args, |
| 257 const char** arg_names, | 257 const char** arg_names, |
| 258 const unsigned char* arg_types, | 258 const unsigned char* arg_types, |
| 259 const unsigned long long* arg_values, | 259 const unsigned long long* arg_values, |
| 260 const scoped_refptr<ConvertableToTraceFormat>* convertable_values, | 260 scoped_ptr<ConvertableToTraceFormat>* convertable_values, |
| 261 unsigned int flags); | 261 unsigned int flags); |
| 262 | 262 |
| 263 void UpdateTraceEventDuration(const unsigned char* category_group_enabled, | 263 void UpdateTraceEventDuration(const unsigned char* category_group_enabled, |
| 264 const char* name, | 264 const char* name, |
| 265 TraceEventHandle handle); | 265 TraceEventHandle handle); |
| 266 | 266 |
| 267 // For every matching event, the callback will be called. | 267 // For every matching event, the callback will be called. |
| 268 typedef base::Callback<void()> WatchEventCallback; | 268 typedef base::Callback<void()> WatchEventCallback; |
| 269 void SetWatchEvent(const std::string& category_name, | 269 void SetWatchEvent(const std::string& category_name, |
| 270 const std::string& event_name, | 270 const std::string& event_name, |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 497 subtle::AtomicWord generation_; | 497 subtle::AtomicWord generation_; |
| 498 bool use_worker_thread_; | 498 bool use_worker_thread_; |
| 499 | 499 |
| 500 DISALLOW_COPY_AND_ASSIGN(TraceLog); | 500 DISALLOW_COPY_AND_ASSIGN(TraceLog); |
| 501 }; | 501 }; |
| 502 | 502 |
| 503 } // namespace trace_event | 503 } // namespace trace_event |
| 504 } // namespace base | 504 } // namespace base |
| 505 | 505 |
| 506 #endif // BASE_TRACE_EVENT_TRACE_LOG_H_ | 506 #endif // BASE_TRACE_EVENT_TRACE_LOG_H_ |
| OLD | NEW |