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

Issue 1158443008: compositor-worker: Share a thread and an isolate for compositor workers. (Closed)

Created:
5 years, 7 months ago by sadrul
Modified:
5 years, 6 months ago
Reviewers:
kinuko, haraken, sof
CC:
blink-reviews, kinuko+worker_chromium.org, horo+watch_chromium.org, falken, oilpan-reviews
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

compositor-worker: Share a thread and an isolate for compositor workers. Notable changes: . WorkerThread: Move thread initialization/shutdown into virtual methods, so that CompositorWorkerThread can override the behaviour to allow multiple compositor workers to safely share the same thread. . CompositorWorkerManager: Responsible for managing the WebThreadSupportingGC and v8::Isolate for the compositor workers. It essentially keeps a ref-count for the thread and isolate and decides when to shutdown/initialize a thread or isolate. BUG=436932 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=196625 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=196627 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=196944

Patch Set 1 #

Patch Set 2 : . #

Total comments: 8

Patch Set 3 : . #

Patch Set 4 : . #

Patch Set 5 : . #

Patch Set 6 : harden-test #

Total comments: 12

Patch Set 7 : . #

Total comments: 13

Patch Set 8 : . #

Total comments: 16

Patch Set 9 : . #

Total comments: 6

Patch Set 10 : . #

Total comments: 24

Patch Set 11 : . #

Total comments: 8

Patch Set 12 : . #

Total comments: 4

Patch Set 13 : . #

Total comments: 3

Patch Set 14 : fix-build #

Patch Set 15 : tot-merge #

