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

Issue 1535723002: [heap] Use HashMap as scratchpad backing store (Closed)

Created:
5 years ago by Michael Lippautz
Modified:
4 years, 11 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] Use HashMap as scratchpad backing store We use a scratchpad to remember visited allocation sites for post processing (making tenure decisions). The previous implementation used a rooted FixedArray with constant length (256) to remember all sites. Updating the scratchpad is a bottleneck in any parallel/concurrent implementation of newspace evacuation. The new implementation uses a HashMap with allocation sites as keys and temporary counts as values. During evacuation we collect a local hashmap of visited allocation sites. Upon merging the local hashmap back into a global one we update potential forward pointers of compacted allocation sites. The scavenger can directly enter its entries into the global hashmap. Note that the actual memento found count is still kept on the AllocationSite as it needs to survive scavenges and full GCs. BUG=chromium:524425 LOG=N R=hpayer@chromium.org Committed: https://crrev.com/55422bdd501ff93e2eff737b5b3672dc92a147ff Cr-Commit-Position: refs/heads/master@{#33233}

Patch Set 1 : Initial prototype #

Patch Set 2 : Rip out old scratchpad code #

Patch Set 3 : Rebase #

Patch Set 4 : Directly update count when in scavenger #

Patch Set 5 : Small fix #

Total comments: 10

Patch Set 6 : Rely on hashmap for found counts #

Patch Set 7 : Allocate a new hashmap for each GC round #

Patch Set 8 : More comments #

Patch Set 9 : Remove dead code #

Total comments: 12

Patch Set 10 : Addressed comments #

Patch Set 11 : Remove remaining uses of the words scratchpad (and some dead code) #

Patch Set 12 : Rebase after counter changes #

Patch Set 13 : Found counters survive scavenge #

Patch Set 14 : Revive the founder counter on the AllocationSite #

Unified diffs Side-by-side diffs Delta from patch set Stats (+455 lines, -408 lines) Patch
M src/heap/heap.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 11 chunks +41 lines, -26 lines 0 comments Download
M src/heap/heap.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 9 chunks +106 lines, -112 lines 0 comments Download
M src/heap/heap-inl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +28 lines, -10 lines 0 comments Download
M src/heap/mark-compact.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +8 lines, -1 line 0 comments Download
M src/heap/mark-compact.cc View 1 2 3 4 5 6 7 8 9 10 11 13 7 chunks +33 lines, -10 lines 0 comments Download
M src/heap/scavenger-inl.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -1 line 0 comments Download
M src/heap/spaces.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +1 line, -2 lines 0 comments Download
M src/objects.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M src/objects-inl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +9 lines, -8 lines 0 comments Download
M tools/v8heapconst.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +226 lines, -237 lines 0 comments Download

Messages

Total messages: 56 (38 generated)
Michael Lippautz
PTAL. The change seems to be almost performance neutral on the bots (flaky runs). It's ...
5 years ago (2015-12-21 19:05:37 UTC) #12
Hannes Payer (out of office)
First round. https://codereview.chromium.org/1535723002/diff/220001/src/heap/heap.cc File src/heap/heap.cc (left): https://codereview.chromium.org/1535723002/diff/220001/src/heap/heap.cc#oldcode549 src/heap/heap.cc:549: allocation_sites++; On 2015/12/21 19:05:37, Michael Lippautz wrote: ...
4 years, 11 months ago (2016-01-04 15:35:18 UTC) #13
Michael Lippautz
PTAL * I removed the counter field from AllocationSite * Moving the memento created count ...
4 years, 11 months ago (2016-01-07 13:12:39 UTC) #17
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1535723002/320001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1535723002/320001
4 years, 11 months ago (2016-01-08 08:05:00 UTC) #19
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux_dbg on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_dbg/builds/12739)
4 years, 11 months ago (2016-01-08 08:15:13 UTC) #21
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1535723002/340001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1535723002/340001
4 years, 11 months ago (2016-01-08 08:19:39 UTC) #24
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 11 months ago (2016-01-08 09:15:20 UTC) #26
Hannes Payer (out of office)
https://codereview.chromium.org/1535723002/diff/340001/src/heap/heap.cc File src/heap/heap.cc (right): https://codereview.chromium.org/1535723002/diff/340001/src/heap/heap.cc#newcode1286 src/heap/heap.cc:1286: InitPretenuring(); How about a pretenuring scope that takes care ...
4 years, 11 months ago (2016-01-08 09:55:07 UTC) #27
Michael Lippautz
I could not go full way with structuring the code for parallization (yet) as this ...
4 years, 11 months ago (2016-01-08 10:56:24 UTC) #32
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1535723002/440001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1535723002/440001
4 years, 11 months ago (2016-01-08 11:53:02 UTC) #34
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 11 months ago (2016-01-08 12:16:35 UTC) #36
Michael Lippautz
FYI: The followup for moving the created memento counter in place of the found memento ...
4 years, 11 months ago (2016-01-08 12:54:57 UTC) #37
Hannes Payer (out of office)
lgtm
4 years, 11 months ago (2016-01-08 14:40:10 UTC) #40
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1535723002/620001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1535723002/620001
4 years, 11 months ago (2016-01-12 11:02:30 UTC) #48
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 11 months ago (2016-01-12 11:32:50 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1535723002/620001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1535723002/620001
4 years, 11 months ago (2016-01-12 11:44:23 UTC) #53
commit-bot: I haz the power
Committed patchset #14 (id:620001)
4 years, 11 months ago (2016-01-12 11:45:52 UTC) #54
commit-bot: I haz the power
4 years, 11 months ago (2016-01-12 11:46:48 UTC) #56
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/55422bdd501ff93e2eff737b5b3672dc92a147ff
Cr-Commit-Position: refs/heads/master@{#33233}

Powered by Google App Engine
This is Rietveld 408576698