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

Issue 1133673004: cc: Heuristic for Renderer latency recovery (Closed)

Created:
5 years, 7 months ago by brianderson
Modified:
5 years, 5 months ago
Reviewers:
sunnyps, mithro-old
CC:
cc-bugs_chromium.org, chromium-reviews, jdduke (slow), scheduler-bugs_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

cc: Heuristic for Renderer latency recovery If the Renderer impl thread can draw before the deadline and we are getting swap acks from the Browser into the next BeginFrame, there's a very high probability that the Renderer is in a high latency mode but could operate in a low latency mode. To recover latency in that case, we skip a BeginImplFrame. BUG=406158 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Committed: https://crrev.com/6d50e7a7df5b33048b9bcd641171b31642b58850 Cr-Commit-Position: refs/heads/master@{#338205}

Patch Set 1 #

Total comments: 5

Patch Set 2 : remove unnecessary BeginImplFrameDeadlinePending reorg #

Patch Set 3 : Fix MainFrameInHighLatencyMode #

Patch Set 4 : add more unittests #

Patch Set 5 : rebase #

Total comments: 11

Patch Set 6 : fix lots of issues; improve test coverage; #

Total comments: 12

Patch Set 7 : rebase; really simplify heuristic #

Total comments: 43

Patch Set 8 : Add SchedulerStateMachine::SwapThrottled #

Total comments: 31

Patch Set 9 : rebase, some tests need fixing #

Patch Set 10 : rebase, address comments #

Total comments: 7

Patch Set 11 : rebase, address Tim's comments #

Total comments: 8

Patch Set 12 : improve test readability and coverage #

Total comments: 6

Patch Set 13 : Better names and durations #

Total comments: 30

Patch Set 14 : Sunny's review #

Patch Set 15 : So many tests #

Total comments: 2

Patch Set 16 : remove active_tree_needs_first_draw condidtion #

Total comments: 17

Patch Set 17 : Remove unused test method declaration #

Patch Set 18 : Sunny's comments #

Patch Set 19 : task_runner().RunUntilTime(now_src_->NowTicks());3. #

Patch Set 20 : rebaswe #

