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

Issue 1025323003: Introduce a SchedulerHelper in content/child/scheduler (Closed)

Created:
5 years, 9 months ago by alex clarke (OOO till 29th)
Modified:
5 years, 8 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, kinuko+watch, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, picksi1, 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

Introduce a SchedulerHelper in content/child/scheduler We are planning on adding a WorkerScheduler for blink worker threads, which will reuse much of the RendererScheduler logic for posting Default and IdleTask tasks. This patch pulls out the common logic into a SchedulerHelper (We're going to think of a better name for this) and moves a bunch of dependencies into a new content/child/scheduler directory where the WorkerScheduler will be added in https://codereview.chromium.org/1033643004/ A WorkerSceduler is a pre-requisite for refactoring away the Blink Timer Heap as described in: https://docs.google.com/document/d/163ow-1wjd6L0rAN3V_U6t12eqVkq4mXDDjVaA4OuvCA/edit?usp=sharing BUG=463143 Committed: https://crrev.com/ef36eb7a40195ccfbc5668da2093848ac2877119 Cr-Commit-Position: refs/heads/master@{#323214}

Patch Set 1 #

Patch Set 2 : Reduce churn in BaseScheduler files #

Patch Set 3 : Couple of tweaks #

Patch Set 4 : Added the delegate #

Total comments: 10

Patch Set 5 : Sami's suggestions #

Total comments: 26

Patch Set 6 : Ross's suggestions #

Total comments: 16

Patch Set 7 : Sami's comments #

Total comments: 18

Patch Set 8 : Stuff for Ross #

Patch Set 9 : StartIdlePeriod refactor #

Patch Set 10 : Remove EstimatedEndOfIdle #

Total comments: 6

Patch Set 11 : Ross's comments #

Patch Set 12 : Fixes #

Patch Set 13 : Fix Ozone #

Patch Set 14 : Make TaskQueue::WillDeleteTaskQueueManager delete other queues #

Patch Set 15 : Fix signed / unsigned comparison warning #

Patch Set 16 : fix perftests #

Patch Set 17 : Rebase after https://codereview.chromium.org/1055473002/ #

Patch Set 18 : SchedulerHelperDelegate needs CONTENT_EXPORT for windows. #

Patch Set 19 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1054 lines, -5341 lines) Patch
A + content/child/scheduler/OWNERS View 0 chunks +-1 lines, --1 lines 0 comments Download
A + content/child/scheduler/cancelable_closure_holder.h View 2 chunks +3 lines, -3 lines 0 comments Download
A + content/child/scheduler/cancelable_closure_holder.cc View 1 chunk +1 line, -1 line 0 comments Download
A + content/child/scheduler/nestable_single_thread_task_runner.h View 2 chunks +3 lines, -3 lines 0 comments Download
A + content/child/scheduler/nestable_task_runner_for_test.h View 1 chunk +1 line, -1 line 0 comments Download
A + content/child/scheduler/nestable_task_runner_for_test.cc View 1 chunk +1 line, -1 line 0 comments Download
A + content/child/scheduler/null_idle_task_runner.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +18 lines, -12 lines 0 comments Download
A + content/child/scheduler/null_idle_task_runner.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +18 lines, -12 lines 0 comments Download
A + content/child/scheduler/prioritizing_task_queue_selector.h View 1 2 3 4 3 chunks +10 lines, -10 lines 0 comments Download
A + content/child/scheduler/prioritizing_task_queue_selector.cc View 1 2 3 4 10 chunks +20 lines, -19 lines 0 comments Download
A + content/child/scheduler/prioritizing_task_queue_selector_unittest.cc View 1 2 3 4 8 chunks +39 lines, -36 lines 0 comments Download
A + content/child/scheduler/scheduler_helper.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 5 chunks +110 lines, -162 lines 0 comments Download
A + content/child/scheduler/scheduler_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 8 chunks +136 lines, -535 lines 0 comments Download
A + content/child/scheduler/scheduler_helper_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 24 chunks +345 lines, -860 lines 0 comments Download
A + content/child/scheduler/scheduler_message_loop_delegate.h View 2 chunks +9 lines, -9 lines 0 comments Download
A + content/child/scheduler/scheduler_message_loop_delegate.cc View 2 chunks +10 lines, -11 lines 0 comments Download
A + content/child/scheduler/single_thread_idle_task_runner.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +10 lines, -4 lines 0 comments Download
A + content/child/scheduler/single_thread_idle_task_runner.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +17 lines, -11 lines 0 comments Download
A + content/child/scheduler/task_queue_manager.h View 1 2 3 4 5 2 chunks +6 lines, -2 lines 0 comments Download
A + content/child/scheduler/task_queue_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 9 chunks +26 lines, -20 lines 0 comments Download
A + content/child/scheduler/task_queue_manager_perftest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +5 lines, -6 lines 0 comments Download
A + content/child/scheduler/task_queue_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 10 chunks +18 lines, -25 lines 0 comments Download
A + content/child/scheduler/task_queue_selector.h View 2 chunks +3 lines, -3 lines 0 comments Download
M content/content_child.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +16 lines, -0 lines 0 comments Download
M content/content_renderer.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +0 lines, -12 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +6 lines, -5 lines 0 comments Download
D content/renderer/scheduler/cancelable_closure_holder.h View 1 chunk +0 lines, -39 lines 0 comments Download
D content/renderer/scheduler/cancelable_closure_holder.cc View 1 chunk +0 lines, -30 lines 0 comments Download
M content/renderer/scheduler/deadline_task_runner.h View 1 chunk +1 line, -1 line 0 comments Download
D content/renderer/scheduler/nestable_single_thread_task_runner.h View 1 chunk +0 lines, -31 lines 0 comments Download
D content/renderer/scheduler/nestable_task_runner_for_test.h View 1 chunk +0 lines, -44 lines 0 comments Download
D content/renderer/scheduler/nestable_task_runner_for_test.cc View 1 chunk +0 lines, -49 lines 0 comments Download
M content/renderer/scheduler/null_renderer_scheduler.cc View 1 chunk +1 line, -28 lines 0 comments Download
M content/renderer/scheduler/renderer_scheduler.h View 1 chunk +3 lines, -2 lines 0 comments Download
M content/renderer/scheduler/renderer_scheduler.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M content/renderer/scheduler/renderer_scheduler_impl.h View 1 2 3 4 5 6 7 8 11 chunks +15 lines, -68 lines 0 comments Download
M content/renderer/scheduler/renderer_scheduler_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 18 chunks +105 lines, -307 lines 0 comments Download
M content/renderer/scheduler/renderer_scheduler_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 9 chunks +91 lines, -90 lines 0 comments Download
D content/renderer/scheduler/renderer_scheduler_message_loop_delegate.h View 1 chunk +0 lines, -45 lines 0 comments Download
D content/renderer/scheduler/renderer_scheduler_message_loop_delegate.cc View 1 chunk +0 lines, -47 lines 0 comments Download
D content/renderer/scheduler/renderer_task_queue_selector.h View 1 chunk +0 lines, -101 lines 0 comments Download
D content/renderer/scheduler/renderer_task_queue_selector.cc View 1 chunk +0 lines, -177 lines 0 comments Download
D content/renderer/scheduler/renderer_task_queue_selector_unittest.cc View 1 chunk +0 lines, -208 lines 0 comments Download
D content/renderer/scheduler/single_thread_idle_task_runner.h View 1 chunk +0 lines, -59 lines 0 comments Download
D content/renderer/scheduler/single_thread_idle_task_runner.cc View 1 chunk +0 lines, -72 lines 0 comments Download
D content/renderer/scheduler/task_queue_manager.h View 1 chunk +0 lines, -204 lines 0 comments Download
D content/renderer/scheduler/task_queue_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +0 lines, -708 lines 0 comments Download
D content/renderer/scheduler/task_queue_manager_perftest.cc View 1 chunk +0 lines, -174 lines 0 comments Download
D content/renderer/scheduler/task_queue_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +0 lines, -1047 lines 0 comments Download
D content/renderer/scheduler/task_queue_selector.h View 1 chunk +0 lines, -43 lines 0 comments Download
M content/renderer/scheduler/webthread_impl_for_scheduler_unittest.cc View 1 2 3 2 chunks +6 lines, -3 lines 0 comments Download

