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

Issue 1063083002: Oilpan: Consider PartitionAlloc's memory usage when triggering a GC (Closed)

Created:
5 years, 8 months ago by haraken
Modified:
5 years, 8 months ago
CC:
blink-reviews, oilpan-reviews, Mads Ager (chromium), eae+blinkwatch, blink-reviews-dom_chromium.org, dglazkov+blink, kouhei+heap_chromium.org, rwlbuis, Hannes Payer (out of office), ulan
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Oilpan: Consider PartitionAlloc's memory usage when triggering a GC Oilpan builds sometimes increase peak memory usage because it does not understand the amount of memory used in embedders (e.g., PartitionAlloc) and thus fails in triggering a GC. This CL fixes the issue by taking into account PartitionAlloc's memory usage when triggering an Oilpan's GC. See this design document (https://docs.google.com/document/d/1QMDr1YDEXdvZXoOC7RuHH6VRU7ot3SpArPlHokoBVPw/edit) for more details. BUG=474470 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=194282

Patch Set 1 #

Patch Set 2 : #

Total comments: 3

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -132 lines) Patch
M Source/core/dom/Text.cpp View 1 2 2 chunks +0 lines, -38 lines 0 comments Download
M Source/platform/heap/Heap.h View 1 2 3 chunks +2 lines, -41 lines 0 comments Download
M Source/platform/heap/Heap.cpp View 1 2 2 chunks +2 lines, -22 lines 0 comments Download
M Source/platform/heap/ThreadState.cpp View 1 2 3 4 5 chunks +35 lines, -31 lines 1 comment Download

Messages

