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

Issue 1211573006: Oilpan: Count # of collected Persistent handles and use it to estimate the live object size (Closed)

Created:
5 years, 6 months ago by haraken
Modified:
5 years, 5 months ago
CC:
blink-reviews, arv+blink, oilpan-reviews, Mads Ager (chromium), vivekg_samsung, vivekg, blink-reviews-bindings_chromium.org, kouhei+heap_chromium.org
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Oilpan: Count # of collected Persistent handles and use it to estimate live object size Currently the estimation of the live object size is broken in many ways. This CL makes the estimation more reasonable. The basic idea is as follows: 1) We keep track of the number of allocated and deallocated persistent handles. 2) When completeSweep() is finished, we estimate the heap size per existing persistent handle. The estimated value is recorded in |heapSizePerPersistent|. Also, we record |allocatedObjectSize| + |markedObjectSize| + |PartitionAlloc::commitedSize| into |liveObjectSizeAtLastSweep|. 3) When scheduleGCIfNeeded() is called, we estimate the live object size with the following formula: Estimated live object size = |liveObjectSizeAtLastSweep| - (# of persistent handles that have deallocated since last collectGarbage()) * |heapSizePerPersistent| BUG=474470 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=198821

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Total comments: 17

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+117 lines, -30 lines) Patch
M Source/bindings/core/v8/WrapperTypeInfo.h View 1 1 chunk +14 lines, -0 lines 0 comments Download
M Source/platform/heap/BlinkGCMemoryDumpProvider.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/platform/heap/Handle.h View 1 4 chunks +4 lines, -0 lines 0 comments Download
M Source/platform/heap/Heap.h View 1 2 3 4 5 2 chunks +15 lines, -5 lines 0 comments Download
M Source/platform/heap/Heap.cpp View 1 2 3 4 5 6 5 chunks +26 lines, -8 lines 0 comments Download
M Source/platform/heap/ThreadState.h View 1 2 3 4 5 3 chunks +17 lines, -1 line 0 comments Download
M Source/platform/heap/ThreadState.cpp View 1 2 3 4 5 6 7 8 chunks +40 lines, -15 lines 0 comments Download

Messages

Total messages: 19 (4 generated)
haraken
5 years, 6 months ago (2015-06-25 02:42:21 UTC) #2
haraken
I begin to think that it would make more sense to count # of collected ...
5 years, 6 months ago (2015-06-25 02:46:48 UTC) #3
haraken
yutak@: keishi@ and I realized that it's hard to tune precise GCs at page navigations ...
5 years, 5 months ago (2015-07-09 07:27:10 UTC) #4
haraken
As far as I run a couple of benchmarks where the GC frequency matters, I ...
5 years, 5 months ago (2015-07-09 07:47:18 UTC) #5
haraken
On 2015/07/09 07:47:18, haraken wrote: > As far as I run a couple of benchmarks ...
5 years, 5 months ago (2015-07-10 04:35:06 UTC) #6
Yuta Kitamura
I'm generally OK with this patch, but read the last comment especially. https://codereview.chromium.org/1211573006/diff/80001/Source/platform/heap/BlinkGCMemoryDumpProvider.cpp File Source/platform/heap/BlinkGCMemoryDumpProvider.cpp ...
5 years, 5 months ago (2015-07-13 06:38:03 UTC) #7
Yuta Kitamura
Also: your change description seems to deviate from the actual patch. heapSizePerPersistent is recorded after ...
5 years, 5 months ago (2015-07-13 06:47:16 UTC) #8
sof
https://codereview.chromium.org/1211573006/diff/80001/Source/platform/heap/Handle.h File Source/platform/heap/Handle.h (right): https://codereview.chromium.org/1211573006/diff/80001/Source/platform/heap/Handle.h#newcode215 Source/platform/heap/Handle.h:215: state->persistentAllocated(); What about cross-thread persistents?
5 years, 5 months ago (2015-07-13 07:07:46 UTC) #10
haraken
Thanks for the careful review! https://codereview.chromium.org/1211573006/diff/80001/Source/platform/heap/BlinkGCMemoryDumpProvider.cpp File Source/platform/heap/BlinkGCMemoryDumpProvider.cpp (right): https://codereview.chromium.org/1211573006/diff/80001/Source/platform/heap/BlinkGCMemoryDumpProvider.cpp#newcode37 Source/platform/heap/BlinkGCMemoryDumpProvider.cpp:37: objectsDump->AddScalar("estimated_live_object_size", "bytes", Heap::liveObjectSizeAtLastSweep()); On ...
5 years, 5 months ago (2015-07-13 08:46:25 UTC) #11
haraken
BTW, the V8 team is going to make a change where derefObject()s don't get called ...
5 years, 5 months ago (2015-07-13 08:54:58 UTC) #12
Yuta Kitamura
LGTM https://codereview.chromium.org/1211573006/diff/80001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/1211573006/diff/80001/Source/platform/heap/Heap.cpp#newcode1930 Source/platform/heap/Heap.cpp:1930: s_heapSizePerPersistent = 1024 * 1024; On 2015/07/13 08:46:25, ...
5 years, 5 months ago (2015-07-13 09:03:49 UTC) #13
haraken
https://codereview.chromium.org/1211573006/diff/80001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/1211573006/diff/80001/Source/platform/heap/Heap.cpp#newcode1930 Source/platform/heap/Heap.cpp:1930: s_heapSizePerPersistent = 1024 * 1024; On 2015/07/13 09:03:49, Yuta ...
5 years, 5 months ago (2015-07-13 09:07:38 UTC) #14
haraken
No substantial regression or improvement is observed in blink_perf (I manually verified that >5% regressing ...
5 years, 5 months ago (2015-07-13 23:28:59 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1211573006/140001
5 years, 5 months ago (2015-07-13 23:29:25 UTC) #18
commit-bot: I haz the power
5 years, 5 months ago (2015-07-14 00:58:12 UTC) #19
Message was sent while issue was closed.
Committed patchset #8 (id:140001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=198821

Powered by Google App Engine
This is Rietveld 408576698