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

Issue 1274453002: improve allocation accounting for incremental mark (Closed)

Created:
5 years, 4 months ago by ofrobots
Modified:
5 years, 3 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

improve allocation accounting for incremental mark Add an assertion that allocated_bytes >= 0 in IncrementalMark::Step and then make it pass. We were not being diligent in maintaining top_on_previous_step_ and as a result inaccurate, and even negative values of allocated_bytes were being reported to Step. BUG= R=hpayer@chromium.org Committed: https://crrev.com/007baaedd30fb506569b5f649eddd456197eecae Cr-Commit-Position: refs/heads/master@{#30778}

Patch Set 1 #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -13 lines) Patch
M src/heap/incremental-marking.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M src/heap/spaces.h View 2 chunks +3 lines, -2 lines 0 comments Download
M src/heap/spaces.cc View 4 chunks +22 lines, -11 lines 5 comments Download

Messages

Total messages: 11 (1 generated)
ofrobots
5 years, 4 months ago (2015-08-04 19:34:24 UTC) #1
ofrobots
https://codereview.chromium.org/1274453002/diff/1/src/heap/spaces.cc File src/heap/spaces.cc (right): https://codereview.chromium.org/1274453002/diff/1/src/heap/spaces.cc#newcode1517 src/heap/spaces.cc:1517: top_on_previous_step_ = new_top; I think it might be good ...
5 years, 4 months ago (2015-08-04 19:37:11 UTC) #2
ofrobots
On 2015/08/04 19:37:11, ofrobots wrote: > https://codereview.chromium.org/1274453002/diff/1/src/heap/spaces.cc > File src/heap/spaces.cc (right): > > https://codereview.chromium.org/1274453002/diff/1/src/heap/spaces.cc#newcode1517 > ...
5 years, 4 months ago (2015-08-14 02:36:51 UTC) #3
Hannes Payer (out of office)
https://codereview.chromium.org/1274453002/diff/1/src/heap/spaces.cc File src/heap/spaces.cc (right): https://codereview.chromium.org/1274453002/diff/1/src/heap/spaces.cc#newcode1410 src/heap/spaces.cc:1410: heap()->incremental_marking()->Step(bytes_allocated, Calling step is is a no-op in this ...
5 years, 4 months ago (2015-08-14 05:26:30 UTC) #4
ofrobots
https://codereview.chromium.org/1274453002/diff/1/src/heap/spaces.cc File src/heap/spaces.cc (right): https://codereview.chromium.org/1274453002/diff/1/src/heap/spaces.cc#newcode1410 src/heap/spaces.cc:1410: heap()->incremental_marking()->Step(bytes_allocated, On 2015/08/14 05:26:30, Hannes Payer wrote: > Calling ...
5 years, 4 months ago (2015-08-14 15:26:18 UTC) #5
Hannes Payer (out of office)
lgtm https://codereview.chromium.org/1274453002/diff/1/src/heap/spaces.cc File src/heap/spaces.cc (right): https://codereview.chromium.org/1274453002/diff/1/src/heap/spaces.cc#newcode1410 src/heap/spaces.cc:1410: heap()->incremental_marking()->Step(bytes_allocated, On 2015/08/14 15:26:18, ofrobots wrote: > On ...
5 years, 4 months ago (2015-08-17 17:56:16 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1274453002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1274453002/1
5 years, 3 months ago (2015-09-17 00:10:57 UTC) #8
commit-bot: I haz the power
Committed patchset #1 (id:1)
5 years, 3 months ago (2015-09-17 00:55:30 UTC) #9
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/007baaedd30fb506569b5f649eddd456197eecae Cr-Commit-Position: refs/heads/master@{#30778}
5 years, 3 months ago (2015-09-17 00:55:42 UTC) #10
ofrobots
5 years, 3 months ago (2015-09-17 20:06:44 UTC) #11
Message was sent while issue was closed.
On 2015/08/17 17:56:16, Hannes Payer wrote:
> lgtm
> 
> https://codereview.chromium.org/1274453002/diff/1/src/heap/spaces.cc
> File src/heap/spaces.cc (right):
> 
>
https://codereview.chromium.org/1274453002/diff/1/src/heap/spaces.cc#newcode1410
> src/heap/spaces.cc:1410: heap()->incremental_marking()->Step(bytes_allocated,
> On 2015/08/14 15:26:18, ofrobots wrote:
> > On 2015/08/14 05:26:30, Hannes Payer wrote:
> > > Calling step is is a no-op in this case. ResetAllocationInfo is always
> called
> > > within the GC. if (heap_->gc_state() != Heap::NOT_IN_GC ... will bail out
> > > immediately.
> > 
> > The objective is to make accounting of the allocated bytes accurate. Today,
> > incremental_marking doesn't care about the bytes allocated during GC, but
> there
> > might be other consumers of the allocated bytes (such as a sampling heap
> > profiler) that do care about these bytes. It does make sense to do a
> > inline-allocation-step here, even if incremental_marking is going to ignore
> > them.
> > 
> > Once I refactor this into NewSpace::InlineAllocationStep, this would become
> more
> > obvious.
> 
> SGTM with the refactoring.

Refactoring in https://codereview.chromium.org/1351983002.

Powered by Google App Engine
This is Rietveld 408576698