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

Issue 1380723002: [heap] Remove unswept bytes counter (Closed)

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

Description

[heap] Remove unswept bytes counter This change removes the unswept free bytes counter. The new approach - directly decrements allocated memory and capacity before sweeping (using live bytes from the marker), and - adds back capacity during refilling a free list. This is another pre-work for moving around free lists while keeping the counters in a sane state. The previous approach allowed us to nail down how much memory is to-be-swept. However, there were no users of this as we only used it do decrement it from allocated memory (which still accounted for dead objects). If we want to keep track of unswept free bytes in a space during compaction we can introduce a separate new concurrent counter for this purpose. BUG=chromium:524425 LOG=N Committed: https://crrev.com/93e939837d53a3eadde8f049f1e87f412adb0050 Cr-Commit-Position: refs/heads/master@{#31175}

Patch Set 1 #

Patch Set 2 : Fix accounting from mutator #

Patch Set 3 : Properly increase and decrease capacity #

Patch Set 4 : Simplify concatenate API and add comment #

Total comments: 3

Patch Set 5 : Addressed comment #

Patch Set 6 : Fix compilation #

Total comments: 6

Patch Set 7 : Add separate accounting for committed memory #

Total comments: 4

Patch Set 8 : Rebase and remove handling of committed memory #

Patch Set 9 : Fix accounting before and in ReleasePage() #

Total comments: 2

Patch Set 10 : Added CHECK #

Unified diffs Side-by-side diffs Delta from patch set Stats (+25 lines, -53 lines) Patch
M src/heap/mark-compact.cc View 1 2 3 4 5 6 7 8 9 5 chunks +5 lines, -10 lines 0 comments Download
M src/heap/spaces.h View 1 2 3 4 5 6 7 5 chunks +6 lines, -21 lines 0 comments Download
M src/heap/spaces.cc View 1 2 3 4 5 6 7 8 7 chunks +14 lines, -22 lines 0 comments Download

Messages

Total messages: 43 (18 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1380723002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1380723002/1
5 years, 2 months ago (2015-09-30 09:58:43 UTC) #2
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 2 months ago (2015-09-30 10:22:20 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1380723002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1380723002/60001
5 years, 2 months ago (2015-09-30 12:36:18 UTC) #8
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 2 months ago (2015-09-30 13:00:41 UTC) #10
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1380723002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1380723002/80001
5 years, 2 months ago (2015-10-01 12:25:52 UTC) #12
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1380723002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1380723002/100001
5 years, 2 months ago (2015-10-01 12:36:30 UTC) #14
Michael Lippautz
PTAL, this is the counter change we talked about. We still rely on the marker ...
5 years, 2 months ago (2015-10-01 13:14:03 UTC) #16
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 2 months ago (2015-10-01 13:30:01 UTC) #18
ulan
lgtm, are there test for the counters? https://codereview.chromium.org/1380723002/diff/100001/src/heap/mark-compact.cc File src/heap/mark-compact.cc (right): https://codereview.chromium.org/1380723002/diff/100001/src/heap/mark-compact.cc#newcode4390 src/heap/mark-compact.cc:4390: space->accounting_stats_.DeallocateBytes(to_sweep); Use ...
5 years, 2 months ago (2015-10-01 15:57:28 UTC) #19
Michael Lippautz
There's 1 explicit test in test-heap.cc (TestSizeOfObjects) and several others that test the behavior implicitly ...
5 years, 2 months ago (2015-10-01 16:22:35 UTC) #20
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1380723002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1380723002/120001
5 years, 2 months ago (2015-10-01 16:23:16 UTC) #22
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux64_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_rel/builds/10240) v8_linux_mips64el_compile_rel on ...
5 years, 2 months ago (2015-10-01 16:25:36 UTC) #24
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1380723002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1380723002/140001
5 years, 2 months ago (2015-10-01 16:27:21 UTC) #26
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 2 months ago (2015-10-01 16:55:39 UTC) #28
Hannes Payer (out of office)
https://codereview.chromium.org/1380723002/diff/140001/src/heap/mark-compact.cc File src/heap/mark-compact.cc (right): https://codereview.chromium.org/1380723002/diff/140001/src/heap/mark-compact.cc#newcode4355 src/heap/mark-compact.cc:4355: space->accounting_stats_.AllocateBytes(p->area_size()); This seems to be non-logical. We do we ...
5 years, 2 months ago (2015-10-02 06:52:09 UTC) #29
Michael Lippautz
Thanks a lot for thinking this through offline. PTAL. https://codereview.chromium.org/1380723002/diff/140001/src/heap/mark-compact.cc File src/heap/mark-compact.cc (right): https://codereview.chromium.org/1380723002/diff/140001/src/heap/mark-compact.cc#newcode4355 src/heap/mark-compact.cc:4355: ...
5 years, 2 months ago (2015-10-02 13:04:35 UTC) #30
Hannes Payer (out of office)
https://codereview.chromium.org/1380723002/diff/140001/src/heap/mark-compact.cc File src/heap/mark-compact.cc (right): https://codereview.chromium.org/1380723002/diff/140001/src/heap/mark-compact.cc#newcode4355 src/heap/mark-compact.cc:4355: space->accounting_stats_.AllocateBytes(p->area_size()); On 2015/10/02 13:04:35, Michael Lippautz wrote: > On ...
5 years, 2 months ago (2015-10-05 15:23:26 UTC) #31
Michael Lippautz
Ulan can you have another look since Hannes is on vacation? Committed accounting has landed ...
5 years, 2 months ago (2015-10-07 13:15:39 UTC) #32
ulan
lgtm https://codereview.chromium.org/1380723002/diff/200001/src/heap/mark-compact.cc File src/heap/mark-compact.cc (right): https://codereview.chromium.org/1380723002/diff/200001/src/heap/mark-compact.cc#newcode3862 src/heap/mark-compact.cc:3862: p->ResetLiveBytes(); Please add check that the page has ...
5 years, 2 months ago (2015-10-07 14:03:01 UTC) #33
Michael Lippautz
https://codereview.chromium.org/1380723002/diff/200001/src/heap/mark-compact.cc File src/heap/mark-compact.cc (right): https://codereview.chromium.org/1380723002/diff/200001/src/heap/mark-compact.cc#newcode3862 src/heap/mark-compact.cc:3862: p->ResetLiveBytes(); On 2015/10/07 14:03:01, ulan wrote: > Please add ...
5 years, 2 months ago (2015-10-07 14:12:18 UTC) #34
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1380723002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1380723002/220001
5 years, 2 months ago (2015-10-07 14:12:36 UTC) #36
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 2 months ago (2015-10-07 14:40:20 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1380723002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1380723002/220001
5 years, 2 months ago (2015-10-08 10:26:46 UTC) #41
commit-bot: I haz the power
Committed patchset #10 (id:220001)
5 years, 2 months ago (2015-10-08 10:28:05 UTC) #42
commit-bot: I haz the power
5 years, 2 months ago (2015-10-08 10:28:23 UTC) #43
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/93e939837d53a3eadde8f049f1e87f412adb0050
Cr-Commit-Position: refs/heads/master@{#31175}

Powered by Google App Engine
This is Rietveld 408576698