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

Issue 1424053002: Adds a flag to support "Virtual Time" to the blink scheduler (Closed)

Created:
5 years, 1 month ago by alex clarke (OOO till 29th)
Modified:
5 years, 1 month ago
CC:
blundell+watchlist_chromium.org, chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, droger+watchlist_chromium.org, jam, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, nasko+codewatch_chromium.org, scheduler-bugs_chromium.org, sdefresne+watchlist_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Adds a flag to support "Virtual Time" to the blink scheduler For use in Headless Chrome, this patch introduces support for virtual time. The idea is if the main thread (or a worker thread) runs out of non-delayed work to do then we are able to fast forward time to the next scheduled delayed task. This is enabled via the new --enable-virtualized-time command line flag. Currently this does not extend to RAF, and virtual time for workers is not currently synchronized with anything. BUG=546953 Committed: https://crrev.com/f65eb2da91a4544d49ea6ddab73cac52b0e338b4 Cr-Commit-Position: refs/heads/master@{#357562}

Patch Set 1 #

Patch Set 2 : Added a test #

Total comments: 22

Patch Set 3 : Renamed it to a delegate #

Patch Set 4 : Missed a couple of comments #

Patch Set 5 : Helps if I upload the right files ;) #

Total comments: 11

Patch Set 6 : Made the patch a bit smaller as discussed #

Patch Set 7 : Renaming stuff #

Patch Set 8 : Fix compile #

Patch Set 9 : Another try #

Total comments: 4

Patch Set 10 : Rename the thing for sami #

Patch Set 11 : Fix dcheck #

