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

Issue 1772733002: [heap] Move to two-level free-list (Closed)

Created:
4 years, 9 months ago by Michael Lippautz
Modified:
4 years, 9 months ago
CC:
v8-reviews_googlegroups.com, Hannes Payer (out of office), ulan
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[heap] Move to two-level free-list Before this CL, free memory (FreeSpace) has been managed through a global free list that contains single-linked lists of FreeSpace nodes for each size class. We move away from this approach to a global two-level doubly-linked list that refers to singly-linked lists of FreeSpace nodes on the corresponding pages. This way we can refill on a page-level granularity. Furthermore, it also enables constant-time eviction of pages from the free list. BUG=chromium:524425 LOG=N Committed: https://crrev.com/da3b2661502c51c3c8ba5bb9ecb4d9784fe6b10c Cr-Commit-Position: refs/heads/master@{#34853}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : Addressed offline comments #

Patch Set 6 : Removed owner_ fiel from FreeListCategory #

Patch Set 7 : Rebase again #

Total comments: 8

Patch Set 8 : Removed left over of owner_, and fixed allocation in FindNodeFor to only try to retrieve a node onc… #

Total comments: 6

Patch Set 9 : Addressed comments #

Patch Set 10 : Re-add heuristics that stops refilling all memory into a single compaction task #

Patch Set 11 : Speed up very slow FreeList::IsVeryLong which is used in a regular DCHECK #

Total comments: 4

Patch Set 12 : Addressed comment #

Patch Set 13 : Rebase after black allocation and parallelization bug fixes #

Patch Set 14 : Eagerly remove empty categories #

Patch Set 15 : Rebase on disabled black allocation #

Unified diffs Side-by-side diffs Delta from patch set Stats (+512 lines, -505 lines) Patch
M src/heap/mark-compact.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +17 lines, -15 lines 0 comments Download
M src/heap/mark-compact.cc View 1 2 3 4 5 6 7 8 9 10 11 12 11 chunks +23 lines, -48 lines 0 comments Download
M src/heap/spaces.h View 1 2 3 4 5 6 7 8 9 10 11 12 21 chunks +220 lines, -159 lines 0 comments Download
M src/heap/spaces.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 17 chunks +186 lines, -275 lines 0 comments Download
M src/heap/spaces-inl.h View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +62 lines, -4 lines 0 comments Download
M test/cctest/heap/test-compaction.cc View 1 2 3 4 4 chunks +4 lines, -4 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 62 (39 generated)
Michael Lippautz
Please have a first look. Happy for any suggestions that make it less fragile. What's ...
4 years, 9 months ago (2016-03-07 18:34:49 UTC) #7
Michael Lippautz
+Hannes Addressed offline comments: * General - Fixed accounting * FreeListCategory - non-atomic top pointer ...
4 years, 9 months ago (2016-03-09 09:10:31 UTC) #19
ulan
Looking good. https://codereview.chromium.org/1772733002/diff/300001/src/heap/mark-compact.cc File src/heap/mark-compact.cc (right): https://codereview.chromium.org/1772733002/diff/300001/src/heap/mark-compact.cc#newcode3496 src/heap/mark-compact.cc:3496: List<Page*>* pages = swept_pages(space->identity()); Let's move it ...
4 years, 9 months ago (2016-03-09 15:03:58 UTC) #22
Michael Lippautz
Addressed comments, thanks a lot! This seems way less fragile now. https://codereview.chromium.org/1772733002/diff/300001/src/heap/mark-compact.cc File src/heap/mark-compact.cc (right): ...
4 years, 9 months ago (2016-03-10 10:16:59 UTC) #23
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1772733002/340001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1772733002/340001
4 years, 9 months ago (2016-03-10 10:59:54 UTC) #25
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux_rel_ng on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_rel_ng/builds/2694) v8_linux_rel_ng_triggered on ...
4 years, 9 months ago (2016-03-10 11:33:52 UTC) #27
ulan
lgtm
4 years, 9 months ago (2016-03-10 11:46:44 UTC) #28
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1772733002/380001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1772733002/380001
4 years, 9 months ago (2016-03-10 15:13:42 UTC) #31
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_mac_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_mac_rel/builds/16833)
4 years, 9 months ago (2016-03-10 15:35:25 UTC) #33
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1772733002/400001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1772733002/400001
4 years, 9 months ago (2016-03-10 16:35:00 UTC) #35
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 9 months ago (2016-03-10 17:08:45 UTC) #37
Hannes Payer (out of office)
LGTM, just two minor nits. https://codereview.chromium.org/1772733002/diff/400001/src/heap/spaces.h File src/heap/spaces.h (right): https://codereview.chromium.org/1772733002/diff/400001/src/heap/spaces.h#newcode341 src/heap/spaces.h:341: bool Free(FreeSpace* node, int ...
4 years, 9 months ago (2016-03-11 09:56:24 UTC) #38
Michael Lippautz
https://codereview.chromium.org/1772733002/diff/400001/src/heap/spaces.h File src/heap/spaces.h (right): https://codereview.chromium.org/1772733002/diff/400001/src/heap/spaces.h#newcode341 src/heap/spaces.h:341: bool Free(FreeSpace* node, int size_in_bytes, FreeMode mode); On 2016/03/11 ...
4 years, 9 months ago (2016-03-11 10:19:12 UTC) #39
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1772733002/460001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1772733002/460001
4 years, 9 months ago (2016-03-15 09:20:35 UTC) #41
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_win_rel_ng on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_win_rel_ng/builds/4344) v8_win_rel_ng_triggered on ...
4 years, 9 months ago (2016-03-15 09:55:02 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1772733002/460001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1772733002/460001
4 years, 9 months ago (2016-03-15 10:05:51 UTC) #46
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1772733002/460001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1772733002/460001
4 years, 9 months ago (2016-03-15 10:06:21 UTC) #49
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 9 months ago (2016-03-15 10:24:13 UTC) #51
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1772733002/480001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1772733002/480001
4 years, 9 months ago (2016-03-17 10:03:37 UTC) #53
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 9 months ago (2016-03-17 10:25:46 UTC) #55
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1772733002/480001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1772733002/480001
4 years, 9 months ago (2016-03-17 11:06:42 UTC) #58
commit-bot: I haz the power
Committed patchset #15 (id:480001)
4 years, 9 months ago (2016-03-17 11:10:46 UTC) #60
commit-bot: I haz the power
4 years, 9 months ago (2016-03-17 11:11:11 UTC) #62
Message was sent while issue was closed.
Patchset 15 (id:??) landed as
https://crrev.com/da3b2661502c51c3c8ba5bb9ecb4d9784fe6b10c
Cr-Commit-Position: refs/heads/master@{#34853}

Powered by Google App Engine
This is Rietveld 408576698