Total messages: 44 (4 generated)
haraken
I verified that GCs are properly triggered in textarea-dom.html. I'll collect full performance numbers of ...
5 years, 8 months ago (2015-04-07 12:47:44 UTC) #2
sof
Isn't this the CL&approach that was considered ~ a month ago, and decided against as ...
5 years, 8 months ago (2015-04-07 18:20:31 UTC) #3
haraken
On 2015/04/07 18:20:31, sof wrote: > Isn't this the CL&approach that was considered ~ a ...
5 years, 8 months ago (2015-04-08 00:30:46 UTC) #4
sof
https://codereview.chromium.org/1063083002/diff/20001/Source/platform/heap/ThreadState.cpp File Source/platform/heap/ThreadState.cpp (right): https://codereview.chromium.org/1063083002/diff/20001/Source/platform/heap/ThreadState.cpp#newcode863 Source/platform/heap/ThreadState.cpp:863: Heap::setEstimatedLiveObjectSize(Heap::markedObjectSize() + Heap::externalObjectSizeAtLastGC()); Hmm, this feels like arbitrary measures ...
5 years, 8 months ago (2015-04-10 07:21:09 UTC) #5
haraken
On 2015/04/10 07:21:09, sof wrote: > https://codereview.chromium.org/1063083002/diff/20001/Source/platform/heap/ThreadState.cpp > File Source/platform/heap/ThreadState.cpp (right): > > https://codereview.chromium.org/1063083002/diff/20001/Source/platform/heap/ThreadState.cpp#newcode863 > ...
5 years, 8 months ago (2015-04-10 07:45:32 UTC) #6
haraken
This is a performance result: https://docs.google.com/spreadsheets/d/1qFZ5gca9okdtI1ndhw-v-tbU6sU9gmjY35fIl0olDhE/edit#gid=1126715928 It's sad that the result is flaky (again)... I ...
5 years, 8 months ago (2015-04-13 06:06:02 UTC) #7
sof
On 2015/04/13 06:06:02, haraken wrote: > This is a performance result: > https://docs.google.com/spreadsheets/d/1qFZ5gca9okdtI1ndhw-v-tbU6sU9gmjY35fIl0olDhE/edit#gid=1126715928 > > ...
5 years, 8 months ago (2015-04-13 13:16:21 UTC) #8
haraken
On 2015/04/13 13:16:21, sof wrote: > On 2015/04/13 06:06:02, haraken wrote: > > This is ...
5 years, 8 months ago (2015-04-13 14:10:02 UTC) #9
sof
https://codereview.chromium.org/1063083002/diff/20001/Source/platform/heap/ThreadState.cpp File Source/platform/heap/ThreadState.cpp (left): https://codereview.chromium.org/1063083002/diff/20001/Source/platform/heap/ThreadState.cpp#oldcode559 Source/platform/heap/ThreadState.cpp:559: if (Heap::markedObjectSize() + allocatedObjectSize >= 300 * 1024 * ...
5 years, 8 months ago (2015-04-14 20:13:19 UTC) #10
Daniel Bratell
I don't know the code well enough to determine the effect of this but as ...
5 years, 8 months ago (2015-04-16 08:58:45 UTC) #12
Hannes Payer (out of office)
Considering both spaces as one space is fine from a heuristics perspective. However, there is ...
5 years, 8 months ago (2015-04-17 13:47:07 UTC) #14
haraken
On 2015/04/17 13:47:07, Hannes Payer wrote: > Considering both spaces as one space is fine ...
5 years, 8 months ago (2015-04-18 23:28:59 UTC) #15
haraken
On 2015/04/14 20:13:19, sof wrote: > https://codereview.chromium.org/1063083002/diff/20001/Source/platform/heap/ThreadState.cpp > File Source/platform/heap/ThreadState.cpp (left): > > https://codereview.chromium.org/1063083002/diff/20001/Source/platform/heap/ThreadState.cpp#oldcode559 > ...
5 years, 8 months ago (2015-04-19 01:02:53 UTC) #16
haraken
On 2015/04/19 01:02:53, haraken wrote: > On 2015/04/14 20:13:19, sof wrote: > > > https://codereview.chromium.org/1063083002/diff/20001/Source/platform/heap/ThreadState.cpp ...
5 years, 8 months ago (2015-04-19 08:36:10 UTC) #17
sof
On 2015/04/19 08:36:10, haraken wrote: > On 2015/04/19 01:02:53, haraken wrote: > > On 2015/04/14 ...
5 years, 8 months ago (2015-04-19 16:57:12 UTC) #18
Hannes Payer (out of office)
I would assume that the OOM comes from the fact that Oilpan grows the heap ...
5 years, 8 months ago (2015-04-19 23:43:03 UTC) #19
haraken
On 2015/04/19 23:43:03, Hannes Payer wrote: > I would assume that the OOM comes from ...
5 years, 8 months ago (2015-04-20 12:31:04 UTC) #20
sof
On 2015/04/20 12:31:04, haraken wrote: > On 2015/04/19 23:43:03, Hannes Payer wrote: > > I ...
5 years, 8 months ago (2015-04-20 13:02:03 UTC) #21
haraken
On 2015/04/20 13:02:03, sof wrote: > On 2015/04/20 12:31:04, haraken wrote: > > On 2015/04/19 ...
5 years, 8 months ago (2015-04-20 13:47:12 UTC) #22
sof
On 2015/04/20 13:47:12, haraken wrote: > On 2015/04/20 13:02:03, sof wrote: > > On 2015/04/20 ...
5 years, 8 months ago (2015-04-20 14:02:18 UTC) #23
haraken
On 2015/04/20 13:02:03, sof wrote: > On 2015/04/20 12:31:04, haraken wrote: > > On 2015/04/19 ...
5 years, 8 months ago (2015-04-20 14:13:52 UTC) #24
sof
On 2015/04/20 14:13:52, haraken wrote: > On 2015/04/20 13:02:03, sof wrote: > > On 2015/04/20 ...
5 years, 8 months ago (2015-04-20 14:35:45 UTC) #25
haraken
On 2015/04/20 14:35:45, sof wrote: > On 2015/04/20 14:13:52, haraken wrote: > > On 2015/04/20 ...
5 years, 8 months ago (2015-04-20 14:42:05 UTC) #26
sof
On 2015/04/20 14:42:05, haraken wrote: > On 2015/04/20 14:35:45, sof wrote: > > On 2015/04/20 ...
5 years, 8 months ago (2015-04-20 15:11:53 UTC) #27
haraken
On 2015/04/20 15:11:53, sof wrote: > On 2015/04/20 14:42:05, haraken wrote: > > On 2015/04/20 ...
5 years, 8 months ago (2015-04-20 16:02:22 UTC) #28
sof
On 2015/04/20 16:02:22, haraken wrote: > On 2015/04/20 15:11:53, sof wrote: > > On 2015/04/20 ...
5 years, 8 months ago (2015-04-21 12:39:17 UTC) #29
haraken
On 2015/04/21 12:39:17, sof wrote: > On 2015/04/20 16:02:22, haraken wrote: > > On 2015/04/20 ...
5 years, 8 months ago (2015-04-22 12:59:23 UTC) #30
haraken
On 2015/04/22 12:59:23, haraken wrote: > On 2015/04/21 12:39:17, sof wrote: > > On 2015/04/20 ...
5 years, 8 months ago (2015-04-22 13:16:59 UTC) #31
sof
lgtm. I'll verify win32 status tomorrow morning.
5 years, 8 months ago (2015-04-22 21:39:48 UTC) #32
sof
On 2015/04/22 21:39:48, sof wrote: > lgtm. > > I'll verify win32 status tomorrow morning. ...
5 years, 8 months ago (2015-04-23 07:51:26 UTC) #33
sof
On 2015/04/23 07:51:26, sof wrote: > On 2015/04/22 21:39:48, sof wrote: > > lgtm. > ...
5 years, 8 months ago (2015-04-23 08:26:43 UTC) #34
haraken
On 2015/04/23 08:26:43, sof wrote: > On 2015/04/23 07:51:26, sof wrote: > > On 2015/04/22 ...
5 years, 8 months ago (2015-04-23 08:27:27 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1063083002/80001
5 years, 8 months ago (2015-04-23 08:28:08 UTC) #37
Hannes Payer (out of office)
Factor 2, cool. How far can you push it down without regressing performance? Something below ...
5 years, 8 months ago (2015-04-23 08:35:32 UTC) #38
sof
On 2015/04/23 08:35:32, Hannes Payer wrote: > Factor 2, cool. How far can you push ...
5 years, 8 months ago (2015-04-23 08:39:38 UTC) #39
haraken
According to Sigbjorn's results, it seems that win32 hits OOM when currentObjectSize (which takes PartitionAlloc's ...
5 years, 8 months ago (2015-04-23 10:40:39 UTC) #40
commit-bot: I haz the power
Committed patchset #5 (id:80001) as https://src.chromium.org/viewvc/blink?view=rev&revision=194282
5 years, 8 months ago (2015-04-23 11:24:59 UTC) #41
sof
https://codereview.chromium.org/1063083002/diff/80001/Source/platform/heap/ThreadState.cpp File Source/platform/heap/ThreadState.cpp (right): https://codereview.chromium.org/1063083002/diff/80001/Source/platform/heap/ThreadState.cpp#newcode521 Source/platform/heap/ThreadState.cpp:521: return currentObjectSize >= 1024 * 1024 && currentObjectSize > ...
5 years, 8 months ago (2015-04-23 15:20:33 UTC) #42
haraken
On 2015/04/23 15:20:33, sof wrote: > https://codereview.chromium.org/1063083002/diff/80001/Source/platform/heap/ThreadState.cpp > File Source/platform/heap/ThreadState.cpp (right): > > https://codereview.chromium.org/1063083002/diff/80001/Source/platform/heap/ThreadState.cpp#newcode521 > ...
5 years, 8 months ago (2015-04-23 15:27:44 UTC) #43
sof
5 years, 8 months ago (2015-04-23 15:59:08 UTC) #44
Message was sent while issue was closed.
On 2015/04/23 15:27:44, haraken wrote:
> On 2015/04/23 15:20:33, sof wrote:
> >
>
https://codereview.chromium.org/1063083002/diff/80001/Source/platform/heap/Th...
> > File Source/platform/heap/ThreadState.cpp (right):
> > 
> >
>
https://codereview.chromium.org/1063083002/diff/80001/Source/platform/heap/Th...
> > Source/platform/heap/ThreadState.cpp:521: return currentObjectSize >= 1024 *
> > 1024 && currentObjectSize > estimatedLiveObjectSize * 3 / 2;
> > Re: (currentObjectSize >= 1024 * 1024) -- wouldn't this always be true since
> > PA's allocations are included?
> > 
> > And if so, wouldn't it schedule an idle GC without having allocated anything
> on
> > the heap (as estimatedLiveObjectSize is 0)?
> 
> Thanks for digging into this.
> 
> A fix would be to set some proper initial value on estimatedLiveObjectSize?

May I suggest having the LHS of (&&) use allocatedObjectSize instead (like
before)?

Powered by Google App Engine
This is Rietveld 408576698