• Dominik Inführ's avatar
    [heap] Avoid iterating all pages when freeing empty buckets · add50f20
    Dominik Inführ authored
    At the end of scavenge, the GC iterates all pages to search for empty
    buckets and free them. With this CL the scavenger marks buckets
    (and their corresponding pages) that were empty to reduce work.
    After finishing scavenging the GC only needs to revisit those marked
    buckets.
    
    Unlike (minor) mark-compact, the scavenger can't directly free those
    buckets, since the evacuation and pointer updating-phases are
    not separated.
    
    Right now the pages are processed sequentially but this could be
    parallelized in a subsequent CL.
    
    Change-Id: I47ed8c0e952b06c5d960e39a6f38e745d5618656
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1889884
    Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
    Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#64781}
    add50f20
scavenger.cc 23.5 KB