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

Issue 365463003: Implement scroll handler latency tracking (Closed)

Created:
6 years, 5 months ago by Sami
Modified:
6 years, 4 months ago
CC:
cc-bugs_chromium.org, chromium-reviews, darin-cc_chromium.org, jam, jdduke+watch_chromium.org, tdresser+watch_chromium.org
Project:
chromium
Visibility:
Public.

Description

Implement scroll handler latency tracking Since scroll handlers do not block composited scrolling, the existing input latency metric will only report the response time for the compositor when scrolling a page with a handler. This is not accurate for pages that implement scroll-synchronized effects, because the scroll handler needs to be invoked so that the page contents are updated with the new scroll offset. This patch fixes the problem by forwarding latency information from the impl to the main thread when we are scrolling a layer that has an active scroll event handler. In the case the scroll handler is no-op, the latency information will be terminated as a failed commit. Sample trace: https://drive.google.com/file/d/0ByyxMXB38gLDRE40bkU5TVd0U00/edit?usp=sharing BUG=347366 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=289307

Patch Set 1 #

Total comments: 4

Patch Set 2 : Review comments. #

Total comments: 16

Patch Set 3 : Rebased. #

Patch Set 4 : Review comments. #

Total comments: 1

Patch Set 5 : latency_info() => TraceId() #

Patch Set 6 : Removed useless includes. #

Total comments: 1

Patch Set 7 : Docs #

Patch Set 8 : Rebased. #

Patch Set 9 : Implemented Yufeng's idea for creating a new latency info. #

Patch Set 10 : Build fix. #

Patch Set 11 : Sequence number calculation #

Patch Set 12 : Sequence number generation. #

Patch Set 13 : Rebased. #

Patch Set 14 : Rebased. #

Patch Set 15 : Rebased. #

Patch Set 16 : Unbreak smoothness. #

Patch Set 17 : Fix unittest. #

Patch Set 18 : Test tweak. #

Patch Set 19 : Rebased. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+299 lines, -44 lines) Patch
M cc/base/latency_info_swap_promise.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M cc/base/latency_info_swap_promise.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +4 lines, -0 lines 0 comments Download
M cc/base/latency_info_swap_promise_monitor.h View 1 chunk +1 line, -0 lines 0 comments Download
M cc/base/latency_info_swap_promise_monitor.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +62 lines, -8 lines 0 comments Download
M cc/base/swap_promise.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +5 lines, -0 lines 0 comments Download
M cc/base/swap_promise_monitor.h View 1 chunk +1 line, -0 lines 0 comments Download
M cc/trees/layer_tree_host.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M cc/trees/layer_tree_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +20 lines, -11 lines 0 comments Download
M cc/trees/layer_tree_host_common.h View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +4 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +17 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 5 chunks +73 lines, -5 lines 0 comments Download
M cc/trees/layer_tree_host_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +8 lines, -4 lines 0 comments Download
M cc/trees/thread_proxy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +2 lines, -1 line 0 comments Download
M content/renderer/gpu/queue_message_swap_promise.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
M content/renderer/gpu/queue_message_swap_promise.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +4 lines, -0 lines 0 comments Download
M content/renderer/input/input_handler_proxy.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -5 lines 0 comments Download
M tools/telemetry/telemetry/web_perf/metrics/rendering_stats.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 6 chunks +29 lines, -5 lines 0 comments Download
M tools/telemetry/telemetry/web_perf/metrics/rendering_stats_unittest.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 5 chunks +38 lines, -3 lines 0 comments Download
M tools/telemetry/telemetry/web_perf/metrics/smoothness.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +12 lines, -0 lines 0 comments Download
M ui/events/latency_info.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +4 lines, -0 lines 0 comments Download
M ui/events/latency_info.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +4 lines, -1 line 0 comments Download

Messages