Messages

Total messages: 59 (24 generated)
alex clarke (OOO till 29th)
While the number of files is big, this patch is almost exclusively a refactor, moving ...
5 years, 9 months ago (2015-03-24 16:32:22 UTC) #5
alex clarke (OOO till 29th)
This patch used the delegate as discussed off line. PTAL
5 years, 9 months ago (2015-03-26 18:05:57 UTC) #6
Sami
Thanks Alex, I think it looks great this way. I've got one suggestion for how ...
5 years, 9 months ago (2015-03-27 01:15:56 UTC) #7
alex clarke (OOO till 29th)
PTAL https://codereview.chromium.org/1025323003/diff/120001/content/child/scheduler/scheduler_helper.h File content/child/scheduler/scheduler_helper.h (right): https://codereview.chromium.org/1025323003/diff/120001/content/child/scheduler/scheduler_helper.h#newcode22 content/child/scheduler/scheduler_helper.h:22: class LongIdlePeriodDelegate { On 2015/03/27 01:15:55, Sami (slow ...
5 years, 9 months ago (2015-03-27 10:55:29 UTC) #8
rmcilroy
Overall looks really good. A couple of comments - most of which are nits. https://codereview.chromium.org/1025323003/diff/140001/content/child/scheduler/scheduler_helper.cc ...
5 years, 9 months ago (2015-03-27 14:34:40 UTC) #9
rmcilroy
Overall looks really good. A couple of comments - most of which are nits. https://codereview.chromium.org/1025323003/diff/140001/content/child/scheduler/scheduler_helper.h ...
5 years, 9 months ago (2015-03-27 14:34:41 UTC) #10
alex clarke (OOO till 29th)
PTAL https://codereview.chromium.org/1025323003/diff/140001/content/child/scheduler/scheduler_helper.cc File content/child/scheduler/scheduler_helper.cc (right): https://codereview.chromium.org/1025323003/diff/140001/content/child/scheduler/scheduler_helper.cc#newcode286 content/child/scheduler/scheduler_helper.cc:286: const { On 2015/03/27 14:34:38, rmcilroy wrote: > ...
5 years, 9 months ago (2015-03-27 16:09:17 UTC) #11
Sami
Looks great! Just small nits. https://codereview.chromium.org/1025323003/diff/160001/content/child/scheduler/null_idle_task_runner.h File content/child/scheduler/null_idle_task_runner.h (right): https://codereview.chromium.org/1025323003/diff/160001/content/child/scheduler/null_idle_task_runner.h#newcode20 content/child/scheduler/null_idle_task_runner.h:20: }; DISALLOW_COPY_AND_ASSIGN(NullIdleTaskRunner); https://codereview.chromium.org/1025323003/diff/160001/content/child/scheduler/scheduler_helper.cc File ...
5 years, 9 months ago (2015-03-27 17:22:28 UTC) #12
alex clarke (OOO till 29th)
PTAL https://codereview.chromium.org/1025323003/diff/160001/content/child/scheduler/null_idle_task_runner.h File content/child/scheduler/null_idle_task_runner.h (right): https://codereview.chromium.org/1025323003/diff/160001/content/child/scheduler/null_idle_task_runner.h#newcode20 content/child/scheduler/null_idle_task_runner.h:20: }; On 2015/03/27 17:22:27, Sami (slow -- traveling) ...
5 years, 9 months ago (2015-03-27 17:38:52 UTC) #13
Sami
Thanks, lgtm! Please update the description and let Ross have a peek before landing. https://codereview.chromium.org/1025323003/diff/160001/content/child/scheduler/scheduler_helper.cc ...
5 years, 9 months ago (2015-03-27 17:53:11 UTC) #14
rmcilroy
Last set of comments. https://codereview.chromium.org/1025323003/diff/140001/content/child/scheduler/scheduler_helper.cc File content/child/scheduler/scheduler_helper.cc (right): https://codereview.chromium.org/1025323003/diff/140001/content/child/scheduler/scheduler_helper.cc#newcode286 content/child/scheduler/scheduler_helper.cc:286: const { On 2015/03/27 16:09:17, ...
5 years, 9 months ago (2015-03-27 19:02:00 UTC) #15
alex clarke (OOO till 29th)
PTAL https://codereview.chromium.org/1025323003/diff/180001/content/child/scheduler/scheduler_helper.cc File content/child/scheduler/scheduler_helper.cc (right): https://codereview.chromium.org/1025323003/diff/180001/content/child/scheduler/scheduler_helper.cc#newcode277 content/child/scheduler/scheduler_helper.cc:277: base::TimeTicks estimated_next_frame_begin) { On 2015/03/27 19:01:59, rmcilroy wrote: ...
5 years, 8 months ago (2015-03-30 12:23:30 UTC) #16
rmcilroy
https://codereview.chromium.org/1025323003/diff/180001/content/child/scheduler/scheduler_helper.h File content/child/scheduler/scheduler_helper.h (right): https://codereview.chromium.org/1025323003/diff/180001/content/child/scheduler/scheduler_helper.h#newcode144 content/child/scheduler/scheduler_helper.h:144: const CancelableClosureHolder& EndIdlePeriodClosure() const; On 2015/03/30 12:23:29, alexclarke1 wrote: ...
5 years, 8 months ago (2015-03-30 12:59:06 UTC) #17
alex clarke (OOO till 29th)
https://codereview.chromium.org/1025323003/diff/180001/content/child/scheduler/scheduler_helper.h File content/child/scheduler/scheduler_helper.h (right): https://codereview.chromium.org/1025323003/diff/180001/content/child/scheduler/scheduler_helper.h#newcode144 content/child/scheduler/scheduler_helper.h:144: const CancelableClosureHolder& EndIdlePeriodClosure() const; On 2015/03/30 12:59:06, rmcilroy wrote: ...
5 years, 8 months ago (2015-03-30 14:02:55 UTC) #18
alex clarke (OOO till 29th)
I was able to remove EstimatedEndOfIdle() too. PTAL.
5 years, 8 months ago (2015-03-30 14:09:18 UTC) #19
alex clarke (OOO till 29th)
+jochen@chromium.org Can I get an OWNERS review for this patch? I think Ross is pretty ...
5 years, 8 months ago (2015-03-30 14:42:20 UTC) #21
rmcilroy
Looks great, thanks Alex. lgtm once final comments are addressed. https://codereview.chromium.org/1025323003/diff/240001/content/child/scheduler/scheduler_helper.cc File content/child/scheduler/scheduler_helper.cc (right): https://codereview.chromium.org/1025323003/diff/240001/content/child/scheduler/scheduler_helper.cc#newcode218 ...
5 years, 8 months ago (2015-03-30 17:53:58 UTC) #22
rmcilroy
Looks great, thanks Alex. lgtm once final comments are addressed.
5 years, 8 months ago (2015-03-30 17:53:59 UTC) #23
alex clarke (OOO till 29th)
https://codereview.chromium.org/1025323003/diff/240001/content/child/scheduler/scheduler_helper.cc File content/child/scheduler/scheduler_helper.cc (right): https://codereview.chromium.org/1025323003/diff/240001/content/child/scheduler/scheduler_helper.cc#newcode218 content/child/scheduler/scheduler_helper.cc:218: if (new_state == IdlePeriodState::IN_SHORT_IDLE_PERIOD) { On 2015/03/30 17:53:57, rmcilroy ...
5 years, 8 months ago (2015-03-31 10:18:35 UTC) #24
jochen (gone - plz use gerrit)
lgtm
5 years, 8 months ago (2015-03-31 10:36:44 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1025323003/260001
5 years, 8 months ago (2015-03-31 10:38:29 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: win8_chromium_rel on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win8_chromium_rel/builds/69142)
5 years, 8 months ago (2015-03-31 11:33:44 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1025323003/280001
5 years, 8 months ago (2015-03-31 15:00:25 UTC) #33
Sami
Still lgtm.
5 years, 8 months ago (2015-03-31 15:20:52 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1025323003/320001
5 years, 8 months ago (2015-03-31 16:40:13 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1025323003/340001
5 years, 8 months ago (2015-03-31 17:13:24 UTC) #40
commit-bot: I haz the power
Try jobs failed on following builders: win8_chromium_rel on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win8_chromium_rel/builds/69269)
5 years, 8 months ago (2015-03-31 18:26:31 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1025323003/360001
5 years, 8 months ago (2015-04-01 09:21:47 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1025323003/400001
5 years, 8 months ago (2015-04-01 09:57:17 UTC) #48
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/10669) ios_rel_device_ninja on tryserver.chromium.mac (JOB_FAILED, ...
5 years, 8 months ago (2015-04-01 10:02:25 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1025323003/400001
5 years, 8 months ago (2015-04-01 10:40:26 UTC) #52
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/10679) ios_rel_device_ninja on tryserver.chromium.mac (JOB_FAILED, ...
5 years, 8 months ago (2015-04-01 10:45:27 UTC) #54
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1025323003/420001
5 years, 8 months ago (2015-04-01 10:51:24 UTC) #57
commit-bot: I haz the power
Committed patchset #19 (id:420001)
5 years, 8 months ago (2015-04-01 11:53:56 UTC) #58
commit-bot: I haz the power
5 years, 8 months ago (2015-04-01 11:54:48 UTC) #59
Message was sent while issue was closed.
Patchset 19 (id:??) landed as
https://crrev.com/ef36eb7a40195ccfbc5668da2093848ac2877119
Cr-Commit-Position: refs/heads/master@{#323214}

Powered by Google App Engine
This is Rietveld 408576698