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

Issue 1670463002: [Oilpan] Unify memory usage reporters of Oilpan (Closed)

Created:
4 years, 10 months ago by peria
Modified:
4 years, 10 months ago
CC:
Mads Ager (chromium), ajuma+watch-canvas_chromium.org, blink-reviews, blink-reviews-bindings_chromium.org, blink-reviews-dom_chromium.org, blink-reviews-html_chromium.org, blink-reviews-platform-graphics_chromium.org, Rik, chromium-reviews, danakj+watch_chromium.org, dglazkov+blink, dshwang, drott+blinkwatch_chromium.org, krit, eae+blinkwatch, f(malita), jbroman, Justin Novosad, kinuko+watch, kouhei+heap_chromium.org, oilpan-reviews, pdr+graphicswatchlist_chromium.org, rwlbuis, Raymond Toy, Stephen Chennney, sof, vmpstr+blinkwatch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Unify memory usage reporters of Oilpan into ThreadState. Currently Blink reports its memory usages to V8 in several places, and it is very complicated to manage and its coverage is limited. As a result, V8 can fail to trigger GCs even though Blink is consuming a lot of memory and waiting for V8 GCs, and it leads to OOM. This CL removes all individual reports for Oilpan, and makes ThreadState to handle total memory usage of Oilpan on its thread. BUG=584118 Committed: https://crrev.com/62bfa3d4cbdfdfbfd7356e15e34c2aaa0036be74 Cr-Commit-Position: refs/heads/master@{#377273}

Patch Set 1 #

Total comments: 11

Patch Set 2 : Work for some comments #

Patch Set 3 : Watch out only Oilpan heap usages #

Total comments: 4

Patch Set 4 : Remove MemoryUsageProvider #

Patch Set 5 : Clean up #

Total comments: 20

Patch Set 6 : #

Total comments: 5

Patch Set 7 : Drop accessors #

Patch Set 8 : Remove atomic operations #

Total comments: 8

Patch Set 9 : Fix nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+71 lines, -32 lines) Patch
M third_party/WebKit/Source/core/dom/StaticNodeList.h View 1 2 3 4 5 6 7 8 3 chunks +0 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/html/CollectionItemsCache.h View 1 2 3 4 5 6 7 8 4 chunks +0 lines, -12 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/BUILD.gn View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/Heap.cpp View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/HeapPage.cpp View 1 2 3 4 5 6 7 8 11 chunks +13 lines, -12 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/ThreadState.h View 1 2 3 4 5 6 7 8 3 chunks +12 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/ThreadState.cpp View 1 2 3 4 5 6 7 5 chunks +43 lines, -0 lines 0 comments Download

Messages

