improve allocation accounting for incremental mark
authorofrobots <ofrobots@google.com>
Thu, 17 Sep 2015 00:55:24 +0000 (17:55 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 17 Sep 2015 00:55:37 +0000 (00:55 +0000)
commit007baaedd30fb506569b5f649eddd456197eecae
treed9179701262dec6743b720ca633ce46fa1346fe4
parent12c7bc9a226859c3200609495689592a675a21af
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

Review URL: https://codereview.chromium.org/1274453002

Cr-Commit-Position: refs/heads/master@{#30778}
src/heap/incremental-marking.cc
src/heap/spaces.cc
src/heap/spaces.h