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

Issue 1174123002: Oilpan: adjust GC policy under memory pressure. (Closed)

Created:
5 years, 6 months ago by sof
Modified:
5 years, 6 months ago
Reviewers:
haraken
CC:
blink-reviews, oilpan-reviews, kouhei+heap_chromium.org, Mads Ager (chromium)
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Oilpan: adjust GC policy under memory pressure. When notified of a v8 major GC, check if we're under memory pressure and overdue an Oilpan GC & urgently. If so, force a conservative GC right away. This addresses dom-modify.html OOM troubles on win32, in particular. It runs into the allocation pattern where the Oilpan allocator is able to handle a tight loop just allocating Text nodes by bump allocating each such node. Each Text node has a large external string allocation however, which leads to a steep ramp-upin overall allocation amounts to the point where it might OOM as no Oilpan GCs will run. v8 will however notice the increasing memory pressure and schedule major GCs of its own. Oilpan is notified after each v8 major GC, so use that opportunity to check for memory pressure & force an Oilpan GC right away. R=haraken BUG=420515 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=196953

Patch Set 1 #

Total comments: 7

Patch Set 2 : shift more GC responsibilities into didV8MajorGC() #

Total comments: 2

Patch Set 3 : rebased #

Total comments: 3

Patch Set 4 : non-oilpan compile fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+87 lines, -61 lines) Patch
M Source/bindings/core/v8/V8GCController.cpp View 1 2 2 chunks +7 lines, -41 lines 0 comments Download
M Source/platform/heap/ThreadState.h View 1 2 2 chunks +8 lines, -2 lines 0 comments Download
M Source/platform/heap/ThreadState.cpp View 1 2 3 5 chunks +72 lines, -18 lines 0 comments Download

Messages

Total messages: 18 (2 generated)
haraken
LGTM It is sad that we're playing around with heuristics, but given that V8 GC ...
5 years, 6 months ago (2015-06-11 04:10:31 UTC) #2
sof
On 2015/06/11 04:10:31, haraken wrote: > LGTM > > It is sad that we're playing ...
5 years, 6 months ago (2015-06-11 06:22:17 UTC) #3
haraken
https://codereview.chromium.org/1174123002/diff/20001/Source/platform/heap/ThreadState.cpp File Source/platform/heap/ThreadState.cpp (right): https://codereview.chromium.org/1174123002/diff/20001/Source/platform/heap/ThreadState.cpp#newcode810 Source/platform/heap/ThreadState.cpp:810: size_t currentObjectSize = Heap::allocatedObjectSize() + Heap::markedObjectSize() + WTF::Partitions::totalSizeOfCommittedPages(); Here ...
5 years, 6 months ago (2015-06-11 08:33:47 UTC) #4
sof
https://codereview.chromium.org/1174123002/diff/1/Source/platform/heap/ThreadState.cpp File Source/platform/heap/ThreadState.cpp (right): https://codereview.chromium.org/1174123002/diff/1/Source/platform/heap/ThreadState.cpp#newcode584 Source/platform/heap/ThreadState.cpp:584: return (currentSize >> 10) > (estimatedSize >> 10) * ...
5 years, 6 months ago (2015-06-11 08:45:02 UTC) #5
sof
https://codereview.chromium.org/1174123002/diff/40001/Source/bindings/core/v8/V8GCController.cpp File Source/bindings/core/v8/V8GCController.cpp (right): https://codereview.chromium.org/1174123002/diff/40001/Source/bindings/core/v8/V8GCController.cpp#newcode412 Source/bindings/core/v8/V8GCController.cpp:412: void V8GCController::majorGCEpilogue(v8::Isolate* isolate) nit: having these separate minor/major methods ...
5 years, 6 months ago (2015-06-11 08:48:20 UTC) #6
haraken
https://codereview.chromium.org/1174123002/diff/40001/Source/platform/heap/ThreadState.cpp File Source/platform/heap/ThreadState.cpp (right): https://codereview.chromium.org/1174123002/diff/40001/Source/platform/heap/ThreadState.cpp#newcode837 Source/platform/heap/ThreadState.cpp:837: completeSweep(); Can we move the completeSweep() into shouldForceMemoryPressureGC()?
5 years, 6 months ago (2015-06-11 08:49:17 UTC) #7
sof
https://codereview.chromium.org/1174123002/diff/40001/Source/platform/heap/ThreadState.cpp File Source/platform/heap/ThreadState.cpp (right): https://codereview.chromium.org/1174123002/diff/40001/Source/platform/heap/ThreadState.cpp#newcode837 Source/platform/heap/ThreadState.cpp:837: completeSweep(); On 2015/06/11 08:49:17, haraken wrote: > > Can ...
5 years, 6 months ago (2015-06-11 08:56:14 UTC) #8
haraken
On 2015/06/11 08:56:14, sof wrote: > https://codereview.chromium.org/1174123002/diff/40001/Source/platform/heap/ThreadState.cpp > File Source/platform/heap/ThreadState.cpp (right): > > https://codereview.chromium.org/1174123002/diff/40001/Source/platform/heap/ThreadState.cpp#newcode837 > ...
5 years, 6 months ago (2015-06-11 09:36:24 UTC) #9
sof
On 2015/06/11 09:36:24, haraken wrote: > On 2015/06/11 08:56:14, sof wrote: > > > https://codereview.chromium.org/1174123002/diff/40001/Source/platform/heap/ThreadState.cpp ...
5 years, 6 months ago (2015-06-11 09:43:59 UTC) #10
sof
Evaluating performance next (in the background, need to focus elsewhere for the rest of the ...
5 years, 6 months ago (2015-06-11 09:56:29 UTC) #11
haraken
On 2015/06/11 09:43:59, sof wrote: > On 2015/06/11 09:36:24, haraken wrote: > > On 2015/06/11 ...
5 years, 6 months ago (2015-06-11 10:25:41 UTC) #12
haraken
Either way, LGTM.
5 years, 6 months ago (2015-06-11 10:26:17 UTC) #13
sof
The blink_perf results for Oilpan trunk vs this CL, https://docs.google.com/spreadsheets/d/1uTBkuGVSpvBrveK58D7ZJkXcOiYQrsLCqe504VE_jY0/edit?usp=sharing shows up no regressions. dromaeo.domcoremodify ...
5 years, 6 months ago (2015-06-11 15:01:56 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1174123002/60001
5 years, 6 months ago (2015-06-11 15:02:59 UTC) #16
commit-bot: I haz the power
Committed patchset #4 (id:60001) as https://src.chromium.org/viewvc/blink?view=rev&revision=196953
5 years, 6 months ago (2015-06-11 15:06:24 UTC) #17
sof
5 years, 6 months ago (2015-06-15 14:29:42 UTC) #18
Message was sent while issue was closed.
A revert of this CL (patchset #4 id:60001) has been created in
https://codereview.chromium.org/1191483002/ by sigbjornf@opera.com.

The reason for reverting is: Plausible candidate for regressing v8 GC totals on
v8.top_25_smooth somewhat,

 https://code.google.com/p/chromium/issues/detail?id=499822.

Powered by Google App Engine
This is Rietveld 408576698