Chromium Code Reviews
Help | Chromium Project | Gerrit Changes | Sign in
(34)

Issue 1200833008: Adding freelist statistics to blink gc dump provider. (Closed)

Created:
4 years, 10 months ago by ssid
Modified:
4 years, 8 months ago
CC:
blink-reviews, oilpan-reviews, kouhei+heap_chromium.org, Mads Ager (chromium)
Base URL:
https://chromium.googlesource.com/chromium/blink.git@oilpan_n2
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Adding freelist statistics to blink gc dump provider. This is the third version of the blink gc dump provider. It now dumpsthe freelist statistics of the normal page heap. The snapshot GC rebuilds the freelists, so it makes sense to dump the freelist stats just after the GC. BUG=490087 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=197738

Patch Set 1 #

Patch Set 2 : Nits. #

Total comments: 10

Patch Set 3 : Removing allocation counts and chaning append to +. #

Patch Set 4 : Indexing with 2^i. #

Total comments: 3

Patch Set 5 : Moving freelistSnapshot call after makeConsistentForMutator. #

Total comments: 1

Patch Set 6 : Nits. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+59 lines, -6 lines) Patch
M Source/platform/heap/BlinkGCMemoryDumpProvider.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M Source/platform/heap/Heap.h View 1 2 3 4 5 3 chunks +5 lines, -0 lines 0 comments Download
M Source/platform/heap/Heap.cpp View 1 2 3 4 5 chunks +32 lines, -2 lines 2 comments Download
M Source/platform/heap/ThreadState.h View 1 2 3 4 2 chunks +6 lines, -1 line 0 comments Download
M Source/platform/heap/ThreadState.cpp View 1 2 3 4 3 chunks +14 lines, -3 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 40 (3 generated)
ssid
PTAL.
4 years, 10 months ago (2015-06-23 05:05:42 UTC) #2
haraken
https://codereview.chromium.org/1200833008/diff/20001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/1200833008/diff/20001/Source/platform/heap/Heap.cpp#newcode1143 Source/platform/heap/Heap.cpp:1143: String dumpName = dumpBaseName.isolatedCopy(); Shall we pass in a ...
4 years, 10 months ago (2015-06-23 05:38:59 UTC) #4
ssid
https://codereview.chromium.org/1200833008/diff/20001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/1200833008/diff/20001/Source/platform/heap/Heap.cpp#newcode1143 Source/platform/heap/Heap.cpp:1143: String dumpName = dumpBaseName.isolatedCopy(); On 2015/06/23 05:38:58, haraken wrote: ...
4 years, 10 months ago (2015-06-23 06:03:39 UTC) #5
haraken
https://codereview.chromium.org/1200833008/diff/20001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/1200833008/diff/20001/Source/platform/heap/Heap.cpp#newcode1143 Source/platform/heap/Heap.cpp:1143: String dumpName = dumpBaseName.isolatedCopy(); On 2015/06/23 06:03:39, ssid wrote: ...
4 years, 10 months ago (2015-06-23 06:24:24 UTC) #6
ssid
Made changes. https://codereview.chromium.org/1200833008/diff/20001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/1200833008/diff/20001/Source/platform/heap/Heap.cpp#newcode1143 Source/platform/heap/Heap.cpp:1143: String dumpName = dumpBaseName.isolatedCopy(); On 2015/06/23 06:24:24, ...
4 years, 10 months ago (2015-06-23 07:39:57 UTC) #7
haraken
https://codereview.chromium.org/1200833008/diff/50001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/1200833008/diff/50001/Source/platform/heap/Heap.cpp#newcode1138 Source/platform/heap/Heap.cpp:1138: String dumpName = dumpBaseName + String::format("/buckets/bucket_%lu", static_cast<unsigned long>(1 << ...
4 years, 10 months ago (2015-06-23 08:14:50 UTC) #8
Yuta Kitamura
On 2015/06/23 08:14:50, haraken wrote: > I'm just curious, but where is the String::operator+ defined? ...
4 years, 10 months ago (2015-06-23 08:45:11 UTC) #9
haraken
On 2015/06/23 08:45:11, Yuta Kitamura wrote: > On 2015/06/23 08:14:50, haraken wrote: > > I'm ...
4 years, 10 months ago (2015-06-23 08:54:29 UTC) #10
haraken
LGTM
4 years, 10 months ago (2015-06-23 08:55:34 UTC) #11
Primiano Tucci (use gerrit)
On 2015/06/23 08:55:34, haraken wrote: > LGTM I applied this patch locally, but all the ...
4 years, 10 months ago (2015-06-23 16:45:15 UTC) #12
haraken
https://codereview.chromium.org/1200833008/diff/50001/Source/platform/heap/ThreadState.cpp File Source/platform/heap/ThreadState.cpp (right): https://codereview.chromium.org/1200833008/diff/50001/Source/platform/heap/ThreadState.cpp#newcode966 Source/platform/heap/ThreadState.cpp:966: Sorry, you need to call takeSnapshotOfFreeList here (i.e., after ...
4 years, 10 months ago (2015-06-24 03:46:21 UTC) #13
ssid
I have moved the freelist snapshot call after makeConsistentForMutator. Also added edge between buckets/ and ...
4 years, 10 months ago (2015-06-24 05:45:30 UTC) #14
haraken
Thanks for being persistent on this... I appreciate it! https://codereview.chromium.org/1200833008/diff/70001/Source/platform/heap/ThreadState.cpp File Source/platform/heap/ThreadState.cpp (right): https://codereview.chromium.org/1200833008/diff/70001/Source/platform/heap/ThreadState.cpp#newcode967 Source/platform/heap/ThreadState.cpp:967: ...
4 years, 10 months ago (2015-06-24 05:55:06 UTC) #15
ssid
On 2015/06/24 05:55:06, haraken wrote: > Thanks for being persistent on this... I appreciate it! ...
4 years, 10 months ago (2015-06-24 06:22:17 UTC) #16
haraken
On 2015/06/24 06:22:17, ssid wrote: > On 2015/06/24 05:55:06, haraken wrote: > > Thanks for ...
4 years, 10 months ago (2015-06-24 07:23:44 UTC) #17
Primiano Tucci (use gerrit)
LGTM to get things moving. I still have some doubt as regards as the data ...
4 years, 10 months ago (2015-06-24 08:43:34 UTC) #18
haraken
On 2015/06/24 08:43:34, Primiano Tucci wrote: > LGTM to get things moving. > I still ...
4 years, 10 months ago (2015-06-24 08:51:41 UTC) #19
Primiano Tucci (use gerrit)
> Let's land this. Landing them on trunk makes it easier for us to run ...
4 years, 10 months ago (2015-06-24 09:33:51 UTC) #20
ssid
On 2015/06/24 09:33:51, Primiano Tucci wrote: > > Let's land this. Landing them on trunk ...
4 years, 10 months ago (2015-06-24 09:34:47 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1200833008/90001
4 years, 10 months ago (2015-06-24 12:45:51 UTC) #23
commit-bot: I haz the power
Committed patchset #6 (id:90001) as https://src.chromium.org/viewvc/blink?view=rev&revision=197738
4 years, 10 months ago (2015-06-24 13:42:39 UTC) #24
ssid
On 2015/06/24 08:43:34, Primiano Tucci wrote: > LGTM to get things moving. > I still ...
4 years, 10 months ago (2015-06-24 15:40:12 UTC) #25
haraken
Thanks for being persistent on this! On 2015/06/24 15:40:12, ssid wrote: > On 2015/06/24 08:43:34, ...
4 years, 10 months ago (2015-06-24 23:43:20 UTC) #26
haraken
On 2015/06/24 23:43:20, haraken wrote: > Thanks for being persistent on this! > > On ...
4 years, 10 months ago (2015-06-25 00:49:27 UTC) #27
haraken
https://codereview.chromium.org/1200833008/diff/90001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/1200833008/diff/90001/Source/platform/heap/Heap.cpp#newcode568 Source/platform/heap/Heap.cpp:568: if (m_freeList.takeSnapshot(dumpName) && m_firstUnsweptPage) { What is the '&& ...
4 years, 10 months ago (2015-06-25 00:50:21 UTC) #28
ssid
> Total allocated size = marked + newly allocated <--- expected > Total allocated size ...
4 years, 10 months ago (2015-06-25 02:46:24 UTC) #29
ssid
https://codereview.chromium.org/1200833008/diff/90001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/1200833008/diff/90001/Source/platform/heap/Heap.cpp#newcode568 Source/platform/heap/Heap.cpp:568: if (m_freeList.takeSnapshot(dumpName) && m_firstUnsweptPage) { On 2015/06/25 00:50:21, haraken ...
4 years, 10 months ago (2015-06-25 03:08:07 UTC) #30
ssid
> (1) Heap::collectGarbage(TakeSnapshot) is called on a thread X (in most cases > the main ...
4 years, 10 months ago (2015-06-25 03:30:56 UTC) #31
haraken
On 2015/06/25 03:30:56, ssid wrote: > > (1) Heap::collectGarbage(TakeSnapshot) is called on a thread X ...
4 years, 10 months ago (2015-06-25 03:49:23 UTC) #32
haraken
On 2015/06/25 03:49:23, haraken wrote: > On 2015/06/25 03:30:56, ssid wrote: > > > (1) ...
4 years, 10 months ago (2015-06-25 03:50:41 UTC) #33
haraken
On 2015/06/25 03:08:07, ssid wrote: > https://codereview.chromium.org/1200833008/diff/90001/Source/platform/heap/Heap.cpp > File Source/platform/heap/Heap.cpp (right): > > https://codereview.chromium.org/1200833008/diff/90001/Source/platform/heap/Heap.cpp#newcode568 > ...
4 years, 10 months ago (2015-06-25 03:52:56 UTC) #34
haraken
On 2015/06/25 02:46:24, ssid wrote: > > Total allocated size = marked + newly allocated ...
4 years, 10 months ago (2015-06-25 03:54:54 UTC) #35
ssid
> Freed objects (objects in the committed heap; header->isFree() returns true) are > different from ...
4 years, 10 months ago (2015-06-25 04:14:11 UTC) #36
ssid
> Maybe we should expose an API like Platform::current()->currentThread()->name() > which gives us the name ...
4 years, 10 months ago (2015-06-25 06:36:06 UTC) #37
haraken
Hmm, I cannot reproduce a scenario where freed size becomes larger than the total size. ...
4 years, 10 months ago (2015-06-26 02:34:03 UTC) #38
Primiano Tucci (use gerrit)
On 2015/06/26 02:34:03, haraken wrote: > Hmm, I cannot reproduce a scenario where freed size ...
4 years, 10 months ago (2015-06-26 08:38:01 UTC) #39
Primiano Tucci (use gerrit)
4 years, 10 months ago (2015-06-26 08:42:05 UTC) #40
Message was sent while issue was closed.
On 2015/06/26 08:38:01, Primiano Tucci wrote:
> On 2015/06/26 02:34:03, haraken wrote:
> > Hmm, I cannot reproduce a scenario where freed size becomes larger than the
> > total size. Can you tell me the repro step?

Ok I just had a chat with ssid. This seems to be a problem with the dumper.
There is some double-counting happening.
What happens is that the trace looks as follows
blink_gc
  heaps
    EagerSweep
      buckets        free_size= 10
      pages          free_size= 10

So the actual free_size is 10, but gets reported as 20.
It seems all good in Oilpan. Will fix the dumper on our side. 
Sorry for the noise.

Powered by Google App Engine
This is Rietveld 408576698