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

Issue 1159773004: Oilpan: Implement a GC to take a heap snapshot (Closed)

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

Description

Oilpan: Implement a GC to take a heap snapshot This CL implements Heap::collectGarbage(gcType = TakeSnapshot), which is intended to be used to take a heap snapshot when onMemoryDump is requested etc. The GC is expected to be as side-effect-free as possible. Thus the GC behaves as follows: 1) Run a marking task. 2) Take a heap snapshot (The actual implementation will come in a follow-up CL). 3) Clear all marks on marked objects. No sweeping task runs. More contexts: https://codereview.chromium.org/1149673002/ https://groups.google.com/a/chromium.org/d/topic/oilpan-reviews/6LhByzmVt6Q/discussion BUG=490087 TEST=HeapTest.ThreadedWeakness Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=195982 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=196059 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=196643

Patch Set 1 #

Patch Set 2 : #

Total comments: 2

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Total comments: 2

Patch Set 8 : #

Total comments: 1

Patch Set 9 : #

Patch Set 10 : #

Patch Set 11 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+163 lines, -21 lines) Patch
M Source/platform/heap/Heap.h View 1 2 3 4 5 6 7 8 4 chunks +4 lines, -0 lines 0 comments Download
M Source/platform/heap/Heap.cpp View 1 2 3 4 5 6 7 8 12 chunks +93 lines, -16 lines 0 comments Download
M Source/platform/heap/HeapTest.cpp View 1 2 3 4 5 6 7 8 3 chunks +5 lines, -1 line 0 comments Download
M Source/platform/heap/MarkingVisitorImpl.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +6 lines, -0 lines 0 comments Download
M Source/platform/heap/ThreadState.h View 1 2 3 4 5 6 7 8 3 chunks +18 lines, -3 lines 0 comments Download
M Source/platform/heap/ThreadState.cpp View 1 2 3 4 5 6 7 8 3 chunks +28 lines, -1 line 0 comments Download
M Source/platform/heap/Visitor.h View 1 2 3 4 5 6 7 8 1 chunk +9 lines, -0 lines 0 comments Download

Messages

