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

Issue 1033643004: Add a WorkerScheduler and a WebThreadImplForWorker (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, kinuko, 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

Add a WorkerScheduler and a WebThreadImplForWorker Adds a simple WorkerScheduler which supports Default and Idle Tasks (via Long Idle Periods). A follow up Blink patch will refactor WorkerThread.cpp to use these Idle Tasks. 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/510ed9c42029e1b2924ac05082c958591f029624 Cr-Commit-Position: refs/heads/master@{#324847} Committed: https://crrev.com/b37d4c285dc2f505b006187d2651f6db96d9a42c Cr-Commit-Position: refs/heads/master@{#325026}

Patch Set 1 #

Patch Set 2 : Correct Diffbase #

Total comments: 2

Patch Set 3 : Rebase #

Patch Set 4 : Rebase #

Patch Set 5 : Fixed a test bug, introduced an Init() api #

Patch Set 6 : InitOnThread needed to call Init() #

Total comments: 28

Patch Set 7 : Responding to feedback and adding a WebThreadImplForWorkerSchedulerTest #

Patch Set 8 : Fix WebThreadImplForWorkerSchedulerTest::TestTaskObserver flake. #

Patch Set 9 : Make WebThreadImplForWorkerSchedulerTest::TestTaskObserver less verbose #

Total comments: 8

Patch Set 10 : Ross's suggestions #

Total comments: 3

Patch Set 11 : Rebase #

Patch Set 12 : Fix typo #

Patch Set 13 : Rebase #

Patch Set 14 : couldn't #ifndef NDEBUG because there are non-debug builds where the dcheck was being compiled #

Patch Set 15 : try and fix 32bit compile #

Patch Set 16 : Fix bug where tasks posted to a worker thread did not always run when the thread was shutdown #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+997 lines, -786 lines) Patch
M content/child/blink_platform_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +3 lines, -2 lines 0 comments Download
A + content/child/scheduler/null_worker_scheduler.h View 1 2 3 4 1 chunk +11 lines, -20 lines 0 comments Download
A + content/child/scheduler/null_worker_scheduler.cc View 1 2 3 4 2 chunks +14 lines, -45 lines 0 comments Download
M content/child/scheduler/scheduler_helper.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +4 lines, -0 lines 0 comments Download
M content/child/scheduler/scheduler_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M content/child/scheduler/scheduler_helper_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
A + content/child/scheduler/webthread_impl_for_worker_scheduler.h View 1 2 3 4 5 6 7 8 9 2 chunks +20 lines, -11 lines 0 comments Download
A content/child/scheduler/webthread_impl_for_worker_scheduler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +85 lines, -0 lines 1 comment Download
A content/child/scheduler/webthread_impl_for_worker_scheduler_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +170 lines, -0 lines 0 comments Download
A + content/child/scheduler/worker_scheduler.h View 1 2 3 4 5 6 7 8 9 3 chunks +16 lines, -55 lines 0 comments Download
A + content/child/scheduler/worker_scheduler.cc View 1 chunk +10 lines, -10 lines 0 comments Download
A + content/child/scheduler/worker_scheduler_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +38 lines, -22 lines 0 comments Download
A content/child/scheduler/worker_scheduler_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +92 lines, -0 lines 0 comments Download
A content/child/scheduler/worker_scheduler_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +420 lines, -0 lines 0 comments Download
M content/child/threaded_data_provider.h View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M content/child/threaded_data_provider.cc View 1 2 3 4 5 6 6 chunks +6 lines, -6 lines 0 comments Download
A + content/child/webthread_base.h View 1 2 3 4 5 6 7 8 9 10 5 chunks +16 lines, -21 lines 0 comments Download
A + content/child/webthread_base.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +29 lines, -23 lines 0 comments Download
M content/child/webthread_impl.h View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -85 lines 0 comments Download
M content/child/webthread_impl.cc View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -158 lines 0 comments Download
M content/content_child.gypi View 1 2 3 4 5 6 7 8 9 3 chunks +10 lines, -2 lines 0 comments Download
M content/content_renderer.gypi View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -2 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +3 lines, -1 line 0 comments Download
M content/renderer/renderer_blink_platform_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -2 lines 0 comments Download
M content/renderer/renderer_blink_platform_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 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 9 10 1 chunk +1 line, -0 lines 0 comments Download
A + content/renderer/scheduler/webthread_impl_for_renderer_scheduler.h View 1 2 3 4 5 6 7 8 9 2 chunks +9 lines, -8 lines 0 comments Download
A + content/renderer/scheduler/webthread_impl_for_renderer_scheduler.cc View 1 2 3 4 5 6 1 chunk +15 lines, -8 lines 0 comments Download
A + content/renderer/scheduler/webthread_impl_for_renderer_scheduler_unittest.cc View 1 2 3 4 5 6 7 chunks +11 lines, -11 lines 0 comments Download
M content/renderer/scheduler/webthread_impl_for_scheduler.h View 1 2 3 4 5 6 1 chunk +0 lines, -41 lines 0 comments Download
M content/renderer/scheduler/webthread_impl_for_scheduler.cc View 1 2 3 4 5 6 1 chunk +0 lines, -45 lines 0 comments Download
D content/renderer/scheduler/webthread_impl_for_scheduler_unittest.cc View 1 2 3 4 5 6 1 chunk +0 lines, -202 lines 0 comments Download
M content/test/test_blink_web_unit_test_support.cc View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -2 lines 0 comments Download

Messages

Total messages: 74 (29 generated)
alex clarke (OOO till 29th)
5 years, 8 months ago (2015-03-30 12:46:57 UTC) #4
alex clarke (OOO till 29th)
Fixed the diffbase
5 years, 8 months ago (2015-03-30 13:12:46 UTC) #6
rmcilroy
Only had a very quick look, but overall this looks great. I'll have a more ...
5 years, 8 months ago (2015-03-30 18:00:54 UTC) #7
alex clarke (OOO till 29th)
https://codereview.chromium.org/1033643004/diff/80001/content/child/scheduler/worker_scheduler_impl.cc File content/child/scheduler/worker_scheduler_impl.cc (right): https://codereview.chromium.org/1033643004/diff/80001/content/child/scheduler/worker_scheduler_impl.cc#newcode28 content/child/scheduler/worker_scheduler_impl.cc:28: helper_.InitiateLongIdlePeriodAfterWakeup(); On 2015/03/30 18:00:54, rmcilroy wrote: > Is it ...
5 years, 8 months ago (2015-03-31 17:03:50 UTC) #8
rmcilroy
On 2015/03/31 17:03:50, alexclarke1 wrote: > https://codereview.chromium.org/1033643004/diff/80001/content/child/scheduler/worker_scheduler_impl.cc > File content/child/scheduler/worker_scheduler_impl.cc (right): > > https://codereview.chromium.org/1033643004/diff/80001/content/child/scheduler/worker_scheduler_impl.cc#newcode28 > ...
5 years, 8 months ago (2015-04-01 10:24:35 UTC) #9
alex clarke (OOO till 29th)
On 2015/04/01 10:24:35, rmcilroy wrote: > On 2015/03/31 17:03:50, alexclarke1 wrote: > > > https://codereview.chromium.org/1033643004/diff/80001/content/child/scheduler/worker_scheduler_impl.cc ...
5 years, 8 months ago (2015-04-01 12:30:02 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1033643004/120001
5 years, 8 months ago (2015-04-01 12:31:11 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/53255)
5 years, 8 months ago (2015-04-01 12:40:42 UTC) #14
alex clarke (OOO till 29th)
I think I've fixed Ross's concern re initiating long idle.
5 years, 8 months ago (2015-04-01 17:31:19 UTC) #15
Sami
Looks pretty good I think. https://codereview.chromium.org/1033643004/diff/160001/content/child/scheduler/task_queue_manager.cc File content/child/scheduler/task_queue_manager.cc (left): https://codereview.chromium.org/1033643004/diff/160001/content/child/scheduler/task_queue_manager.cc#oldcode309 content/child/scheduler/task_queue_manager.cc:309: MoveReadyDelayedTasksToIncomingQueueLocked(lazy_now); Did you mean ...
5 years, 8 months ago (2015-04-02 10:19:46 UTC) #16
rmcilroy
looks pretty good - a couple of more comments. https://codereview.chromium.org/1033643004/diff/160001/content/child/scheduler/worker_scheduler_impl.cc File content/child/scheduler/worker_scheduler_impl.cc (right): https://codereview.chromium.org/1033643004/diff/160001/content/child/scheduler/worker_scheduler_impl.cc#newcode15 content/child/scheduler/worker_scheduler_impl.cc:15: ...
5 years, 8 months ago (2015-04-02 11:01:26 UTC) #17
kinuko
A few drive-by comments (mostly minor) https://codereview.chromium.org/1033643004/diff/160001/content/child/scheduler/webthread_impl_for_worker.cc File content/child/scheduler/webthread_impl_for_worker.cc (right): https://codereview.chromium.org/1033643004/diff/160001/content/child/scheduler/webthread_impl_for_worker.cc#newcode19 content/child/scheduler/webthread_impl_for_worker.cc:19: cc::CompletionEvent completion; Drive-by ...
5 years, 8 months ago (2015-04-02 13:03:09 UTC) #18
alex clarke (OOO till 29th)
PTAL https://codereview.chromium.org/1033643004/diff/160001/content/child/scheduler/task_queue_manager.cc File content/child/scheduler/task_queue_manager.cc (left): https://codereview.chromium.org/1033643004/diff/160001/content/child/scheduler/task_queue_manager.cc#oldcode309 content/child/scheduler/task_queue_manager.cc:309: MoveReadyDelayedTasksToIncomingQueueLocked(lazy_now); On 2015/04/02 10:19:45, Sami wrote: > Did ...
5 years, 8 months ago (2015-04-02 15:19:28 UTC) #19
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1033643004/180001
5 years, 8 months ago (2015-04-02 15:20:22 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/1033643004/180001
5 years, 8 months ago (2015-04-02 15:30:35 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/53677)
5 years, 8 months ago (2015-04-02 15:39:32 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1033643004/200001
5 years, 8 months ago (2015-04-02 17:02:08 UTC) #26
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/53735)
5 years, 8 months ago (2015-04-02 17:37:19 UTC) #28
alex clarke (OOO till 29th)
Post Easter PING :)
5 years, 8 months ago (2015-04-08 13:21:44 UTC) #29
rmcilroy
A couple of last comments but lgtm once these are addressed (but please wait for ...
5 years, 8 months ago (2015-04-08 18:34:24 UTC) #30
alex clarke (OOO till 29th)
https://codereview.chromium.org/1033643004/diff/220001/content/child/scheduler/webthread_impl_for_worker_scheduler_unittest.cc File content/child/scheduler/webthread_impl_for_worker_scheduler_unittest.cc (right): https://codereview.chromium.org/1033643004/diff/220001/content/child/scheduler/webthread_impl_for_worker_scheduler_unittest.cc#newcode120 content/child/scheduler/webthread_impl_for_worker_scheduler_unittest.cc:120: On 2015/04/08 18:34:24, rmcilroy wrote: > How about some ...
5 years, 8 months ago (2015-04-09 10:02:37 UTC) #31
Sami
Thanks, lgtm. https://codereview.chromium.org/1033643004/diff/240001/content/child/scheduler/webthread_impl_for_worker_scheduler_unittest.cc File content/child/scheduler/webthread_impl_for_worker_scheduler_unittest.cc (right): https://codereview.chromium.org/1033643004/diff/240001/content/child/scheduler/webthread_impl_for_worker_scheduler_unittest.cc#newcode150 content/child/scheduler/webthread_impl_for_worker_scheduler_unittest.cc:150: EXPECT_THAT(calls, testing::HasSubstr("willProcessTask run didProcessTask")); Neat! https://codereview.chromium.org/1033643004/diff/240001/content/child/scheduler/worker_scheduler_impl.h File ...
5 years, 8 months ago (2015-04-09 12:02:44 UTC) #32
alex clarke (OOO till 29th)
https://codereview.chromium.org/1033643004/diff/240001/content/child/scheduler/worker_scheduler_impl.h File content/child/scheduler/worker_scheduler_impl.h (right): https://codereview.chromium.org/1033643004/diff/240001/content/child/scheduler/worker_scheduler_impl.h#newcode52 content/child/scheduler/worker_scheduler_impl.h:52: bool initalized_; On 2015/04/09 12:02:43, Sami wrote: > typo: ...
5 years, 8 months ago (2015-04-10 11:41:31 UTC) #33
alex clarke (OOO till 29th)
jochen@chromium.org Can I please get an owners review for the non-scheduler directory changes? Thanks!
5 years, 8 months ago (2015-04-10 11:42:32 UTC) #35
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1033643004/280001
5 years, 8 months ago (2015-04-10 16:36:35 UTC) #38
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/41791)
5 years, 8 months ago (2015-04-10 16:43:26 UTC) #40
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1033643004/300001
5 years, 8 months ago (2015-04-10 16:47:25 UTC) #44
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1033643004/320001
5 years, 8 months ago (2015-04-10 16:50:27 UTC) #47
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/55521)
5 years, 8 months ago (2015-04-10 16:59:41 UTC) #49
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1033643004/340001
5 years, 8 months ago (2015-04-10 17:18:19 UTC) #52
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/55536)
5 years, 8 months ago (2015-04-10 17:28:36 UTC) #54
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1033643004/360001
5 years, 8 months ago (2015-04-13 09:07:56 UTC) #57
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/55813)
5 years, 8 months ago (2015-04-13 09:15:53 UTC) #59
jochen (gone - plz use gerrit)
lgtm
5 years, 8 months ago (2015-04-13 13:08:52 UTC) #60
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1033643004/360001
5 years, 8 months ago (2015-04-13 13:40:23 UTC) #62
commit-bot: I haz the power
Committed patchset #15 (id:360001)
5 years, 8 months ago (2015-04-13 14:28:25 UTC) #63
commit-bot: I haz the power
Patchset 15 (id:??) landed as https://crrev.com/510ed9c42029e1b2924ac05082c958591f029624 Cr-Commit-Position: refs/heads/master@{#324847}
5 years, 8 months ago (2015-04-13 14:29:21 UTC) #64
Nate Chapin
A revert of this CL (patchset #15 id:360001) has been created in https://codereview.chromium.org/1081933002/ by japhet@chromium.org. ...
5 years, 8 months ago (2015-04-13 16:47:59 UTC) #65
alex clarke (OOO till 29th)
Sami can you please take a look at my fix for the webkit_unit_tests flakes.
5 years, 8 months ago (2015-04-13 17:18:35 UTC) #66
Sami
https://codereview.chromium.org/1033643004/diff/380001/content/child/scheduler/webthread_impl_for_worker_scheduler.cc File content/child/scheduler/webthread_impl_for_worker_scheduler.cc (right): https://codereview.chromium.org/1033643004/diff/380001/content/child/scheduler/webthread_impl_for_worker_scheduler.cc#newcode31 content/child/scheduler/webthread_impl_for_worker_scheduler.cc:31: TaskRunner()->PostTask( In other words this shutdown task mustn't be ...
5 years, 8 months ago (2015-04-13 17:38:49 UTC) #67
alex clarke (OOO till 29th)
On 2015/04/13 17:38:49, Sami wrote: > https://codereview.chromium.org/1033643004/diff/380001/content/child/scheduler/webthread_impl_for_worker_scheduler.cc > File content/child/scheduler/webthread_impl_for_worker_scheduler.cc (right): > > https://codereview.chromium.org/1033643004/diff/380001/content/child/scheduler/webthread_impl_for_worker_scheduler.cc#newcode31 > ...
5 years, 8 months ago (2015-04-14 09:07:53 UTC) #68
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1033643004/380001
5 years, 8 months ago (2015-04-14 09:58:20 UTC) #71
commit-bot: I haz the power
Committed patchset #16 (id:380001)
5 years, 8 months ago (2015-04-14 11:35:06 UTC) #72
commit-bot: I haz the power
Patchset 16 (id:??) landed as https://crrev.com/b37d4c285dc2f505b006187d2651f6db96d9a42c Cr-Commit-Position: refs/heads/master@{#325026}
5 years, 8 months ago (2015-04-14 11:35:58 UTC) #73
alex clarke (OOO till 29th)
5 years, 8 months ago (2015-04-14 13:52:21 UTC) #74
Message was sent while issue was closed.
A revert of this CL (patchset #16 id:380001) has been created in
https://codereview.chromium.org/1088933002/ by alexclarke@chromium.org.

The reason for reverting is: Looks like this broke
ImageFrameGeneratorTest.incompleteDecodeBecomesCompleteMultiThreaded.

Powered by Google App Engine
This is Rietveld 408576698