Patch Set 12 : Rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+881 lines, -760 lines) Patch
M components/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M components/components_tests.gyp View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +8 lines, -7 lines 0 comments Download
M components/scheduler/BUILD.gn View 1 2 3 4 5 6 7 3 chunks +14 lines, -5 lines 0 comments Download
M components/scheduler/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M components/scheduler/base/lazy_now.h View 1 2 1 chunk +7 lines, -7 lines 0 comments Download
M components/scheduler/base/lazy_now.cc View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M components/scheduler/base/nestable_single_thread_task_runner.h View 1 2 1 chunk +0 lines, -32 lines 0 comments Download
M components/scheduler/base/nestable_task_runner_for_test.h View 1 2 1 chunk +0 lines, -40 lines 0 comments Download
M components/scheduler/base/nestable_task_runner_for_test.cc View 1 2 1 chunk +0 lines, -46 lines 0 comments Download
M components/scheduler/base/task_queue_impl.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M components/scheduler/base/task_queue_manager.h View 1 2 3 4 5 6 7 8 9 10 11 7 chunks +10 lines, -17 lines 0 comments Download
M components/scheduler/base/task_queue_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 13 chunks +25 lines, -39 lines 0 comments Download
A components/scheduler/base/task_queue_manager_delegate.h View 1 2 3 4 5 6 1 chunk +40 lines, -0 lines 0 comments Download
A components/scheduler/base/task_queue_manager_delegate_for_test.h View 1 2 3 4 5 6 1 chunk +47 lines, -0 lines 0 comments Download
A components/scheduler/base/task_queue_manager_delegate_for_test.cc View 1 2 3 4 5 6 1 chunk +56 lines, -0 lines 0 comments Download
M components/scheduler/base/task_queue_manager_perftest.cc View 1 2 3 4 5 2 chunks +5 lines, -2 lines 0 comments Download
M components/scheduler/base/task_queue_manager_unittest.cc View 1 2 3 4 5 6 9 chunks +55 lines, -46 lines 0 comments Download
M components/scheduler/child/idle_helper.cc View 1 2 3 4 chunks +8 lines, -5 lines 0 comments Download
M components/scheduler/child/idle_helper_unittest.cc View 1 2 3 4 5 6 5 chunks +14 lines, -13 lines 0 comments Download
M components/scheduler/child/scheduler_helper.h View 1 2 3 4 5 6 7 8 9 4 chunks +9 lines, -10 lines 0 comments Download
M components/scheduler/child/scheduler_helper.cc View 1 2 3 4 5 6 7 8 9 6 chunks +9 lines, -15 lines 0 comments Download
M components/scheduler/child/scheduler_helper_unittest.cc View 1 2 3 4 5 6 4 chunks +5 lines, -8 lines 0 comments Download
M components/scheduler/child/scheduler_task_runner_delegate.h View 1 2 3 4 5 6 1 chunk +0 lines, -37 lines 0 comments Download
M components/scheduler/child/scheduler_task_runner_delegate_for_test.h View 1 2 3 4 5 6 1 chunk +0 lines, -52 lines 0 comments Download
M components/scheduler/child/scheduler_task_runner_delegate_for_test.cc View 1 2 3 4 5 6 1 chunk +0 lines, -58 lines 0 comments Download
M components/scheduler/child/scheduler_task_runner_delegate_impl.h View 1 2 3 4 5 6 1 chunk +0 lines, -49 lines 0 comments Download
M components/scheduler/child/scheduler_task_runner_delegate_impl.cc View 1 2 3 4 5 6 1 chunk +0 lines, -57 lines 0 comments Download
M components/scheduler/child/scheduler_task_runner_delegate_impl_unittest.cc View 1 2 3 4 5 6 1 chunk +0 lines, -28 lines 0 comments Download
A + components/scheduler/child/scheduler_tqm_delegate.h View 1 2 3 4 5 6 2 chunks +9 lines, -9 lines 0 comments Download
A + components/scheduler/child/scheduler_tqm_delegate_for_test.h View 1 2 3 4 5 6 2 chunks +20 lines, -14 lines 0 comments Download
A components/scheduler/child/scheduler_tqm_delegate_for_test.cc View 1 2 3 4 5 6 1 chunk +67 lines, -0 lines 0 comments Download
A + components/scheduler/child/scheduler_tqm_delegate_impl.h View 1 2 3 4 5 6 2 chunks +18 lines, -12 lines 0 comments Download
A components/scheduler/child/scheduler_tqm_delegate_impl.cc View 1 2 3 4 5 6 1 chunk +67 lines, -0 lines 0 comments Download
A + components/scheduler/child/scheduler_tqm_delegate_impl_unittest.cc View 1 2 3 4 5 6 1 chunk +6 lines, -4 lines 0 comments Download
A + components/scheduler/child/virtual_time_tqm_delegate.h View 1 2 3 4 5 6 7 8 9 2 chunks +26 lines, -12 lines 0 comments Download
A components/scheduler/child/virtual_time_tqm_delegate.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +89 lines, -0 lines 0 comments Download
A components/scheduler/child/virtual_time_tqm_delegate_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +54 lines, -0 lines 0 comments Download
M components/scheduler/child/webthread_impl_for_worker_scheduler.h View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M components/scheduler/child/webthread_impl_for_worker_scheduler.cc View 1 2 3 4 5 6 2 chunks +6 lines, -3 lines 0 comments Download
M components/scheduler/child/worker_scheduler.h View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M components/scheduler/child/worker_scheduler.cc View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M components/scheduler/child/worker_scheduler_impl.h View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M components/scheduler/child/worker_scheduler_impl.cc View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M components/scheduler/child/worker_scheduler_impl_unittest.cc View 1 2 3 4 5 6 4 chunks +6 lines, -11 lines 0 comments Download
A components/scheduler/common/scheduler_switches.h View 1 2 1 chunk +16 lines, -0 lines 0 comments Download
A components/scheduler/common/scheduler_switches.cc View 1 2 3 4 5 6 1 chunk +16 lines, -0 lines 0 comments Download
M components/scheduler/ppapi/webthread_impl_for_ppapi.h View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M components/scheduler/ppapi/webthread_impl_for_ppapi.cc View 1 2 3 4 5 6 2 chunks +5 lines, -3 lines 0 comments Download
M components/scheduler/renderer/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M components/scheduler/renderer/idle_time_estimator.h View 2 chunks +2 lines, -3 lines 0 comments Download
M components/scheduler/renderer/idle_time_estimator.cc View 2 chunks +2 lines, -6 lines 0 comments Download
M components/scheduler/renderer/idle_time_estimator_unittest.cc View 1 2 3 4 5 6 7 8 9 4 chunks +11 lines, -10 lines 0 comments Download
M components/scheduler/renderer/renderer_scheduler.cc View 1 2 3 4 5 6 2 chunks +14 lines, -3 lines 0 comments Download
M components/scheduler/renderer/renderer_scheduler_impl.h View 1 2 3 4 5 6 2 chunks +3 lines, -4 lines 0 comments Download
M components/scheduler/renderer/renderer_scheduler_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 13 chunks +23 lines, -16 lines 0 comments Download
M components/scheduler/renderer/renderer_scheduler_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +11 lines, -23 lines 0 comments Download
M components/scheduler/renderer/task_cost_estimator.h View 2 chunks +4 lines, -4 lines 0 comments Download
M components/scheduler/renderer/task_cost_estimator.cc View 2 chunks +3 lines, -7 lines 0 comments Download
M components/scheduler/renderer/task_cost_estimator_unittest.cc View 3 chunks +11 lines, -8 lines 0 comments Download
M components/scheduler/renderer/web_frame_host_scheduler_impl_unittest.cc View 1 2 3 4 5 6 3 chunks +5 lines, -4 lines 0 comments Download
M components/scheduler/renderer/webthread_impl_for_renderer_scheduler_unittest.cc View 1 2 3 4 5 6 3 chunks +8 lines, -2 lines 0 comments Download
M components/scheduler/scheduler.gyp View 1 chunk +12 lines, -0 lines 0 comments Download
M components/scheduler/scheduler.gypi View 1 2 3 4 5 6 2 chunks +10 lines, -4 lines 0 comments Download
M components/scheduler/test/lazy_scheduler_message_loop_delegate_for_tests.h View 1 2 3 4 5 6 4 chunks +7 lines, -4 lines 0 comments Download
M components/scheduler/test/lazy_scheduler_message_loop_delegate_for_tests.cc View 1 2 3 4 5 6 3 chunks +10 lines, -1 line 0 comments Download
M content/browser/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +3 lines, -0 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M media/blink/run_all_unittests.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 51 (20 generated)
alex clarke (OOO till 29th)
5 years, 1 month ago (2015-10-27 18:02:22 UTC) #2
alex clarke (OOO till 29th)
PTAL
5 years, 1 month ago (2015-10-27 18:02:29 UTC) #3
Sami
https://codereview.chromium.org/1424053002/diff/20001/components/scheduler/base/lazy_now.h File components/scheduler/base/lazy_now.h (right): https://codereview.chromium.org/1424053002/diff/20001/components/scheduler/base/lazy_now.h#newcode8 components/scheduler/base/lazy_now.h:8: #include "base/time/tick_clock.h" nit: Forward decl instead? https://codereview.chromium.org/1424053002/diff/20001/components/scheduler/base/nestable_single_thread_task_runner.h File components/scheduler/base/nestable_single_thread_task_runner.h ...
5 years, 1 month ago (2015-10-28 20:00:35 UTC) #4
alex clarke (OOO till 29th)
PTAL https://codereview.chromium.org/1424053002/diff/20001/components/scheduler/base/lazy_now.h File components/scheduler/base/lazy_now.h (right): https://codereview.chromium.org/1424053002/diff/20001/components/scheduler/base/lazy_now.h#newcode8 components/scheduler/base/lazy_now.h:8: #include "base/time/tick_clock.h" On 2015/10/28 20:00:34, Sami wrote: > ...
5 years, 1 month ago (2015-10-29 18:07:31 UTC) #6
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1424053002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1424053002/40001
5 years, 1 month ago (2015-10-29 18:08:10 UTC) #7
alex clarke (OOO till 29th)
BTW I didn't forget about that test that got removed. I think I have an ...
5 years, 1 month ago (2015-10-29 18:08:26 UTC) #8
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_chromium_gn_compile_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_chromium_gn_compile_rel/builds/150999) cast_shell_android on ...
5 years, 1 month ago (2015-10-29 18:18:33 UTC) #10
alex clarke (OOO till 29th)
https://codereview.chromium.org/1424053002/diff/20001/components/scheduler/child/scheduler_helper.h File components/scheduler/child/scheduler_helper.h (right): https://codereview.chromium.org/1424053002/diff/20001/components/scheduler/child/scheduler_helper.h#newcode86 components/scheduler/child/scheduler_helper.h:86: base::TimeTicks Now() const; On 2015/10/28 20:00:35, Sami wrote: > ...
5 years, 1 month ago (2015-10-29 18:23:14 UTC) #11
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1424053002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1424053002/80001
5 years, 1 month ago (2015-10-29 18:25:01 UTC) #13
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_gn_chromeos_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_chromeos_rel/builds/100172) linux_chromium_rel_ng on ...
5 years, 1 month ago (2015-10-29 18:35:50 UTC) #15
Sami
https://codereview.chromium.org/1424053002/diff/80001/components/scheduler/base/task_queue_manager.cc File components/scheduler/base/task_queue_manager.cc (right): https://codereview.chromium.org/1424053002/diff/80001/components/scheduler/base/task_queue_manager.cc#newcode323 components/scheduler/base/task_queue_manager.cc:323: delegate_->OnNoMoreWork(); Were we going to rename this to OnNoMoreImmediateWork ...
5 years, 1 month ago (2015-10-30 11:11:21 UTC) #16
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1424053002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1424053002/120001
5 years, 1 month ago (2015-10-30 12:12:22 UTC) #18
alex clarke (OOO till 29th)
PTAL https://codereview.chromium.org/1424053002/diff/20001/components/scheduler/base/task_queue_manager_unittest.cc File components/scheduler/base/task_queue_manager_unittest.cc (left): https://codereview.chromium.org/1424053002/diff/20001/components/scheduler/base/task_queue_manager_unittest.cc#oldcode133 components/scheduler/base/task_queue_manager_unittest.cc:133: TEST_F(TaskQueueManagerTest, NowNotCalledWhenThereAreNoDelayedTasks) { On 2015/10/28 20:00:35, Sami wrote: ...
5 years, 1 month ago (2015-10-30 12:12:25 UTC) #19
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: cast_shell_linux on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linux/builds/73391)
5 years, 1 month ago (2015-10-30 12:22:14 UTC) #21
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1424053002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1424053002/140001
5 years, 1 month ago (2015-10-30 12:46:26 UTC) #23
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/133740)
5 years, 1 month ago (2015-10-30 12:57:46 UTC) #25
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1424053002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1424053002/160001
5 years, 1 month ago (2015-10-30 13:51:34 UTC) #27
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_arm64_dbg_recipe on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_arm64_dbg_recipe/builds/138388) android_compile_dbg on ...
5 years, 1 month ago (2015-10-30 14:06:26 UTC) #29
Sami
lgtm with a couple of nits. https://codereview.chromium.org/1424053002/diff/80001/components/scheduler/common/scheduler_switches.cc File components/scheduler/common/scheduler_switches.cc (right): https://codereview.chromium.org/1424053002/diff/80001/components/scheduler/common/scheduler_switches.cc#newcode12 components/scheduler/common/scheduler_switches.cc:12: // done. This ...
5 years, 1 month ago (2015-10-30 14:09:51 UTC) #30
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1424053002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1424053002/180001
5 years, 1 month ago (2015-10-30 14:36:23 UTC) #32
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/133781)
5 years, 1 month ago (2015-10-30 15:12:42 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/1424053002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1424053002/200001
5 years, 1 month ago (2015-10-30 15:55:14 UTC) #36
alex clarke (OOO till 29th)
jochen@ please review content/browser change sandersd@ please review media/blink change Thanks! https://codereview.chromium.org/1424053002/diff/160001/components/scheduler/child/scheduler_helper.h File components/scheduler/child/scheduler_helper.h (right): ...
5 years, 1 month ago (2015-10-30 16:02:00 UTC) #38
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 1 month ago (2015-10-30 17:00:46 UTC) #40
sandersd (OOO until July 31)
LGTM for media/
5 years, 1 month ago (2015-11-02 20:07:17 UTC) #41
jochen (gone - plz use gerrit)
lgtm
5 years, 1 month ago (2015-11-03 07:21:43 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1424053002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1424053002/220001
5 years, 1 month ago (2015-11-03 11:48:31 UTC) #45
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/135139)
5 years, 1 month ago (2015-11-03 14:07:25 UTC) #47
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1424053002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1424053002/220001
5 years, 1 month ago (2015-11-03 15:19:57 UTC) #49
commit-bot: I haz the power
Committed patchset #12 (id:220001)
5 years, 1 month ago (2015-11-03 18:24:25 UTC) #50
commit-bot: I haz the power
5 years, 1 month ago (2015-11-03 18:26:00 UTC) #51
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/f65eb2da91a4544d49ea6ddab73cac52b0e338b4
Cr-Commit-Position: refs/heads/master@{#357562}

Powered by Google App Engine
This is Rietveld 408576698