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

Issue 1026113004: Reload length of retained_maps array after GC. (Closed)

Created:
5 years, 9 months ago by ulan
Modified:
5 years, 9 months ago
CC:
v8-dev
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Reload length of retained_maps array after GC. This fixes flaky GC stress failure: > Fatal error in ../src/heap/mark-compact.cc, line 2127 > Check failed: retained_maps->Get(i)->IsWeakCell(). BUG= TEST=test-heap/RegressArrayListGC Committed: https://crrev.com/1efcca7f04704c23a6dac29002570c10a7280d67 Cr-Commit-Position: refs/heads/master@{#27412}

Patch Set 1 #

Patch Set 2 : Remove debug output #

Total comments: 4

Patch Set 3 : Address comments #

Patch Set 4 : Remove unused var #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+53 lines, -13 lines) Patch
M src/heap/heap.cc View 1 chunk +2 lines, -1 line 0 comments Download
M src/objects.h View 1 2 1 chunk +8 lines, -2 lines 0 comments Download
M src/objects.cc View 1 2 3 chunks +12 lines, -2 lines 4 comments Download
M test/cctest/test-heap.cc View 1 2 3 3 chunks +31 lines, -8 lines 0 comments Download

Messages

Total messages: 17 (8 generated)
ulan
PTAL
5 years, 9 months ago (2015-03-24 10:09:04 UTC) #2
Jarin
lgtm with nits. Hannes should still have a look. https://codereview.chromium.org/1026113004/diff/20001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/1026113004/diff/20001/src/objects.cc#newcode8285 src/objects.cc:8285: ...
5 years, 9 months ago (2015-03-24 13:50:04 UTC) #4
ulan
Thanks! As discussed, let's land it and then I'll address Hannes' comment (if any) in ...
5 years, 9 months ago (2015-03-24 14:01:36 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1026113004/40001
5 years, 9 months ago (2015-03-24 14:01:54 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux_nodcheck_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_nodcheck_rel/builds/1192)
5 years, 9 months ago (2015-03-24 14:13:10 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1026113004/60001
5 years, 9 months ago (2015-03-24 14:16:09 UTC) #13
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 9 months ago (2015-03-24 14:36:00 UTC) #14
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/1efcca7f04704c23a6dac29002570c10a7280d67 Cr-Commit-Position: refs/heads/master@{#27412}
5 years, 9 months ago (2015-03-24 14:36:21 UTC) #15
Erik Corry
5 years, 9 months ago (2015-03-25 09:53:07 UTC) #17
Message was sent while issue was closed.
https://codereview.chromium.org/1026113004/diff/60001/src/objects.cc
File src/objects.cc (right):

https://codereview.chromium.org/1026113004/diff/60001/src/objects.cc#newcode8299
src/objects.cc:8299: length = array->Length();
Missing DCHECK from the single-argument version.

Did you try just doing this unconditionally, and was it too slow?  It looks a
bit like a trap for the unwary now.

https://codereview.chromium.org/1026113004/diff/60001/src/objects.cc#newcode8309
src/objects.cc:8309: int capacity = array->length();
// This is the length of the FixedArray

https://codereview.chromium.org/1026113004/diff/60001/src/objects.cc#newcode8313
src/objects.cc:8313: capacity = capacity + Max(capacity / 2, 2);
Division by 2 of a signed value can be an expensive operation.  Consider either
making it unsigned or using shift.

https://codereview.chromium.org/1026113004/diff/60001/src/objects.cc#newcode8315
src/objects.cc:8315: if (empty) array->SetLength(0);
// This sets the length of the ArrayList, using the first entry in the fixed
array

Powered by Google App Engine
This is Rietveld 408576698