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

Issue 2627953005: Make workers inherit the large heap limit of the main isolate. (Closed)

Created:
3 years, 11 months ago by ulan
Modified:
3 years, 11 months ago
CC:
blink-reviews, blink-reviews-bindings_chromium.org, blink-worker-reviews_chromium.org, chromium-reviews, falken+watch_chromium.org, horo+watch_chromium.org, jsbell+serviceworker_chromium.org, kinuko+watch, kinuko+worker_chromium.org, kinuko+serviceworker, michaeln, nhiroki, serviceworker-reviews, shimazu+worker_chromium.org, shimazu+serviceworker_chromium.org, tzik
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make workers inherit the large heap limit of the main isolate. This is mainly needed for DevTools, where the main isolate runs with an increased heap limit. Workers spawned by DevTools should also run with increased heap limits, otherwise they will OOM while inspecting large heaps. This patch replaces the V8CacheOptions field of WorkerThreadStartupData with more generic WorkerV8Settings and propagates the heap limit state from the main isolate to worker isolates. BUG=675911 Review-Url: https://codereview.chromium.org/2627953005 Cr-Commit-Position: refs/heads/master@{#443619} Committed: https://chromium.googlesource.com/chromium/src/+/843960f748b26fbd707e1bf6e3a3f51bc201db6a

Patch Set 1 #

Total comments: 11

Patch Set 2 : Address comments #

Patch Set 3 : hide WorkerV8Settings constructor #

Patch Set 4 : clean up #

Total comments: 4

Patch Set 5 : make struct #

Total comments: 6

Patch Set 6 : fix cc year and turn the flag into enum #

