Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Issue 25022003: Report LatencyInfo through trace buffer (Closed)

Created:
7 years, 2 months ago by Yufeng Shen (Slow to review)
Modified:
7 years, 2 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, yusukes+watch_chromium.org, penghuang+watch_chromium.org, apatrick_chromium, sievers+watch_chromium.org, jbauman+watch_chromium.org, nona+watch_chromium.org, darin-cc_chromium.org, piman+watch_chromium.org, danakj+watch_chromium.org, James Su, miu+watch_chromium.org, Rick Byers
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Report LatencyInfo through trace buffer This CL is the first step in converting to use trace event to collect LatencyInfo. Changes are: 1. Each LatencyInfo will have at most one BEGIN/TERMINATED component. When the BEGIN component is added, an ASYNC_BEGIN trace event is issued. When the TERMINATED component is added, an ASYNC_END trace event is issued, and the LatencyInfo is dumped into the trace buffer. 2. BEGIN component is added to event's LatencyInfo when the event reaches RWH. 3. If events cause renderering to be schedueld in renderer, then the INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT is added when actual frame swap happens. Accordingly, swap_timestamp_ is removed. 4. If events do not cause rendering to be scheduled in renderer, then 4.1) INPUT_EVENT_LATENCY_TERMINATED_MOUSE/GESTURE_COMPONENT is added when the mouse/gesture events are acked from renderer. 4.2) If the acked touch event become gesture event, touch event's LatencInfo are copied into gesture event's LatencyInfo. 4.3) If the acked touch event does not become gesture event, INPUT_EVENT_LATENCY_TERMINATED_TOUCH_COMPONENT is then added to the touch event's LatencyInfo. This CL is only adding the ability to dump LatencyInfo to trace buffer but don't change the current way LatencyInfo is used so all the telemetry tests are not affected. The complete migration will be in followup CLs. BUG=BUG=246034 TEST=1. telemetry smoothness test still works. 2. Do trace recording with category "benchmark", check that latencyinfo are dumped to "InputLatency"; Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=228095

Patch Set 1 #

Total comments: 28

Patch Set 2 : one BEGIN/TERMINATED component for each latencyinfo #

Patch Set 3 : fix nits #

Total comments: 10

Patch Set 4 : address Jared & Rick's comments #

Patch Set 5 : fix nits #

Total comments: 10

Patch Set 6 : keep passing const XXXEventWithLatencyInfo& and make a copy of the LatencyInfo out of it when we ha… #

Patch Set 7 : fix nits #

Total comments: 10

Patch Set 8 : address jared's comments #

Patch Set 9 : fix typo #

Total comments: 14

Patch Set 10 : address sadrul's comments #

Total comments: 4

Patch Set 11 : rebase #

Patch Set 12 : fix compile error #

