Chromium Code Reviews| Index: base/debug/trace_event_impl.h |
| diff --git a/base/debug/trace_event_impl.h b/base/debug/trace_event_impl.h |
| index 1b1fce34cc209b452da54cad9b68f10696f4b79e..94016841d45a6e5937bd50b980f1857d050b567c 100644 |
| --- a/base/debug/trace_event_impl.h |
| +++ b/base/debug/trace_event_impl.h |
| @@ -544,6 +544,17 @@ class BASE_EXPORT TraceLog { |
| void Flush(const OutputCallback& cb); |
| void FlushButLeaveBufferIntact(const OutputCallback& flush_output_callback); |
| + // Can be called by clients to add custom events to the trace log without |
| + // using the TRACE_EVENT* macros. This must only be called when category group |
| + // is enabled for recording. |
| + TraceEventHandle AddCustomTraceEvent( |
|
dsinclair
2015/01/27 14:43:30
Instead of AddCustomTraceEvent, I think we should
Benoit L
2015/02/09 16:34:01
Done.
|
| + char phase, |
| + const unsigned char* category_group_enabled, |
| + const char* name, |
| + int thread_id, |
| + const TimeTicks& timestamp, |
| + const TimeTicks& thread_time); |
| + |
| // Called by TRACE_EVENT* macros, don't call this directly. |
| // The name parameter is a category group for example: |
| // TRACE_EVENT0("renderer,webkit", "WebViewImpl::HandleInputEvent") |
| @@ -699,6 +710,21 @@ class BASE_EXPORT TraceLog { |
| const TimeTicks& timestamp, |
| TraceEvent* trace_event); |
| + TraceEventHandle AddTraceEventInternal( |
| + char phase, |
| + const unsigned char* category_group_enabled, |
| + const char* name, |
| + unsigned long long id, |
| + int thread_id, |
| + const TimeTicks& timestamp, |
| + const TimeTicks& thread_time, |
| + int num_args, |
| + const char** arg_names, |
| + const unsigned char* arg_types, |
| + const unsigned long long* arg_values, |
| + const scoped_refptr<ConvertableToTraceFormat>* convertable_values, |
| + unsigned char flags); |
| + |
| TraceEvent* AddEventToThreadSharedChunkWhileLocked(TraceEventHandle* handle, |
| bool check_buffer_is_full); |
| void CheckIfBufferIsFullWhileLocked(); |