Total messages: 55 (11 generated)
haraken
PTAL
5 years, 7 months ago (2015-05-27 08:15:06 UTC) #2
keishi
LGTM
5 years, 7 months ago (2015-05-27 08:45:55 UTC) #3
Primiano Tucci (use gerrit)
On 2015/05/27 08:15:06, haraken wrote: > PTAL So, let me see if I get the ...
5 years, 7 months ago (2015-05-27 08:56:41 UTC) #4
haraken
Thanks for review. In the patch set 1, I implemented the snapshot GC so that ...
5 years, 7 months ago (2015-05-27 09:21:28 UTC) #5
Primiano Tucci (use gerrit)
> Mostly. Heap::collectGarbage(TakeSnapshot) (not ThreadState::takeSnapshot()) Yeah sorry I meant Heap... > the guy that stops ...
5 years, 7 months ago (2015-05-27 09:44:38 UTC) #6
haraken
On 2015/05/27 09:44:38, Primiano Tucci wrote: > > Mostly. Heap::collectGarbage(TakeSnapshot) (not ThreadState::takeSnapshot()) > Yeah sorry ...
5 years, 7 months ago (2015-05-27 10:28:21 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1159773004/20001
5 years, 7 months ago (2015-05-27 10:28:54 UTC) #10
ssid
Sorry couldn't get to this earlier. https://codereview.chromium.org/1159773004/diff/20001/Source/platform/heap/ThreadState.cpp File Source/platform/heap/ThreadState.cpp (right): https://codereview.chromium.org/1159773004/diff/20001/Source/platform/heap/ThreadState.cpp#newcode889 Source/platform/heap/ThreadState.cpp:889: takeSnapshot(); Sorry, I ...
5 years, 7 months ago (2015-05-27 12:43:47 UTC) #11
haraken
https://codereview.chromium.org/1159773004/diff/20001/Source/platform/heap/ThreadState.cpp File Source/platform/heap/ThreadState.cpp (right): https://codereview.chromium.org/1159773004/diff/20001/Source/platform/heap/ThreadState.cpp#newcode889 Source/platform/heap/ThreadState.cpp:889: takeSnapshot(); On 2015/05/27 12:43:47, ssid wrote: > Sorry, I ...
5 years, 7 months ago (2015-05-27 13:48:11 UTC) #12
ssid
On 2015/05/27 13:48:11, haraken wrote: > https://codereview.chromium.org/1159773004/diff/20001/Source/platform/heap/ThreadState.cpp > File Source/platform/heap/ThreadState.cpp (right): > > https://codereview.chromium.org/1159773004/diff/20001/Source/platform/heap/ThreadState.cpp#newcode889 > ...
5 years, 7 months ago (2015-05-27 13:56:05 UTC) #13
haraken
On 2015/05/27 13:56:05, ssid wrote: > On 2015/05/27 13:48:11, haraken wrote: > > > https://codereview.chromium.org/1159773004/diff/20001/Source/platform/heap/ThreadState.cpp ...
5 years, 7 months ago (2015-05-27 14:14:23 UTC) #14
ssid
On 2015/05/27 14:14:23, haraken wrote: > On 2015/05/27 13:56:05, ssid wrote: > > On 2015/05/27 ...
5 years, 7 months ago (2015-05-27 14:28:13 UTC) #15
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://src.chromium.org/viewvc/blink?view=rev&revision=195982
5 years, 7 months ago (2015-05-27 15:07:47 UTC) #16
dmurph
A revert of this CL (patchset #2 id:20001) has been created in https://codereview.chromium.org/1159003003/ by dmurph@chromium.org. ...
5 years, 7 months ago (2015-05-27 19:10:17 UTC) #17
haraken
On 2015/05/27 19:10:17, dmurph wrote: > A revert of this CL (patchset #2 id:20001) has ...
5 years, 6 months ago (2015-05-28 03:33:30 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1159773004/40001
5 years, 6 months ago (2015-05-28 03:37:05 UTC) #21
haraken
...and I noticed one bug of our GC infrastructure. Let me fix it before landing ...
5 years, 6 months ago (2015-05-28 03:51:44 UTC) #23
haraken
On 2015/05/28 03:51:44, haraken wrote: > ...and I noticed one bug of our GC infrastructure. ...
5 years, 6 months ago (2015-05-28 05:41:02 UTC) #24
haraken
I think this is now ready for review. keishi-san: PTAL again?
5 years, 6 months ago (2015-05-28 11:45:07 UTC) #25
keishi
LGTM
5 years, 6 months ago (2015-05-28 11:47:08 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1159773004/120001
5 years, 6 months ago (2015-05-28 11:47:34 UTC) #29
sof
https://codereview.chromium.org/1159773004/diff/120001/Source/platform/heap/ThreadState.cpp File Source/platform/heap/ThreadState.cpp (right): https://codereview.chromium.org/1159773004/diff/120001/Source/platform/heap/ThreadState.cpp#newcode907 Source/platform/heap/ThreadState.cpp:907: m_gcState = NoGCScheduled; Why are you doing this (way)?
5 years, 6 months ago (2015-05-28 12:15:13 UTC) #31
haraken
https://codereview.chromium.org/1159773004/diff/120001/Source/platform/heap/ThreadState.cpp File Source/platform/heap/ThreadState.cpp (right): https://codereview.chromium.org/1159773004/diff/120001/Source/platform/heap/ThreadState.cpp#newcode907 Source/platform/heap/ThreadState.cpp:907: m_gcState = NoGCScheduled; On 2015/05/28 12:15:13, sof wrote: > ...
5 years, 6 months ago (2015-05-28 12:33:37 UTC) #32
commit-bot: I haz the power
Committed patchset #7 (id:120001) as https://src.chromium.org/viewvc/blink?view=rev&revision=196059
5 years, 6 months ago (2015-05-28 13:09:52 UTC) #33
sof
A revert of this CL (patchset #7 id:120001) has been created in https://codereview.chromium.org/1143243006/ by sigbjornf@opera.com. ...
5 years, 6 months ago (2015-05-28 14:11:15 UTC) #34
haraken
On 2015/05/28 14:11:15, sof wrote: > A revert of this CL (patchset #7 id:120001) has ...
5 years, 6 months ago (2015-05-29 00:22:51 UTC) #35
haraken
Updated the CL so that we don't register weak callbacks when taking a snapshot. Running ...
5 years, 6 months ago (2015-05-29 01:27:03 UTC) #36
sof
On 2015/05/29 01:27:03, haraken wrote: > Updated the CL so that we don't register weak ...
5 years, 6 months ago (2015-05-29 12:07:33 UTC) #37
haraken
On 2015/05/29 12:07:33, sof wrote: > On 2015/05/29 01:27:03, haraken wrote: > > Updated the ...
5 years, 6 months ago (2015-05-29 12:40:49 UTC) #38
sof
On 2015/05/29 12:40:49, haraken wrote: > On 2015/05/29 12:07:33, sof wrote: > > On 2015/05/29 ...
5 years, 6 months ago (2015-05-29 12:59:12 UTC) #39
sof
https://codereview.chromium.org/1159773004/diff/140001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/1159773004/diff/140001/Source/platform/heap/Heap.cpp#newcode1887 Source/platform/heap/Heap.cpp:1887: if (GCScope::current()->gcType() == ThreadState::TakeSnapshot) Did you explore providing MarkingVisitor<GlobalMarkingNoWeak> ...
5 years, 6 months ago (2015-05-30 20:50:06 UTC) #40
sof
https://codereview.chromium.org/1159773004/diff/140001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/1159773004/diff/140001/Source/platform/heap/Heap.cpp#newcode1887 Source/platform/heap/Heap.cpp:1887: if (GCScope::current()->gcType() == ThreadState::TakeSnapshot) Did you explore providing MarkingVisitor<GlobalMarkingNoWeak> ...
5 years, 6 months ago (2015-05-30 20:50:06 UTC) #41
haraken
On 2015/05/30 20:50:06, sof wrote: > https://codereview.chromium.org/1159773004/diff/140001/Source/platform/heap/Heap.cpp > File Source/platform/heap/Heap.cpp (right): > > https://codereview.chromium.org/1159773004/diff/140001/Source/platform/heap/Heap.cpp#newcode1887 > ...
5 years, 6 months ago (2015-05-31 00:06:45 UTC) #42
haraken
On 2015/05/31 00:06:45, haraken wrote: > On 2015/05/30 20:50:06, sof wrote: > > > https://codereview.chromium.org/1159773004/diff/140001/Source/platform/heap/Heap.cpp ...
5 years, 6 months ago (2015-06-01 05:30:40 UTC) #43
haraken
I think the patch set 11 is finally ready for landing. Testing the bots.
5 years, 6 months ago (2015-06-08 00:34:36 UTC) #44
Primiano Tucci (use gerrit)
On 2015/06/08 00:34:36, haraken wrote: > I think the patch set 11 is finally ready ...
5 years, 6 months ago (2015-06-08 01:29:16 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1159773004/200001
5 years, 6 months ago (2015-06-08 02:06:54 UTC) #48
commit-bot: I haz the power
Committed patchset #11 (id:200001) as https://src.chromium.org/viewvc/blink?view=rev&revision=196643
5 years, 6 months ago (2015-06-08 02:09:42 UTC) #49
sof
Unit test still failing on trunk after this one landing afaict, http://build.chromium.org/p/chromium.webkit/builders/WebKit%20Mac10.8/builds/37790
5 years, 6 months ago (2015-06-08 07:37:22 UTC) #50
haraken
On 2015/06/08 07:37:22, sof wrote: > Unit test still failing on trunk after this one ...
5 years, 6 months ago (2015-06-08 07:50:32 UTC) #51
haraken
On 2015/06/08 07:50:32, haraken wrote: > On 2015/06/08 07:37:22, sof wrote: > > Unit test ...
5 years, 6 months ago (2015-06-08 08:25:10 UTC) #52
haraken
On 2015/06/08 08:25:10, haraken wrote: > On 2015/06/08 07:50:32, haraken wrote: > > On 2015/06/08 ...
5 years, 6 months ago (2015-06-08 08:53:58 UTC) #53
haraken
On 2015/06/08 08:53:58, haraken wrote: > On 2015/06/08 08:25:10, haraken wrote: > > On 2015/06/08 ...
5 years, 6 months ago (2015-06-12 09:09:21 UTC) #54
haraken
5 years, 6 months ago (2015-06-15 02:38:09 UTC) #55
Message was sent while issue was closed.
ssid@: I'm sorry about the delay. Please go ahead with landing your CLs for
memory-infra.

The snapshot GC is still causing a crash but the crash happens only in an
artificial scenario where multiple threads aggressively contend with allocating
HashTables that need weak processing. Given that that won't happen in practice
and I won't have time to fix it this week, it would be better to move things
forward. So please go ahead :) I'll fix the issue next week.

Powered by Google App Engine
This is Rietveld 408576698