Unified diffs Side-by-side diffs Delta from patch set Stats (+514 lines, -10 lines) Patch
M Source/core/core.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/workers/WorkerThread.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +4 lines, -0 lines 0 comments Download
M Source/core/workers/WorkerThread.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 chunks +16 lines, -4 lines 0 comments Download
M Source/modules/InitModules.cpp View 1 2 3 4 5 6 7 8 2 chunks +6 lines, -0 lines 0 comments Download
A Source/modules/compositorworker/CompositorWorkerManager.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +56 lines, -0 lines 0 comments Download
A Source/modules/compositorworker/CompositorWorkerManager.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +150 lines, -0 lines 0 comments Download
A Source/modules/compositorworker/CompositorWorkerManagerTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +232 lines, -0 lines 0 comments Download
M Source/modules/compositorworker/CompositorWorkerThread.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +13 lines, -3 lines 0 comments Download
M Source/modules/compositorworker/CompositorWorkerThread.cpp View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +32 lines, -3 lines 0 comments Download
M Source/modules/compositorworker/DEPS View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M Source/modules/modules.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 69 (12 generated)
sadrul
Hi! This is still a little WIP, in the sense that there is a TODO, ...
5 years, 7 months ago (2015-05-25 04:13:23 UTC) #2
kinuko
(Sorry for belated review, thanks for your patience) https://codereview.chromium.org/1158443008/diff/20001/Source/core/workers/WorkerThread.cpp File Source/core/workers/WorkerThread.cpp (right): https://codereview.chromium.org/1158443008/diff/20001/Source/core/workers/WorkerThread.cpp#newcode433 Source/core/workers/WorkerThread.cpp:433: m_isolate ...
5 years, 7 months ago (2015-05-26 14:41:25 UTC) #3
sadrul
Thanks for the feedback! I have responded to your comments below. I still haven't completed ...
5 years, 7 months ago (2015-05-27 01:28:01 UTC) #4
sadrul
Hi! I have added a few unit-tests to test the edge-cases I could think of. ...
5 years, 7 months ago (2015-05-28 00:32:19 UTC) #6
kinuko
https://codereview.chromium.org/1158443008/diff/120001/Source/core/workers/WorkerThread.h File Source/core/workers/WorkerThread.h (right): https://codereview.chromium.org/1158443008/diff/120001/Source/core/workers/WorkerThread.h#newcode77 Source/core/workers/WorkerThread.h:77: virtual void shutdownBackingThread(); Are they called outside WorkerThread or ...
5 years, 6 months ago (2015-05-28 16:21:59 UTC) #7
sadrul
https://codereview.chromium.org/1158443008/diff/120001/Source/core/workers/WorkerThread.h File Source/core/workers/WorkerThread.h (right): https://codereview.chromium.org/1158443008/diff/120001/Source/core/workers/WorkerThread.h#newcode77 Source/core/workers/WorkerThread.h:77: virtual void shutdownBackingThread(); On 2015/05/28 16:21:59, kinuko wrote: > ...
5 years, 6 months ago (2015-05-28 16:51:56 UTC) #8
sadrul
https://codereview.chromium.org/1158443008/diff/120001/Source/core/workers/WorkerThread.h File Source/core/workers/WorkerThread.h (right): https://codereview.chromium.org/1158443008/diff/120001/Source/core/workers/WorkerThread.h#newcode166 Source/core/workers/WorkerThread.h:166: OwnPtr<WorkerV8Isolate> m_isolate; On 2015/05/28 16:51:56, sadrul wrote: > On ...
5 years, 6 months ago (2015-05-28 18:00:47 UTC) #10
sadrul
To note: https://codereview.chromium.org/1134523002/ has landed. So the trybots should now turn green.
5 years, 6 months ago (2015-05-29 15:35:20 UTC) #11
kinuko
Sorry, let me take another look tomorrow. It's a bit puzzling me how they should ...
5 years, 6 months ago (2015-05-29 17:45:18 UTC) #12
sadrul
Thanks for the feedback! https://codereview.chromium.org/1158443008/diff/120001/Source/core/workers/WorkerThread.h File Source/core/workers/WorkerThread.h (right): https://codereview.chromium.org/1158443008/diff/120001/Source/core/workers/WorkerThread.h#newcode166 Source/core/workers/WorkerThread.h:166: OwnPtr<WorkerV8Isolate> m_isolate; On 2015/05/29 17:45:18, ...
5 years, 6 months ago (2015-05-29 18:26:32 UTC) #13
kinuko
Some more comments. https://codereview.chromium.org/1158443008/diff/120001/Source/core/workers/WorkerThread.h File Source/core/workers/WorkerThread.h (right): https://codereview.chromium.org/1158443008/diff/120001/Source/core/workers/WorkerThread.h#newcode166 Source/core/workers/WorkerThread.h:166: OwnPtr<WorkerV8Isolate> m_isolate; On 2015/05/29 18:26:32, sadrul ...
5 years, 6 months ago (2015-05-31 15:18:24 UTC) #14
sadrul
https://codereview.chromium.org/1158443008/diff/160001/Source/modules/compositorworker/CompositorWorkerManager.cpp File Source/modules/compositorworker/CompositorWorkerManager.cpp (right): https://codereview.chromium.org/1158443008/diff/160001/Source/modules/compositorworker/CompositorWorkerManager.cpp#newcode43 Source/modules/compositorworker/CompositorWorkerManager.cpp:43: static CompositorWorkerManager* s_instance = nullptr; On 2015/05/31 15:18:24, kinuko ...
5 years, 6 months ago (2015-05-31 16:23:43 UTC) #15
kinuko
On 2015/05/31 16:23:43, sadrul wrote: > https://codereview.chromium.org/1158443008/diff/160001/Source/modules/compositorworker/CompositorWorkerManager.cpp > File Source/modules/compositorworker/CompositorWorkerManager.cpp (right): > > https://codereview.chromium.org/1158443008/diff/160001/Source/modules/compositorworker/CompositorWorkerManager.cpp#newcode43 > ...
5 years, 6 months ago (2015-06-01 01:57:17 UTC) #16
sadrul
https://codereview.chromium.org/1158443008/diff/160001/Source/core/workers/WorkerThread.cpp File Source/core/workers/WorkerThread.cpp (right): https://codereview.chromium.org/1158443008/diff/160001/Source/core/workers/WorkerThread.cpp#newcode320 Source/core/workers/WorkerThread.cpp:320: ASSERT(isolate()); On 2015/05/31 15:18:24, kinuko wrote: > This part ...
5 years, 6 months ago (2015-06-01 05:24:11 UTC) #17
kinuko
Haven't looked into tests yet, but sending some more comments now. https://codereview.chromium.org/1158443008/diff/180001/Source/core/workers/DedicatedWorkerThread.cpp File Source/core/workers/DedicatedWorkerThread.cpp (right): ...
5 years, 6 months ago (2015-06-01 13:15:42 UTC) #18
sadrul
https://codereview.chromium.org/1158443008/diff/180001/Source/core/workers/DedicatedWorkerThread.cpp File Source/core/workers/DedicatedWorkerThread.cpp (right): https://codereview.chromium.org/1158443008/diff/180001/Source/core/workers/DedicatedWorkerThread.cpp#newcode71 Source/core/workers/DedicatedWorkerThread.cpp:71: return WorkerIsolateWrapper::createDefault(); On 2015/06/01 13:15:41, kinuko wrote: > I'm ...
5 years, 6 months ago (2015-06-01 14:21:16 UTC) #20
kinuko
ok, lgtm mod nits https://codereview.chromium.org/1158443008/diff/220001/Source/modules/compositorworker/CompositorWorkerManagerTest.cpp File Source/modules/compositorworker/CompositorWorkerManagerTest.cpp (right): https://codereview.chromium.org/1158443008/diff/220001/Source/modules/compositorworker/CompositorWorkerManagerTest.cpp#newcode34 Source/modules/compositorworker/CompositorWorkerManagerTest.cpp:34: void executeCallbackAfterV8Termination(PassOwnPtr<Function<void()>> callback) The verb ...
5 years, 6 months ago (2015-06-01 16:08:00 UTC) #21
kinuko
By the way once you feel comfortable you should probably make modules/compositorworker/OWNERS and put your ...
5 years, 6 months ago (2015-06-01 16:09:34 UTC) #22
sadrul
+haraken@ for Source/modules/ owner. On 2015/06/01 16:09:34, kinuko wrote: > By the way once you ...
5 years, 6 months ago (2015-06-01 17:12:39 UTC) #24
haraken
not LGTM, unfortunately. This CL looks more complicated than necessary. Also can we split this ...
5 years, 6 months ago (2015-06-02 02:14:49 UTC) #25
sadrul
Hi! Thanks for the feedback! I replied to your question about SharedV8Isolate below. I will ...
5 years, 6 months ago (2015-06-02 02:37:54 UTC) #26
haraken
https://codereview.chromium.org/1158443008/diff/240001/Source/modules/compositorworker/CompositorWorkerManager.cpp File Source/modules/compositorworker/CompositorWorkerManager.cpp (right): https://codereview.chromium.org/1158443008/diff/240001/Source/modules/compositorworker/CompositorWorkerManager.cpp#newcode17 Source/modules/compositorworker/CompositorWorkerManager.cpp:17: class SharedV8Isolate final : public WorkerIsolateWrapper { On 2015/06/02 ...
5 years, 6 months ago (2015-06-02 02:42:23 UTC) #27
sadrul
[ some comments still left to address about renaming and moving WorkerIsolateWrapper. But responded to ...
5 years, 6 months ago (2015-06-02 02:48:28 UTC) #28
haraken
https://codereview.chromium.org/1158443008/diff/240001/Source/modules/compositorworker/CompositorWorkerManager.cpp File Source/modules/compositorworker/CompositorWorkerManager.cpp (right): https://codereview.chromium.org/1158443008/diff/240001/Source/modules/compositorworker/CompositorWorkerManager.cpp#newcode17 Source/modules/compositorworker/CompositorWorkerManager.cpp:17: class SharedV8Isolate final : public WorkerIsolateWrapper { On 2015/06/02 ...
5 years, 6 months ago (2015-06-02 03:34:26 UTC) #29
sadrul
https://codereview.chromium.org/1158443008/diff/240001/Source/modules/compositorworker/CompositorWorkerManager.cpp File Source/modules/compositorworker/CompositorWorkerManager.cpp (right): https://codereview.chromium.org/1158443008/diff/240001/Source/modules/compositorworker/CompositorWorkerManager.cpp#newcode17 Source/modules/compositorworker/CompositorWorkerManager.cpp:17: class SharedV8Isolate final : public WorkerIsolateWrapper { On 2015/06/02 ...
5 years, 6 months ago (2015-06-02 04:23:56 UTC) #30
haraken
On 2015/06/02 04:23:56, sadrul wrote: > https://codereview.chromium.org/1158443008/diff/240001/Source/modules/compositorworker/CompositorWorkerManager.cpp > File Source/modules/compositorworker/CompositorWorkerManager.cpp (right): > > https://codereview.chromium.org/1158443008/diff/240001/Source/modules/compositorworker/CompositorWorkerManager.cpp#newcode17 > ...
5 years, 6 months ago (2015-06-02 04:36:14 UTC) #31
sadrul
On 2015/06/02 04:36:14, haraken wrote: > On 2015/06/02 04:23:56, sadrul wrote: > > > https://codereview.chromium.org/1158443008/diff/240001/Source/modules/compositorworker/CompositorWorkerManager.cpp ...
5 years, 6 months ago (2015-06-02 04:45:41 UTC) #32
haraken
On 2015/06/02 04:45:41, sadrul wrote: > On 2015/06/02 04:36:14, haraken wrote: > > On 2015/06/02 ...
5 years, 6 months ago (2015-06-02 04:49:56 UTC) #33
sadrul
On 2015/06/02 04:49:56, haraken wrote: > On 2015/06/02 04:45:41, sadrul wrote: > > On 2015/06/02 ...
5 years, 6 months ago (2015-06-02 04:57:08 UTC) #34
haraken
On 2015/06/02 04:57:08, sadrul wrote: > On 2015/06/02 04:49:56, haraken wrote: > > On 2015/06/02 ...
5 years, 6 months ago (2015-06-02 05:07:42 UTC) #35
sadrul
[snipping earlier snippets since we seem to have hit rietveld comment limit of 10K characters] ...
5 years, 6 months ago (2015-06-02 05:37:36 UTC) #36
sadrul
On 2015/06/02 05:37:36, sadrul wrote: > [snipping earlier snippets since we seem to have hit ...
5 years, 6 months ago (2015-06-02 06:03:44 UTC) #37
kinuko
On 2015/06/02 06:03:44, sadrul wrote: > On 2015/06/02 05:37:36, sadrul wrote: > > [snipping earlier ...
5 years, 6 months ago (2015-06-02 10:20:54 UTC) #38
sadrul
On 2015/06/02 10:20:54, kinuko wrote: > On 2015/06/02 06:03:44, sadrul wrote: > > On 2015/06/02 ...
5 years, 6 months ago (2015-06-02 12:23:13 UTC) #39
haraken
On 2015/06/02 12:23:13, sadrul wrote: > On 2015/06/02 10:20:54, kinuko wrote: > > On 2015/06/02 ...
5 years, 6 months ago (2015-06-02 14:22:03 UTC) #40
kinuko
On 2015/06/02 14:22:03, haraken wrote: > On 2015/06/02 12:23:13, sadrul wrote: > > On 2015/06/02 ...
5 years, 6 months ago (2015-06-02 15:46:34 UTC) #41
sadrul
On 2015/06/02 15:46:34, kinuko wrote: > On 2015/06/02 14:22:03, haraken wrote: > > On 2015/06/02 ...
5 years, 6 months ago (2015-06-02 20:47:07 UTC) #42
haraken
Thanks for the update! Mostly looks good to me. https://codereview.chromium.org/1158443008/diff/260001/Source/modules/compositorworker/CompositorWorkerManager.cpp File Source/modules/compositorworker/CompositorWorkerManager.cpp (right): https://codereview.chromium.org/1158443008/diff/260001/Source/modules/compositorworker/CompositorWorkerManager.cpp#newcode103 Source/modules/compositorworker/CompositorWorkerManager.cpp:103: ...
5 years, 6 months ago (2015-06-03 02:44:11 UTC) #43
sadrul
Thanks for the quick reviews! https://codereview.chromium.org/1158443008/diff/260001/Source/modules/compositorworker/CompositorWorkerManager.cpp File Source/modules/compositorworker/CompositorWorkerManager.cpp (right): https://codereview.chromium.org/1158443008/diff/260001/Source/modules/compositorworker/CompositorWorkerManager.cpp#newcode103 Source/modules/compositorworker/CompositorWorkerManager.cpp:103: m_isolate = V8PerIsolateData::initialize(); On ...
5 years, 6 months ago (2015-06-03 03:16:00 UTC) #44
haraken
LGTM on my side.
5 years, 6 months ago (2015-06-03 03:26:55 UTC) #45
kinuko
Looking good, much simpler now! https://codereview.chromium.org/1158443008/diff/280001/Source/core/workers/WorkerThread.cpp File Source/core/workers/WorkerThread.cpp (right): https://codereview.chromium.org/1158443008/diff/280001/Source/core/workers/WorkerThread.cpp#newcode378 Source/core/workers/WorkerThread.cpp:378: I feel we should ...
5 years, 6 months ago (2015-06-03 05:05:03 UTC) #46
sadrul
https://codereview.chromium.org/1158443008/diff/280001/Source/core/workers/WorkerThread.cpp File Source/core/workers/WorkerThread.cpp (right): https://codereview.chromium.org/1158443008/diff/280001/Source/core/workers/WorkerThread.cpp#newcode378 Source/core/workers/WorkerThread.cpp:378: On 2015/06/03 05:05:03, kinuko wrote: > I feel we ...
5 years, 6 months ago (2015-06-03 14:31:38 UTC) #47
kinuko
lgtm
5 years, 6 months ago (2015-06-03 15:27:51 UTC) #48
kinuko
On 2015/06/03 15:27:51, kinuko wrote: > lgtm Would be nice to update the CL description.
5 years, 6 months ago (2015-06-03 15:28:21 UTC) #49
sadrul
On 2015/06/03 15:28:21, kinuko wrote: > On 2015/06/03 15:27:51, kinuko wrote: > > lgtm > ...
5 years, 6 months ago (2015-06-03 16:28:04 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1158443008/300001
5 years, 6 months ago (2015-06-06 07:09:28 UTC) #53
commit-bot: I haz the power
Committed patchset #13 (id:300001) as https://src.chromium.org/viewvc/blink?view=rev&revision=196625
5 years, 6 months ago (2015-06-06 08:41:23 UTC) #54
sof
A revert of this CL (patchset #13 id:300001) has been created in https://codereview.chromium.org/1166923003/ by sigbjornf@opera.com. ...
5 years, 6 months ago (2015-06-06 08:55:43 UTC) #55
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1158443008/320001
5 years, 6 months ago (2015-06-06 09:03:00 UTC) #58
commit-bot: I haz the power
Committed patchset #14 (id:320001) as https://src.chromium.org/viewvc/blink?view=rev&revision=196627
5 years, 6 months ago (2015-06-06 10:15:00 UTC) #59
sof
The unit tests added here run into problems Oilpan-wise, http://build.chromium.org/p/chromium.webkit/builders/WebKit%20Linux%20Oilpan%20Leak/builds/10313 but I'm a bit surprised ...
5 years, 6 months ago (2015-06-07 06:17:11 UTC) #61
sof
https://codereview.chromium.org/1158443008/diff/300001/Source/modules/compositorworker/CompositorWorkerManagerTest.cpp File Source/modules/compositorworker/CompositorWorkerManagerTest.cpp (right): https://codereview.chromium.org/1158443008/diff/300001/Source/modules/compositorworker/CompositorWorkerManagerTest.cpp#newcode85 Source/modules/compositorworker/CompositorWorkerManagerTest.cpp:85: WorkerClients::create(), On 2015/06/07 06:17:11, sof wrote: > This is ...
5 years, 6 months ago (2015-06-07 06:28:20 UTC) #62
sof
On 2015/06/07 06:28:20, sof wrote: > https://codereview.chromium.org/1158443008/diff/300001/Source/modules/compositorworker/CompositorWorkerManagerTest.cpp > File Source/modules/compositorworker/CompositorWorkerManagerTest.cpp (right): > > https://codereview.chromium.org/1158443008/diff/300001/Source/modules/compositorworker/CompositorWorkerManagerTest.cpp#newcode85 > ...
5 years, 6 months ago (2015-06-07 20:17:19 UTC) #63
sadrul
This was reverted again in https://codereview.chromium.org/1168073002. I am fixing the failures in content_browsertests with https://codereview.chromium.org/1171853003/. ...
5 years, 6 months ago (2015-06-09 17:20:04 UTC) #64
sof
On 2015/06/09 17:20:04, sadrul wrote: > This was reverted again in https://codereview.chromium.org/1168073002. I am > ...
5 years, 6 months ago (2015-06-09 18:50:16 UTC) #65
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1158443008/340001
5 years, 6 months ago (2015-06-11 11:17:18 UTC) #68
commit-bot: I haz the power
5 years, 6 months ago (2015-06-11 12:29:36 UTC) #69
Message was sent while issue was closed.
Committed patchset #15 (id:340001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=196944

Powered by Google App Engine
This is Rietveld 408576698