summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorrbyers@chromium.org <rbyers@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-10 19:01:02 +0000
committerrbyers@chromium.org <rbyers@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-10 19:01:02 +0000
commita38c64e3c5b18bacb2af9abe24bc940ef15744f9 (patch)
tree8c0d114a8f49eb62a5dfd0aa24811a32e8ae91ef /ui
parent3085128ee0b77d67afc1c4f51c4fda569033d82c (diff)
downloadchromium_src-a38c64e3c5b18bacb2af9abe24bc940ef15744f9.zip
chromium_src-a38c64e3c5b18bacb2af9abe24bc940ef15744f9.tar.gz
chromium_src-a38c64e3c5b18bacb2af9abe24bc940ef15744f9.tar.bz2
Improve tracing for input events - especially Aura touch
Put a number of key trace messages into an "input" category to make it easy to see how they relate and flow through the system (I'll make some similar changes on the blink side too). Add an async trace tracking the TouchEventQueue so that it's easy to see the latency caused by touch events waiting around in the queue. Add a trace near the point when X events first get into Aura, and include as a parameter the additional latency from the driver timestamp. BUG=None R=ben@chromium.org, nduca@chromium.org, sadrul@chromium.org Review URL: https://codereview.chromium.org/16190012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205258 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r--ui/aura/root_window_host_x11.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/ui/aura/root_window_host_x11.cc b/ui/aura/root_window_host_x11.cc
index 5c5c6ba..7d2c850 100644
--- a/ui/aura/root_window_host_x11.cc
+++ b/ui/aura/root_window_host_x11.cc
@@ -18,6 +18,7 @@
#include <string>
#include "base/command_line.h"
+#include "base/debug/trace_event.h"
#include "base/message_loop.h"
#include "base/message_pump_aurax11.h"
#include "base/stl_util.h"
@@ -939,6 +940,11 @@ void RootWindowHostX11::DispatchXI2Event(const base::NativeEvent& event) {
if (!factory->ShouldProcessXI2Event(xev))
return;
+ TRACE_EVENT1("input", "RootWindowHostX11::DispatchXI2Event",
+ "event_latency_us",
+ (ui::EventTimeForNow() - ui::EventTimeFromNative(event)).
+ InMicroseconds());
+
ui::EventType type = ui::EventTypeFromNative(xev);
XEvent last_event;
int num_coalesced = 0;