diff options
author | dyen <dyen@chromium.org> | 2015-05-05 13:29:33 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-05 20:31:18 +0000 |
commit | f9c8e6e49bee995d8ded114958789fb6d62992b6 (patch) | |
tree | a71ea6ce075ae713eefc6d36c1c8327c50ea2d68 /base/trace_event/trace_event_impl.cc | |
parent | f65686cdf2a36ae94d4a39dbf5ec8d50ff7c8e4f (diff) | |
download | chromium_src-f9c8e6e49bee995d8ded114958789fb6d62992b6.zip chromium_src-f9c8e6e49bee995d8ded114958789fb6d62992b6.tar.gz chromium_src-f9c8e6e49bee995d8ded114958789fb6d62992b6.tar.bz2 |
Add support for async thread times using a trace flag.
This CL depends on trace-viewer change found here:
https://codereview.appspot.com/226330044/
Asynchronous traces traditionally do not support thread times
because the times stored usually do not correlate to actual
thread times used between the start and end call.
Occasionally they do make sense though, this CL adds a flag which
marks the event as having valid thread time data even on
asynchronous trace events.
R=dsinclair@chromium.org, nduca@chromium.org
BUG=478923
Review URL: https://codereview.chromium.org/1099403004
Cr-Commit-Position: refs/heads/master@{#328394}
Diffstat (limited to 'base/trace_event/trace_event_impl.cc')
-rw-r--r-- | base/trace_event/trace_event_impl.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/base/trace_event/trace_event_impl.cc b/base/trace_event/trace_event_impl.cc index f1c87dd..5ae7fb25 100644 --- a/base/trace_event/trace_event_impl.cc +++ b/base/trace_event/trace_event_impl.cc @@ -742,6 +742,11 @@ void TraceEvent::AppendAsJSON(std::string* out) const { StringAppendF(out, ",\"tts\":%" PRId64, thread_time_int64); } + // Output async tts marker field if flag is set. + if (flags_ & TRACE_EVENT_FLAG_ASYNC_TTS) { + StringAppendF(out, ", \"use_async_tts\":1"); + } + // If id_ is set, print it out as a hex string so we don't loose any // bits (it might be a 64-bit pointer). if (flags_ & TRACE_EVENT_FLAG_HAS_ID) |