Total messages: 50 (19 generated)
peria
haraken@ made an experimental change.
4 years, 10 months ago (2016-02-04 07:49:41 UTC) #8
peria
https://codereview.chromium.org/1670463002/diff/1/third_party/WebKit/Source/platform/heap/HeapPage.cpp File third_party/WebKit/Source/platform/heap/HeapPage.cpp (right): https://codereview.chromium.org/1670463002/diff/1/third_party/WebKit/Source/platform/heap/HeapPage.cpp#newcode705 third_party/WebKit/Source/platform/heap/HeapPage.cpp:705: MemoryUsageProvider::instance()->adjustAmountOfAllocatedMemory(); Currently this is the only entry point to ...
4 years, 10 months ago (2016-02-04 08:33:51 UTC) #9
haraken
It looks like this CL does not address all AdjustAmountOfMemory() in the code base; e.g., ...
4 years, 10 months ago (2016-02-04 12:00:29 UTC) #11
haraken
On 2016/02/04 12:00:29, haraken wrote: > It looks like this CL does not address all ...
4 years, 10 months ago (2016-02-05 09:57:31 UTC) #12
jochen (gone - plz use gerrit)
On 2016/02/05 at 09:57:31, haraken wrote: > On 2016/02/04 12:00:29, haraken wrote: > > It ...
4 years, 10 months ago (2016-02-05 14:59:54 UTC) #13
jochen (gone - plz use gerrit)
e.g. in the partitionalloc case where array buffers are shared across threads, we still adjust ...
4 years, 10 months ago (2016-02-05 15:00:35 UTC) #14
haraken
On 2016/02/05 15:00:35, jochen (OOO) wrote: > e.g. in the partitionalloc case where array buffers ...
4 years, 10 months ago (2016-02-05 15:19:29 UTC) #15
jochen (gone - plz use gerrit)
can you point me at a specific example of where this is the case? Usually, ...
4 years, 10 months ago (2016-02-05 15:22:51 UTC) #16
haraken
On 2016/02/05 15:22:51, jochen (OOO) wrote: > can you point me at a specific example ...
4 years, 10 months ago (2016-02-05 15:49:42 UTC) #17
peria
Discussed w/ haraken@ and we decided to report Oilpan memory usage from MemoryUsageProvider and keep ...
4 years, 10 months ago (2016-02-08 08:41:10 UTC) #19
haraken
https://codereview.chromium.org/1670463002/diff/60001/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp File third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp (left): https://codereview.chromium.org/1670463002/diff/60001/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp#oldcode847 third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp:847: v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(externallyAllocatedMemory - m_externallyAllocatedMemory); This AdjustAmountOfMemory is explaining GPU's memory, ...
4 years, 10 months ago (2016-02-08 11:17:20 UTC) #21
peria
https://codereview.chromium.org/1670463002/diff/60001/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp File third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp (left): https://codereview.chromium.org/1670463002/diff/60001/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp#oldcode847 third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp:847: v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(externallyAllocatedMemory - m_externallyAllocatedMemory); On 2016/02/08 11:17:20, haraken wrote: > ...
4 years, 10 months ago (2016-02-09 06:39:59 UTC) #25
Hannes Payer (out of office)
On 2016/02/09 06:39:59, peria wrote: > https://codereview.chromium.org/1670463002/diff/60001/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp > File third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp (left): > > https://codereview.chromium.org/1670463002/diff/60001/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp#oldcode847 > ...
4 years, 10 months ago (2016-02-09 07:56:23 UTC) #26
haraken
On 2016/02/09 07:56:23, Hannes Payer wrote: > On 2016/02/09 06:39:59, peria wrote: > > > ...
4 years, 10 months ago (2016-02-09 08:24:05 UTC) #27
haraken
LGTM if Hannes is fine with this change. https://codereview.chromium.org/1670463002/diff/140001/third_party/WebKit/Source/platform/heap/Heap.cpp File third_party/WebKit/Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/1670463002/diff/140001/third_party/WebKit/Source/platform/heap/Heap.cpp#newcode699 third_party/WebKit/Source/platform/heap/Heap.cpp:699: state->resetHeapSizes(); ...
4 years, 10 months ago (2016-02-12 09:30:54 UTC) #29
Hannes Payer (out of office)
Yes, I think that makes sense. Partitionalloc should use another API call. Jochen, any comments?
4 years, 10 months ago (2016-02-12 10:05:23 UTC) #30
peria
Thank you for your comments, Hannes and Haraken. I'll wait for Jochen's review. https://codereview.chromium.org/1670463002/diff/140001/third_party/WebKit/Source/platform/heap/Heap.cpp File ...
4 years, 10 months ago (2016-02-15 04:16:59 UTC) #31
sof
https://codereview.chromium.org/1670463002/diff/160001/third_party/WebKit/Source/platform/heap/ThreadState.h File third_party/WebKit/Source/platform/heap/ThreadState.h (right): https://codereview.chromium.org/1670463002/diff/160001/third_party/WebKit/Source/platform/heap/ThreadState.h#newcode525 third_party/WebKit/Source/platform/heap/ThreadState.h:525: size_t heapSize(); This declaration appears to be without a ...
4 years, 10 months ago (2016-02-15 20:47:36 UTC) #32
peria
https://codereview.chromium.org/1670463002/diff/160001/third_party/WebKit/Source/platform/heap/ThreadState.h File third_party/WebKit/Source/platform/heap/ThreadState.h (right): https://codereview.chromium.org/1670463002/diff/160001/third_party/WebKit/Source/platform/heap/ThreadState.h#newcode525 third_party/WebKit/Source/platform/heap/ThreadState.h:525: size_t heapSize(); On 2016/02/15 20:47:36, sof wrote: > This ...
4 years, 10 months ago (2016-02-16 03:20:20 UTC) #33
sof
https://codereview.chromium.org/1670463002/diff/160001/third_party/WebKit/Source/platform/heap/ThreadState.h File third_party/WebKit/Source/platform/heap/ThreadState.h (right): https://codereview.chromium.org/1670463002/diff/160001/third_party/WebKit/Source/platform/heap/ThreadState.h#newcode526 third_party/WebKit/Source/platform/heap/ThreadState.h:526: size_t allocatedObjectSize() { return m_allocatedObjectSize; } On 2016/02/16 03:20:20, ...
4 years, 10 months ago (2016-02-16 06:32:56 UTC) #35
peria
On 2016/02/16 06:32:56, sof wrote: > https://codereview.chromium.org/1670463002/diff/160001/third_party/WebKit/Source/platform/heap/ThreadState.h > File third_party/WebKit/Source/platform/heap/ThreadState.h (right): > > https://codereview.chromium.org/1670463002/diff/160001/third_party/WebKit/Source/platform/heap/ThreadState.h#newcode526 > ...
4 years, 10 months ago (2016-02-16 07:00:33 UTC) #36
sof
https://codereview.chromium.org/1670463002/diff/200001/third_party/WebKit/Source/core/dom/StaticNodeList.h File third_party/WebKit/Source/core/dom/StaticNodeList.h (right): https://codereview.chromium.org/1670463002/diff/200001/third_party/WebKit/Source/core/dom/StaticNodeList.h#newcode36 third_party/WebKit/Source/core/dom/StaticNodeList.h:36: #include <v8.h> remove this? https://codereview.chromium.org/1670463002/diff/200001/third_party/WebKit/Source/core/html/CollectionItemsCache.h File third_party/WebKit/Source/core/html/CollectionItemsCache.h (right): https://codereview.chromium.org/1670463002/diff/200001/third_party/WebKit/Source/core/html/CollectionItemsCache.h#newcode37 ...
4 years, 10 months ago (2016-02-16 09:14:38 UTC) #37
peria
https://codereview.chromium.org/1670463002/diff/200001/third_party/WebKit/Source/core/dom/StaticNodeList.h File third_party/WebKit/Source/core/dom/StaticNodeList.h (right): https://codereview.chromium.org/1670463002/diff/200001/third_party/WebKit/Source/core/dom/StaticNodeList.h#newcode36 third_party/WebKit/Source/core/dom/StaticNodeList.h:36: #include <v8.h> On 2016/02/16 09:14:38, sof wrote: > remove ...
4 years, 10 months ago (2016-02-17 02:31:26 UTC) #38
sof
lgtm, good to go.
4 years, 10 months ago (2016-02-17 06:18:06 UTC) #39
jochen (gone - plz use gerrit)
(can somebody please explain to me what the difference between allocated and marked memory in ...
4 years, 10 months ago (2016-02-17 10:32:10 UTC) #40
haraken
On 2016/02/17 10:32:10, jochen (OOO) wrote: > (can somebody please explain to me what the ...
4 years, 10 months ago (2016-02-17 10:48:34 UTC) #41
peria
jochen@ PTAL
4 years, 10 months ago (2016-02-24 10:34:14 UTC) #42
jochen (gone - plz use gerrit)
lgtm
4 years, 10 months ago (2016-02-24 10:48:13 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1670463002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1670463002/220001
4 years, 10 months ago (2016-02-24 10:50:31 UTC) #46
commit-bot: I haz the power
Committed patchset #9 (id:220001)
4 years, 10 months ago (2016-02-24 12:21:05 UTC) #48
commit-bot: I haz the power
4 years, 10 months ago (2016-02-24 12:22:50 UTC) #50
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/62bfa3d4cbdfdfbfd7356e15e34c2aaa0036be74
Cr-Commit-Position: refs/heads/master@{#377273}

Powered by Google App Engine
This is Rietveld 408576698