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 #
Messages
Total messages: 56 (38 generated)
|