Unified diffs Side-by-side diffs Delta from patch set Stats (+341 lines, -127 lines) Patch
M content/browser/aura/software_browser_compositor_output_surface.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/compositing_iosurface_mac.mm View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/input/gesture_event_filter.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/input/gesture_event_filter.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +5 lines, -2 lines 0 comments Download
M content/browser/renderer_host/input/gesture_event_filter_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/input/immediate_input_router.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -3 lines 0 comments Download
M content/browser/renderer_host/input/immediate_input_router.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +17 lines, -12 lines 0 comments Download
M content/browser/renderer_host/input/input_ack_handler.h View 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/renderer_host/input/mock_input_ack_handler.h View 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/renderer_host/input/mock_input_ack_handler.cc View 1 2 3 4 5 2 chunks +7 lines, -7 lines 0 comments Download
M content/browser/renderer_host/input/touch_event_queue.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +4 lines, -8 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.h View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.cc View 1 2 3 4 5 6 7 8 9 9 chunks +46 lines, -20 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_gtk.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.mm View 1 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_win.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -1 line 0 comments Download
M content/common/content_param_traits_macros.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M content/common/gpu/image_transport_surface.cc View 1 2 chunks +4 lines, -2 lines 0 comments Download
M content/common/input/input_param_traits_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M ui/events/event.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -1 line 0 comments Download
M ui/events/gestures/gesture_sequence.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +27 lines, -6 lines 0 comments Download
M ui/events/latency_info.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +30 lines, -8 lines 0 comments Download
M ui/events/latency_info.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +135 lines, -16 lines 0 comments Download
M ui/events/latency_info_unittest.cc View 1 2 3 4 5 6 7 8 9 6 chunks +35 lines, -26 lines 0 comments Download
M ui/surface/accelerated_surface_win.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 31 (0 generated)
Yufeng Shen (Slow to review)
John, Nat: This is the first step towards latency measurement API V2. It is small ...
7 years, 2 months ago (2013-09-27 23:42:01 UTC) #1
nduca
the rough shape of this looks solid. can we have jdduke look through the input ...
7 years, 2 months ago (2013-10-01 21:43:44 UTC) #2
jdduke (slow)
https://codereview.chromium.org/25022003/diff/1/content/browser/renderer_host/input/touch_event_queue.cc File content/browser/renderer_host/input/touch_event_queue.cc (right): https://codereview.chromium.org/25022003/diff/1/content/browser/renderer_host/input/touch_event_queue.cc#newcode200 content/browser/renderer_host/input/touch_event_queue.cc:200: ui::LatencyInfo* latency = const_cast<ui::LatencyInfo*>(&(iter->latency)); Sorry, this isn't directly related ...
7 years, 2 months ago (2013-10-01 23:45:31 UTC) #3
Rick Byers
Thanks Yufeng, this looks like a great step in the right direction! https://codereview.chromium.org/25022003/diff/1/ui/events/latency_info.cc File ui/events/latency_info.cc ...
7 years, 2 months ago (2013-10-03 13:12:41 UTC) #4
Yufeng Shen (Slow to review)
Enforce that event's LatencyInfo will have at most one begin component and one terminal component. ...
7 years, 2 months ago (2013-10-04 00:29:50 UTC) #5
WRONG-USE-chromium
https://codereview.chromium.org/25022003/diff/24001/ui/events/latency_info.cc File ui/events/latency_info.cc (right): https://codereview.chromium.org/25022003/diff/24001/ui/events/latency_info.cc#newcode151 ui/events/latency_info.cc:151: TRACE_EVENT_ASYNC_BEGIN0("benchmark", If MergeWith is called, then we'll have a ...
7 years, 2 months ago (2013-10-04 01:43:42 UTC) #6
jdduke (slow)
https://codereview.chromium.org/25022003/diff/1/content/browser/renderer_host/render_widget_host_impl.cc File content/browser/renderer_host/render_widget_host_impl.cc (right): https://codereview.chromium.org/25022003/diff/1/content/browser/renderer_host/render_widget_host_impl.cc#newcode2215 content/browser/renderer_host/render_widget_host_impl.cc:2215: ui::LatencyInfo* latency = const_cast<ui::LatencyInfo*>(&(event.latency)); On 2013/10/04 00:29:51, Yufeng Shen ...
7 years, 2 months ago (2013-10-04 02:22:18 UTC) #7
Yufeng Shen (Slow to review)
https://codereview.chromium.org/25022003/diff/1/content/browser/renderer_host/render_widget_host_impl.cc File content/browser/renderer_host/render_widget_host_impl.cc (right): https://codereview.chromium.org/25022003/diff/1/content/browser/renderer_host/render_widget_host_impl.cc#newcode2215 content/browser/renderer_host/render_widget_host_impl.cc:2215: ui::LatencyInfo* latency = const_cast<ui::LatencyInfo*>(&(event.latency)); On 2013/10/04 02:22:19, jdduke wrote: ...
7 years, 2 months ago (2013-10-04 18:03:02 UTC) #8
jbauman
lgtm
7 years, 2 months ago (2013-10-08 07:09:45 UTC) #9
jdduke (slow)
https://codereview.chromium.org/25022003/diff/37001/content/browser/renderer_host/input/immediate_input_router.cc File content/browser/renderer_host/input/immediate_input_router.cc (right): https://codereview.chromium.org/25022003/diff/37001/content/browser/renderer_host/input/immediate_input_router.cc#newcode432 content/browser/renderer_host/input/immediate_input_router.cc:432: ui::LatencyInfo latency_info) { So, we're copying the ui::LatencyInfo here, ...
7 years, 2 months ago (2013-10-08 16:28:07 UTC) #10
Yufeng Shen (Slow to review)
add OWNERS: sadrul@ : content/browser/renderer_host/* ui/events/* jln@ : content/common/* apatrick: ui/surface/* https://codereview.chromium.org/25022003/diff/37001/content/browser/renderer_host/input/immediate_input_router.cc File content/browser/renderer_host/input/immediate_input_router.cc (right): ...
7 years, 2 months ago (2013-10-08 19:35:58 UTC) #11
jdduke (slow)
content/browser/renderer_host/input lgtm, modulo a few nits and a rebase. https://codereview.chromium.org/25022003/diff/60001/content/browser/renderer_host/input/immediate_input_router.cc File content/browser/renderer_host/input/immediate_input_router.cc (right): https://codereview.chromium.org/25022003/diff/60001/content/browser/renderer_host/input/immediate_input_router.cc#newcode361 content/browser/renderer_host/input/immediate_input_router.cc:361: ...
7 years, 2 months ago (2013-10-08 20:58:49 UTC) #12
jln (very slow on Chromium)
Sorry, you need a content/ OWNER for content/common.
7 years, 2 months ago (2013-10-08 21:18:05 UTC) #13
Yufeng Shen (Slow to review)
-jln@ +jam@ for OWNER of content/common/* https://codereview.chromium.org/25022003/diff/60001/content/browser/renderer_host/input/immediate_input_router.cc File content/browser/renderer_host/input/immediate_input_router.cc (right): https://codereview.chromium.org/25022003/diff/60001/content/browser/renderer_host/input/immediate_input_router.cc#newcode361 content/browser/renderer_host/input/immediate_input_router.cc:361: ui::LatencyInfo renderer_latency; On ...
7 years, 2 months ago (2013-10-08 21:35:17 UTC) #14
sadrul
Mostly nits. miletus@, jdduke@: Should/Can all the latency-info related code be moved out of RenderWidgetHostImpl ...
7 years, 2 months ago (2013-10-09 19:23:26 UTC) #15
Yufeng Shen (Slow to review)
On 2013/10/09 19:23:26, sadrul wrote: > Mostly nits. > > miletus@, jdduke@: Should/Can all the ...
7 years, 2 months ago (2013-10-09 20:53:39 UTC) #16
Yufeng Shen (Slow to review)
https://chromiumcodereview.appspot.com/25022003/diff/71001/ui/events/gestures/gesture_sequence.cc File ui/events/gestures/gesture_sequence.cc (right): https://chromiumcodereview.appspot.com/25022003/diff/71001/ui/events/gestures/gesture_sequence.cc#newcode618 ui/events/gestures/gesture_sequence.cc:618: } On 2013/10/09 19:23:27, sadrul wrote: > Please move ...
7 years, 2 months ago (2013-10-09 20:53:49 UTC) #17
jdduke (slow)
On 2013/10/09 19:23:26, sadrul wrote: > Mostly nits. > > miletus@, jdduke@: Should/Can all the ...
7 years, 2 months ago (2013-10-09 22:43:25 UTC) #18
jam
On 2013/10/08 21:35:17, Yufeng Shen wrote: > -jln@ +jam@ for OWNER of content/common/* > lgtm
7 years, 2 months ago (2013-10-10 05:00:48 UTC) #19
stuartmorgan
surface/ LGTM
7 years, 2 months ago (2013-10-10 20:28:00 UTC) #20
Ken Russell (switch to Gerrit)
ui/surface/ LGTM
7 years, 2 months ago (2013-10-10 21:18:24 UTC) #21
sadrul
LGTM with a couple of comments https://chromiumcodereview.appspot.com/25022003/diff/80001/ui/events/gestures/gesture_sequence.cc File ui/events/gestures/gesture_sequence.cc (right): https://chromiumcodereview.appspot.com/25022003/diff/80001/ui/events/gestures/gesture_sequence.cc#newcode1233 ui/events/gestures/gesture_sequence.cc:1233: void GestureSequence::UpdateGestureEventLatencyInfo(const TouchEvent& ...
7 years, 2 months ago (2013-10-10 21:58:37 UTC) #22
ernstm
Given that the LatencyInfo trace events will be consumed by telemetry benchmarks, I recommend putting ...
7 years, 2 months ago (2013-10-10 22:27:15 UTC) #23
Yufeng Shen (Slow to review)
On 2013/10/10 22:27:15, Manfred Ernst wrote: > Given that the LatencyInfo trace events will be ...
7 years, 2 months ago (2013-10-10 22:52:04 UTC) #24
Yufeng Shen (Slow to review)
https://chromiumcodereview.appspot.com/25022003/diff/80001/ui/events/gestures/gesture_sequence.cc File ui/events/gestures/gesture_sequence.cc (right): https://chromiumcodereview.appspot.com/25022003/diff/80001/ui/events/gestures/gesture_sequence.cc#newcode1233 ui/events/gestures/gesture_sequence.cc:1233: void GestureSequence::UpdateGestureEventLatencyInfo(const TouchEvent& event, On 2013/10/10 21:58:38, sadrul wrote: ...
7 years, 2 months ago (2013-10-10 22:52:14 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/miletus@chromium.org/25022003/94001
7 years, 2 months ago (2013-10-10 22:54:07 UTC) #26
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 2 months ago (2013-10-10 23:19:05 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/miletus@chromium.org/25022003/121001
7 years, 2 months ago (2013-10-10 23:46:49 UTC) #28
commit-bot: I haz the power
Step "update" is always a major failure. Look at the try server FAQ for more ...
7 years, 2 months ago (2013-10-10 23:56:17 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/miletus@chromium.org/25022003/121001
7 years, 2 months ago (2013-10-11 00:23:04 UTC) #30
commit-bot: I haz the power
7 years, 2 months ago (2013-10-11 03:32:41 UTC) #31
Message was sent while issue was closed.
Change committed as 228095

Powered by Google App Engine
This is Rietveld 408576698