Patch Set 7 : fix tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+65 lines, -20 lines) Patch
M third_party/WebKit/Source/bindings/bindings.gni View 1 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/Source/bindings/core/v8/WorkerV8Settings.h View 1 2 3 4 5 1 chunk +26 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/workers/DedicatedWorkerTest.cpp View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp View 1 2 3 4 5 1 chunk +6 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/workers/ThreadedWorkletMessagingProxy.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/workers/ThreadedWorkletTest.cpp View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/workers/WorkerThread.cpp View 1 2 3 4 5 2 chunks +9 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/workers/WorkerThreadStartupData.h View 4 chunks +5 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/workers/WorkerThreadStartupData.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/workers/WorkerThreadTest.cpp View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/workers/WorkerThreadTestHelper.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/compositorworker/AnimationWorkletThreadTest.cpp View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThreadTest.cpp View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/webaudio/AudioWorkletThreadTest.cpp View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp View 2 chunks +5 lines, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp View 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 30 (14 generated)
ulan
PTAL. This indirectly depends on https://codereview.chromium.org/2630453004/ https://codereview.chromium.org/2627953005/diff/1/third_party/WebKit/Source/core/workers/InProcessWorkerBase.cpp File third_party/WebKit/Source/core/workers/InProcessWorkerBase.cpp (right): https://codereview.chromium.org/2627953005/diff/1/third_party/WebKit/Source/core/workers/InProcessWorkerBase.cpp#newcode54 third_party/WebKit/Source/core/workers/InProcessWorkerBase.cpp:54: exceptionState.isolate()->IsHeapLimitIncreasedForDebugging(); I don't ...
3 years, 11 months ago (2017-01-12 22:48:25 UTC) #6
haraken
https://codereview.chromium.org/2627953005/diff/1/third_party/WebKit/Source/core/workers/InProcessWorkerBase.cpp File third_party/WebKit/Source/core/workers/InProcessWorkerBase.cpp (right): https://codereview.chromium.org/2627953005/diff/1/third_party/WebKit/Source/core/workers/InProcessWorkerBase.cpp#newcode54 third_party/WebKit/Source/core/workers/InProcessWorkerBase.cpp:54: exceptionState.isolate()->IsHeapLimitIncreasedForDebugging(); On 2017/01/12 22:48:25, ulan wrote: > I don't ...
3 years, 11 months ago (2017-01-13 03:54:07 UTC) #10
nhiroki
https://codereview.chromium.org/2627953005/diff/1/third_party/WebKit/Source/core/workers/InProcessWorkerBase.h File third_party/WebKit/Source/core/workers/InProcessWorkerBase.h (right): https://codereview.chromium.org/2627953005/diff/1/third_party/WebKit/Source/core/workers/InProcessWorkerBase.h#newcode73 third_party/WebKit/Source/core/workers/InProcessWorkerBase.h:73: WorkerV8Settings m_workerV8Settings; On 2017/01/13 03:54:06, haraken wrote: > > ...
3 years, 11 months ago (2017-01-13 04:21:36 UTC) #11
alph
On 2017/01/13 04:21:36, nhiroki wrote: > https://codereview.chromium.org/2627953005/diff/1/third_party/WebKit/Source/core/workers/InProcessWorkerBase.h > File third_party/WebKit/Source/core/workers/InProcessWorkerBase.h (right): > > https://codereview.chromium.org/2627953005/diff/1/third_party/WebKit/Source/core/workers/InProcessWorkerBase.h#newcode73 > ...
3 years, 11 months ago (2017-01-13 04:42:26 UTC) #12
jochen (gone - plz use gerrit)
i agree that we should put the config on WorkerGlobalScope or WorkerThread while devtools only ...
3 years, 11 months ago (2017-01-13 08:45:11 UTC) #13
ulan
Thanks all for the comments! I went with nhiroki's suggestion. Now WorkerV8Settings is initialized at ...
3 years, 11 months ago (2017-01-13 13:51:20 UTC) #14
jochen (gone - plz use gerrit)
https://codereview.chromium.org/2627953005/diff/60001/third_party/WebKit/Source/bindings/core/v8/WorkerV8Settings.h File third_party/WebKit/Source/bindings/core/v8/WorkerV8Settings.h (right): https://codereview.chromium.org/2627953005/diff/60001/third_party/WebKit/Source/bindings/core/v8/WorkerV8Settings.h#newcode15 third_party/WebKit/Source/bindings/core/v8/WorkerV8Settings.h:15: public: WTF_MAKE_NONCOPIABLE() https://codereview.chromium.org/2627953005/diff/60001/third_party/WebKit/Source/bindings/core/v8/WorkerV8Settings.h#newcode17 third_party/WebKit/Source/bindings/core/v8/WorkerV8Settings.h:17: bool m_heapLimitIncreasedForDebugging; can you move ...
3 years, 11 months ago (2017-01-13 14:11:44 UTC) #15
ulan
https://codereview.chromium.org/2627953005/diff/60001/third_party/WebKit/Source/bindings/core/v8/WorkerV8Settings.h File third_party/WebKit/Source/bindings/core/v8/WorkerV8Settings.h (right): https://codereview.chromium.org/2627953005/diff/60001/third_party/WebKit/Source/bindings/core/v8/WorkerV8Settings.h#newcode15 third_party/WebKit/Source/bindings/core/v8/WorkerV8Settings.h:15: public: On 2017/01/13 14:11:44, jochen wrote: > WTF_MAKE_NONCOPIABLE() Made ...
3 years, 11 months ago (2017-01-13 14:33:59 UTC) #16
haraken
https://codereview.chromium.org/2627953005/diff/80001/third_party/WebKit/Source/bindings/core/v8/WorkerV8Settings.h File third_party/WebKit/Source/bindings/core/v8/WorkerV8Settings.h (right): https://codereview.chromium.org/2627953005/diff/80001/third_party/WebKit/Source/bindings/core/v8/WorkerV8Settings.h#newcode1 third_party/WebKit/Source/bindings/core/v8/WorkerV8Settings.h:1: // Copyright 2016 The Chromium Authors. All rights reserved. ...
3 years, 11 months ago (2017-01-13 14:43:32 UTC) #17
ulan
https://codereview.chromium.org/2627953005/diff/80001/third_party/WebKit/Source/bindings/core/v8/WorkerV8Settings.h File third_party/WebKit/Source/bindings/core/v8/WorkerV8Settings.h (right): https://codereview.chromium.org/2627953005/diff/80001/third_party/WebKit/Source/bindings/core/v8/WorkerV8Settings.h#newcode1 third_party/WebKit/Source/bindings/core/v8/WorkerV8Settings.h:1: // Copyright 2016 The Chromium Authors. All rights reserved. ...
3 years, 11 months ago (2017-01-13 15:02:56 UTC) #18
haraken
LGTM % merging WorkerSettings and WorkerV8Settings in a follow-up.
3 years, 11 months ago (2017-01-13 15:40:11 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2627953005/100001
3 years, 11 months ago (2017-01-13 15:44:00 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_compile_dbg_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_compile_dbg_ng/builds/221830) linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, ...
3 years, 11 months ago (2017-01-13 16:02:24 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2627953005/120001
3 years, 11 months ago (2017-01-13 16:24:29 UTC) #26
commit-bot: I haz the power
Committed patchset #7 (id:120001) as https://chromium.googlesource.com/chromium/src/+/843960f748b26fbd707e1bf6e3a3f51bc201db6a
3 years, 11 months ago (2017-01-13 18:30:00 UTC) #29
nhiroki
3 years, 11 months ago (2017-01-18 07:00:39 UTC) #30
Message was sent while issue was closed.
lgtm

Powered by Google App Engine
This is Rietveld 408576698