| Index: base/trace_event/trace_event_impl.cc
|
| diff --git a/base/trace_event/trace_event_impl.cc b/base/trace_event/trace_event_impl.cc
|
| index 72b46f92914c8d73d51068324f6c2a757371b5d1..0d4112b1cde36e6f2b816d08b6925dd977376d97 100644
|
| --- a/base/trace_event/trace_event_impl.cc
|
| +++ b/base/trace_event/trace_event_impl.cc
|
| @@ -1735,6 +1735,7 @@ void TraceLog::Flush(const TraceLog::OutputCallback& cb) {
|
| FinishFlush(generation);
|
| }
|
|
|
| +
|
| void TraceLog::ConvertTraceEventsToTraceFormat(
|
| scoped_ptr<TraceBuffer> logged_events,
|
| const TraceLog::OutputCallback& flush_output_callback) {
|
| @@ -1742,9 +1743,10 @@ void TraceLog::ConvertTraceEventsToTraceFormat(
|
| if (flush_output_callback.is_null())
|
| return;
|
|
|
| - // The callback need to be called at least once even if there is no events
|
| - // to let the caller know the completion of flush.
|
| + // The callback needs to be called at least once even if there is no events to
|
| + // let the caller know the completion of flush.
|
| bool has_more_events = true;
|
| +
|
| do {
|
| scoped_refptr<RefCountedString> json_events_str_ptr =
|
| new RefCountedString();
|
| @@ -1886,6 +1888,46 @@ TraceEventHandle TraceLog::AddTraceEventWithThreadIdAndTimestamp(
|
| 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) {
|
| + return AddTraceEventInternal(
|
| + phase, category_group_enabled, name, id, thread_id, timestamp,
|
| + thread_time, num_args, arg_names, arg_types, arg_values,
|
| + convertable_values, flags);
|
| +}
|
| +
|
| +TraceEventHandle TraceLog::AddTraceEventWithThreadIdAndTimestamp(
|
| + char phase,
|
| + const unsigned char* category_group_enabled,
|
| + const char* name,
|
| + unsigned long long id,
|
| + int thread_id,
|
| + const TimeTicks& timestamp,
|
| + 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) {
|
| + return AddTraceEventWithThreadIdAndTimestamp(
|
| + phase, category_group_enabled, name, id, thread_id, timestamp,
|
| + ThreadNow(), num_args, arg_names, arg_types, arg_values,
|
| + convertable_values, flags);
|
| +}
|
| +
|
| +TraceEventHandle TraceLog::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,
|
| @@ -2034,7 +2076,7 @@ TraceEventHandle TraceLog::AddTraceEventWithThreadIdAndTimestamp(
|
| }
|
|
|
| if (thread_local_event_buffer)
|
| - thread_local_event_buffer->ReportOverhead(now, thread_now);
|
| + thread_local_event_buffer->ReportOverhead(now, thread_time);
|
|
|
| return handle;
|
| }
|
|
|