Total messages: 42 (0 generated)
Sami
Hi Yufeng, I hope this is along the lines of what we talked about during ...
6 years, 5 months ago (2014-07-01 15:44:51 UTC) #1
Yufeng Shen (Slow to review)
https://codereview.chromium.org/365463003/diff/1/cc/trees/layer_tree_host.cc File cc/trees/layer_tree_host.cc (right): https://codereview.chromium.org/365463003/diff/1/cc/trees/layer_tree_host.cc#newcode1020 cc/trees/layer_tree_host.cc:1020: if (!latency_info.FindLatency( why do we need this check ? ...
6 years, 5 months ago (2014-07-04 18:34:34 UTC) #2
Sami
Thanks Yufeng. Another look please? https://codereview.chromium.org/365463003/diff/1/cc/trees/layer_tree_host.cc File cc/trees/layer_tree_host.cc (right): https://codereview.chromium.org/365463003/diff/1/cc/trees/layer_tree_host.cc#newcode1020 cc/trees/layer_tree_host.cc:1020: if (!latency_info.FindLatency( Ah, you're ...
6 years, 5 months ago (2014-07-07 14:28:18 UTC) #3
Yufeng Shen (Slow to review)
lgtm
6 years, 5 months ago (2014-07-07 19:35:04 UTC) #4
Sami
Thanks. +danakj for cc and +jdduke for content/renderer/input, please.
6 years, 5 months ago (2014-07-08 10:08:16 UTC) #5
jdduke (slow)
On 2014/07/08 10:08:16, Sami wrote: > Thanks. +danakj for cc and +jdduke for content/renderer/input, please. ...
6 years, 5 months ago (2014-07-08 15:19:23 UTC) #6
danakj
https://codereview.chromium.org/365463003/diff/20001/cc/base/latency_info_swap_promise_monitor.cc File cc/base/latency_info_swap_promise_monitor.cc (right): https://codereview.chromium.org/365463003/diff/20001/cc/base/latency_info_swap_promise_monitor.cc#newcode52 cc/base/latency_info_swap_promise_monitor.cc:52: layer_tree_host_impl_->QueueScrollUpdateLatencyInfo(*latency_); Why doesn't this make a SwapPromise and queue ...
6 years, 5 months ago (2014-07-08 16:49:08 UTC) #7
Sami
Thank you for the good suggestions Dana -- all addressed. https://codereview.chromium.org/365463003/diff/20001/cc/base/latency_info_swap_promise_monitor.cc File cc/base/latency_info_swap_promise_monitor.cc (right): https://codereview.chromium.org/365463003/diff/20001/cc/base/latency_info_swap_promise_monitor.cc#newcode52 ...
6 years, 5 months ago (2014-07-09 13:28:55 UTC) #8
danakj
https://codereview.chromium.org/365463003/diff/60001/cc/trees/layer_tree_host.cc File cc/trees/layer_tree_host.cc (right): https://codereview.chromium.org/365463003/diff/60001/cc/trees/layer_tree_host.cc#newcode1033 cc/trees/layer_tree_host.cc:1033: TRACE_ID_DONT_MANGLE(swap_promise->latency_info().trace_id), LGTM but if you were to put a ...
6 years, 5 months ago (2014-07-09 15:50:36 UTC) #9
Sami
On 2014/07/09 15:50:36, danakj wrote: > https://codereview.chromium.org/365463003/diff/60001/cc/trees/layer_tree_host.cc > File cc/trees/layer_tree_host.cc (right): > > https://codereview.chromium.org/365463003/diff/60001/cc/trees/layer_tree_host.cc#newcode1033 > ...
6 years, 5 months ago (2014-07-09 16:45:23 UTC) #10
danakj
Thanks! https://codereview.chromium.org/365463003/diff/100001/cc/base/swap_promise.h File cc/base/swap_promise.h (right): https://codereview.chromium.org/365463003/diff/100001/cc/base/swap_promise.h#newcode47 cc/base/swap_promise.h:47: virtual int64 TraceId() const = 0; Can you ...
6 years, 5 months ago (2014-07-09 16:58:19 UTC) #11
Sami
On 2014/07/09 16:58:19, danakj wrote: > Thanks! > > https://codereview.chromium.org/365463003/diff/100001/cc/base/swap_promise.h > File cc/base/swap_promise.h (right): > ...
6 years, 5 months ago (2014-07-09 17:35:21 UTC) #12
danakj
Awesome :) LGTM again in case
6 years, 5 months ago (2014-07-09 17:49:55 UTC) #13
Sami
The CQ bit was checked by skyostil@chromium.org
6 years, 5 months ago (2014-07-09 18:18:34 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skyostil@chromium.org/365463003/120001
6 years, 5 months ago (2014-07-09 18:20:48 UTC) #15
commit-bot: I haz the power
Change committed as 282117
6 years, 5 months ago (2014-07-09 20:48:45 UTC) #16
Sami
We reverted this patch since it added a lot of noise to the existing input ...
6 years, 5 months ago (2014-07-22 11:11:22 UTC) #17
Yufeng Shen (Slow to review)
On 2014/07/22 11:11:22, Sami wrote: > We reverted this patch since it added a lot ...
6 years, 5 months ago (2014-07-23 20:11:03 UTC) #18
sadrul
events rslgtm
6 years, 5 months ago (2014-07-23 20:13:32 UTC) #19
Sami
The CQ bit was checked by skyostil@chromium.org
6 years, 5 months ago (2014-07-24 11:53:26 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skyostil@chromium.org/365463003/220001
6 years, 5 months ago (2014-07-24 11:55:15 UTC) #21
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_chromium_chromeos_clang_dbg on tryserver.chromium ...
6 years, 5 months ago (2014-07-24 12:06:06 UTC) #22
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-24 12:12:59 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_swarming on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_rel_swarming/builds/1840)
6 years, 5 months ago (2014-07-24 12:13:00 UTC) #24
Sami
Thanks! Needed to rebase this a bit, so +kbr@ for content/renderer/gpu approval please.
6 years, 5 months ago (2014-07-24 14:03:40 UTC) #25
Ken Russell (switch to Gerrit)
content/renderer/gpu LGTM
6 years, 4 months ago (2014-07-28 20:15:31 UTC) #26
Sami
The CQ bit was checked by skyostil@chromium.org
6 years, 4 months ago (2014-08-04 11:14:00 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skyostil@chromium.org/365463003/260001
6 years, 4 months ago (2014-08-04 11:14:49 UTC) #28
commit-bot: I haz the power
Change committed as 287325
6 years, 4 months ago (2014-08-04 13:09:45 UTC) #29
tonyg
A revert of this CL has been created in https://codereview.chromium.org/437163007/ by tonyg@chromium.org. The reason for ...
6 years, 4 months ago (2014-08-04 19:26:46 UTC) #30
sadrul
On 2014/08/04 19:26:46, tonyg wrote: > A revert of this CL has been created in ...
6 years, 4 months ago (2014-08-05 05:01:35 UTC) #31
Sami
This broke the smoothness metric because it wasn't expecting the new type of latency data ...
6 years, 4 months ago (2014-08-12 10:13:57 UTC) #32
Yufeng Shen (Slow to review)
On 2014/08/12 10:13:57, Sami wrote: > This broke the smoothness metric because it wasn't expecting ...
6 years, 4 months ago (2014-08-12 21:52:22 UTC) #33
Sami
The CQ bit was checked by skyostil@chromium.org
6 years, 4 months ago (2014-08-13 10:31:39 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skyostil@chromium.org/365463003/340001
6 years, 4 months ago (2014-08-13 10:35:49 UTC) #35
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: chromium_presubmit on tryserver.chromium.linux ...
6 years, 4 months ago (2014-08-13 10:43:02 UTC) #36
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-13 10:44:50 UTC) #37
commit-bot: I haz the power
Try jobs failed on following builders: ios_rel_device_ninja on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_rel_device_ninja/builds/3558)
6 years, 4 months ago (2014-08-13 10:44:51 UTC) #38
Sami
The CQ bit was checked by skyostil@chromium.org
6 years, 4 months ago (2014-08-13 11:18:41 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skyostil@chromium.org/365463003/360001
6 years, 4 months ago (2014-08-13 11:19:34 UTC) #40
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_aosp on tryserver.chromium.linux ...
6 years, 4 months ago (2014-08-13 15:25:54 UTC) #41
commit-bot: I haz the power
6 years, 4 months ago (2014-08-13 16:09:54 UTC) #42
Message was sent while issue was closed.
Change committed as 289307

Powered by Google App Engine
This is Rietveld 408576698