diff options
author | miletus@chromium.org <miletus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-31 03:24:09 +0000 |
---|---|---|
committer | miletus@chromium.org <miletus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-31 03:24:09 +0000 |
commit | 37819982ea3019dcc44232442dfda2dbb0d23e22 (patch) | |
tree | 9529904c0a5c76cbefa614069a4ed474f76ff585 /base/debug | |
parent | fbabd74df6f8aa227262f68d26ef113878cd438b (diff) | |
download | chromium_src-37819982ea3019dcc44232442dfda2dbb0d23e22.zip chromium_src-37819982ea3019dcc44232442dfda2dbb0d23e22.tar.gz chromium_src-37819982ea3019dcc44232442dfda2dbb0d23e22.tar.bz2 |
Draw the start of input latency using its original/ui timestamp
Currently we draw the start of input event's latencyinfo using the
timestamp when we issue the async trace event when the input event
is passing through RWH. This CL changes that we now draw the start
of input event's latencyinfo using the input event's orignial/ui
component's timestamp so visually we can better see when the input
event was created.
BUG=396236
TEST=do scroll latency tracing on pixel/android, see that now latency
for TouchMove and GestureScrollUpdate are drawn at the same starting
time.
Review URL: https://codereview.chromium.org/424833009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@286705 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/debug')
-rw-r--r-- | base/debug/trace_event.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/base/debug/trace_event.h b/base/debug/trace_event.h index 7fddaf8..f9dc1c9 100644 --- a/base/debug/trace_event.h +++ b/base/debug/trace_event.h @@ -560,6 +560,15 @@ category_group, name, id, TRACE_EVENT_FLAG_COPY, \ arg1_name, arg1_val, arg2_name, arg2_val) +// Similar to TRACE_EVENT_ASYNC_BEGINx but with a custom |at| timestamp +// provided. +#define TRACE_EVENT_ASYNC_BEGIN_WITH_TIMESTAMP0(category_group, \ + name, id, timestamp) \ + INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ + TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id, \ + static_cast<int>(base::PlatformThread::CurrentId()), \ + timestamp, TRACE_EVENT_FLAG_NONE) + // Records a single ASYNC_STEP_INTO event for |step| immediately. If the // category is not enabled, then this does nothing. The |name| and |id| must // match the ASYNC_BEGIN event above. The |step| param identifies this step @@ -617,6 +626,13 @@ category_group, name, id, TRACE_EVENT_FLAG_COPY, \ arg1_name, arg1_val, arg2_name, arg2_val) +// Similar to TRACE_EVENT_ASYNC_ENDx but with a custom |at| timestamp provided. +#define TRACE_EVENT_ASYNC_END_WITH_TIMESTAMP0(category_group, \ + name, id, timestamp) \ + INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ + TRACE_EVENT_PHASE_ASYNC_END, category_group, name, id, \ + static_cast<int>(base::PlatformThread::CurrentId()), \ + timestamp, TRACE_EVENT_FLAG_NONE) // Records a single FLOW_BEGIN event called "name" immediately, with 0, 1 or 2 // associated arguments. If the category is not enabled, then this |