Implement native event observer for linux.
This CL uses ui::PlatformEventSource observer API to hook into pre and post native event dispatch on Linux. Timestamps for X11 events are in X11 server time. The implementation makes a round-trip to the X11 server to obtain a delta, and then uses that delta with base::TimeTicks::Now() to convert to a base::TimeTicks. The overhead from the rount-trip seems reasonable. 99th percentile X11 RTT is 3ms. 99.9th percentile is 16ms. 99.99th percentile is 40ms. These include the time for syscalls to base::TimeTicks::Now(). To further reduce overhead, this CL changes the UMA metric to only be computed with 1/1000 frequency, to avoid two calls to base::TimeTicks::Now(). Note: The implementation of native event observer will be turned on via Finch experiment to measure overhead. Change-Id: I786537f093e862a7a19630c9150606a2eb8267d9 Bug: 859155 Reviewed-on: https://chromium-review.googlesource.com/1162658Reviewed-by:Timothy Dresser <tdresser@chromium.org> Reviewed-by:
Avi Drissman <avi@chromium.org> Reviewed-by:
Alexander Timin <altimin@chromium.org> Reviewed-by:
Thomas Anderson <thomasanderson@chromium.org> Commit-Queue: Erik Chen <erikchen@chromium.org> Cr-Commit-Position: refs/heads/master@{#581304}
Showing
Please register or sign in to comment