Unified diffs Side-by-side diffs Delta from patch set Stats (+621 lines, -105 lines) Patch
M cc/scheduler/scheduler.h View 1 2 3 4 5 6 7 8 9 10 14 15 16 17 2 chunks +3 lines, -4 lines 0 comments Download
M cc/scheduler/scheduler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 6 chunks +60 lines, -14 lines 0 comments Download
M cc/scheduler/scheduler_state_machine.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +6 lines, -1 line 0 comments Download
M cc/scheduler/scheduler_state_machine.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 12 chunks +19 lines, -15 lines 0 comments Download
M cc/scheduler/scheduler_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 6 chunks +515 lines, -71 lines 0 comments Download
M cc/test/scheduler_test_common.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +10 lines, -0 lines 0 comments Download
M cc/test/scheduler_test_common.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 56 (12 generated)
brianderson
Split this out from the DisplayScheduler patch and added unit tests. This patch should land ...
5 years, 7 months ago (2015-05-08 03:51:31 UTC) #2
brianderson
Some comments to make review easier inline. https://codereview.chromium.org/1133673004/diff/1/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc (right): https://codereview.chromium.org/1133673004/diff/1/cc/scheduler/scheduler.cc#newcode132 cc/scheduler/scheduler.cc:132: void Scheduler::SetAuthoritativeVSyncInterval(const ...
5 years, 7 months ago (2015-05-08 16:52:51 UTC) #3
brianderson
After thinking about it a bit, I think this can land before the DisplayScheduler. It ...
5 years, 7 months ago (2015-05-08 21:02:22 UTC) #4
sunnyps
Left a few comments. I haven't looked at the tests yet. I think a better ...
5 years, 7 months ago (2015-05-12 00:36:25 UTC) #5
brianderson
https://codereview.chromium.org/1133673004/diff/80001/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc (right): https://codereview.chromium.org/1133673004/diff/80001/cc/scheduler/scheduler.cc#newcode518 cc/scheduler/scheduler.cc:518: return; On 2015/05/12 at 00:36:25, sunnyps wrote: > BeginFrameSource::DidFinishFrame ...
5 years, 7 months ago (2015-05-12 19:25:18 UTC) #6
brianderson
> I think a better approach to solving this problem would be to skip renderer ...
5 years, 7 months ago (2015-05-12 22:19:00 UTC) #7
brianderson
Changed a lot in the latest patch: 1) I got rid of the arbitrary DefaultEstimatedParentDrawTime ...
5 years, 7 months ago (2015-05-13 03:02:46 UTC) #8
sunnyps
I haven't looked at the test yet and I'm still trying to wrap my head ...
5 years, 7 months ago (2015-05-21 23:42:23 UTC) #9
brianderson
https://codereview.chromium.org/1133673004/diff/100001/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc (right): https://codereview.chromium.org/1133673004/diff/100001/cc/scheduler/scheduler.cc#newcode520 cc/scheduler/scheduler.cc:520: state_machine_.SetSkipNextSwapToReduceLatency(); On 2015/05/21 23:42:23, sunnyps wrote: > Can we ...
5 years, 7 months ago (2015-05-22 01:12:53 UTC) #10
brianderson
The patch is suuper simple now. Thanks for the feedback Sunny. I think the complexity ...
5 years, 7 months ago (2015-05-22 02:44:53 UTC) #11
sunnyps
Went through the tests this time. Left a few comments. https://codereview.chromium.org/1133673004/diff/120001/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc (right): https://codereview.chromium.org/1133673004/diff/120001/cc/scheduler/scheduler.cc#newcode509 ...
5 years, 7 months ago (2015-05-22 21:15:06 UTC) #12
brianderson
Thanks for the feedback. I didn't get to respond to everything yet, but wanted to ...
5 years, 7 months ago (2015-05-23 00:53:57 UTC) #13
mithro-old
Hi Brian, Sorry for being so slow to review this CL. Please do ping me ...
5 years, 7 months ago (2015-05-27 04:40:15 UTC) #14
brianderson
https://codereview.chromium.org/1133673004/diff/140001/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc (right): https://codereview.chromium.org/1133673004/diff/140001/cc/scheduler/scheduler.cc#newcode833 cc/scheduler/scheduler.cc:833: begin_impl_frame_args_.frame_time < begin_impl_frame_args_.deadline; On 2015/05/27 04:40:14, mithro wrote: > ...
5 years, 6 months ago (2015-05-27 23:22:32 UTC) #15
brianderson
Addressed all comments, ptal. https://codereview.chromium.org/1133673004/diff/120001/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc (right): https://codereview.chromium.org/1133673004/diff/120001/cc/scheduler/scheduler.cc#newcode509 cc/scheduler/scheduler.cc:509: } else if (ShouldRecoverImplLatency()) { ...
5 years, 5 months ago (2015-06-30 22:03:53 UTC) #16
mithro-old
The code generally looks good but that I'm still finding it hard to figure out ...
5 years, 5 months ago (2015-07-06 11:58:43 UTC) #17
brianderson
Addressed Tim's comments, ptal! https://codereview.chromium.org/1133673004/diff/180001/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc (right): https://codereview.chromium.org/1133673004/diff/180001/cc/scheduler/scheduler.cc#newcode476 cc/scheduler/scheduler.cc:476: BeginImplFrame(); On 2015/07/06 11:58:42, mithro ...
5 years, 5 months ago (2015-07-07 02:04:50 UTC) #18
mithro-old
Hi Brian, Code looks good but the tests could use a little bit of improvement. ...
5 years, 5 months ago (2015-07-07 07:35:38 UTC) #19
brianderson
I'll figure out how to break up the different test configurations. It is pretty hard ...
5 years, 5 months ago (2015-07-07 18:34:03 UTC) #20
brianderson
Improved the test readability and coverage based on Tim's comments. Ptal.
5 years, 5 months ago (2015-07-07 21:11:19 UTC) #21
mithro-old
Hi Brian, Thanks for fixing up those tests, they are much easier to understand now ...
5 years, 5 months ago (2015-07-08 00:54:51 UTC) #22
brianderson
Addressed latest comments from Tim. Will let https://codereview.chromium.org/1192663005/ marinate a bit before landing this.
5 years, 5 months ago (2015-07-08 02:37:44 UTC) #23
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1133673004/240001
5 years, 5 months ago (2015-07-08 03:08:36 UTC) #26
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 5 months ago (2015-07-08 03:35:38 UTC) #28
mithro-old
On 2015/07/08 03:35:38, commit-bot: I haz the power wrote: > Dry run: This issue passed ...
5 years, 5 months ago (2015-07-08 03:53:25 UTC) #29
sunnyps
On 2015/07/08 03:53:25, mithro wrote: > On 2015/07/08 03:35:38, commit-bot: I haz the power wrote: ...
5 years, 5 months ago (2015-07-08 04:25:13 UTC) #30
brianderson
On 2015/07/08 04:25:13, sunnyps wrote: > On 2015/07/08 03:53:25, mithro wrote: > > On 2015/07/08 ...
5 years, 5 months ago (2015-07-08 18:07:01 UTC) #31
sunnyps
Left a "few" comments - most are nits, the most significant one is about the ...
5 years, 5 months ago (2015-07-08 22:37:14 UTC) #32
sunnyps
https://codereview.chromium.org/1133673004/diff/240001/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc (right): https://codereview.chromium.org/1133673004/diff/240001/cc/scheduler/scheduler.cc#newcode758 cc/scheduler/scheduler.cc:758: if (state_machine_.impl_latency_takes_priority()) On 2015/07/08 22:37:12, sunnyps wrote: > Might ...
5 years, 5 months ago (2015-07-08 22:40:07 UTC) #33
brianderson
Addressed most of Sunny's comments. I think I need to add tests for the corner ...
5 years, 5 months ago (2015-07-09 01:28:12 UTC) #34
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1133673004/280001
5 years, 5 months ago (2015-07-09 02:21:35 UTC) #37
brianderson
Added tests for each of the conditions in Scheduler::ShouldRecoverImplLatency. Ptal.
5 years, 5 months ago (2015-07-09 02:21:58 UTC) #38
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/83908)
5 years, 5 months ago (2015-07-09 03:31:42 UTC) #40
brianderson
https://codereview.chromium.org/1133673004/diff/280001/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc (right): https://codereview.chromium.org/1133673004/diff/280001/cc/scheduler/scheduler.cc#newcode793 cc/scheduler/scheduler.cc:793: if (state_machine_.active_tree_needs_first_draw()) Hmm. I think there are a lot ...
5 years, 5 months ago (2015-07-09 05:44:06 UTC) #41
brianderson
https://codereview.chromium.org/1133673004/diff/280001/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc (right): https://codereview.chromium.org/1133673004/diff/280001/cc/scheduler/scheduler.cc#newcode793 cc/scheduler/scheduler.cc:793: if (state_machine_.active_tree_needs_first_draw()) On 2015/07/09 05:44:06, brianderson wrote: > Hmm. ...
5 years, 5 months ago (2015-07-09 17:55:38 UTC) #42
sunnyps
Should be good to go once these comments are addressed. https://codereview.chromium.org/1133673004/diff/240001/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc (right): https://codereview.chromium.org/1133673004/diff/240001/cc/scheduler/scheduler.cc#newcode784 ...
5 years, 5 months ago (2015-07-09 23:44:30 UTC) #43
brianderson
Ptal. https://codereview.chromium.org/1133673004/diff/300001/cc/scheduler/scheduler.cc File cc/scheduler/scheduler.cc (right): https://codereview.chromium.org/1133673004/diff/300001/cc/scheduler/scheduler.cc#newcode778 cc/scheduler/scheduler.cc:778: bool frame_time_is_before_deadline = args.frame_time < args.deadline; On 2015/07/09 ...
5 years, 5 months ago (2015-07-10 00:34:08 UTC) #44
sunnyps
LGTM except for one minor issue. https://codereview.chromium.org/1133673004/diff/300001/cc/scheduler/scheduler_unittest.cc File cc/scheduler/scheduler_unittest.cc (right): https://codereview.chromium.org/1133673004/diff/300001/cc/scheduler/scheduler_unittest.cc#newcode1585 cc/scheduler/scheduler_unittest.cc:1585: task_runner().RunTasksWhile(client_->ImplFrameDeadlinePending(true)); On 2015/07/10 ...
5 years, 5 months ago (2015-07-10 00:40:15 UTC) #45
brianderson
On 2015/07/10 00:40:15, sunnyps wrote: > LGTM except for one minor issue. > > https://codereview.chromium.org/1133673004/diff/300001/cc/scheduler/scheduler_unittest.cc ...
5 years, 5 months ago (2015-07-10 00:50:03 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1133673004/360001
5 years, 5 months ago (2015-07-10 00:50:40 UTC) #49
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_compile_dbg_32_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_compile_dbg_32_ng/builds/71830) ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, ...
5 years, 5 months ago (2015-07-10 00:54:38 UTC) #51
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1133673004/380001
5 years, 5 months ago (2015-07-10 01:07:35 UTC) #54
commit-bot: I haz the power
Committed patchset #20 (id:380001)
5 years, 5 months ago (2015-07-10 02:29:24 UTC) #55
commit-bot: I haz the power
5 years, 5 months ago (2015-07-10 02:30:16 UTC) #56
Message was sent while issue was closed.
Patchset 20 (id:??) landed as
https://crrev.com/6d50e7a7df5b33048b9bcd641171b31642b58850
Cr-Commit-Position: refs/heads/master@{#338205}

Powered by Google App Engine
This is Rietveld 408576698