Commit 6644f2b8 authored by Ulan Degenbaev's avatar Ulan Degenbaev Committed by Commit Bot

[heap] Skip pages marked as never-allocate in sweeper accounting

This is a more general fix than 84435faf because tests that rely on
the sweeping order mark all unwanted pages as never-allocate using
SealCurrentObjects.

Bug: v8:9205
Change-Id: I261de3183ee38189ed72de28883a4fdf7b6f253d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1605728Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61407}
parent bf07d790
...@@ -393,10 +393,9 @@ int Sweeper::ParallelSweepSpace(AllocationSpace identity, ...@@ -393,10 +393,9 @@ int Sweeper::ParallelSweepSpace(AllocationSpace identity,
Page* page = nullptr; Page* page = nullptr;
while ((page = GetSweepingPageSafe(identity)) != nullptr) { while ((page = GetSweepingPageSafe(identity)) != nullptr) {
int freed = ParallelSweepPage(page, identity); int freed = ParallelSweepPage(page, identity);
if (!page->NeverEvacuate()) { if (page->IsFlagSet(Page::NEVER_ALLOCATE_ON_PAGE)) {
// Pages are marked as never-evacuate after deserialization. They have // Free list of a never-allocate page will be dropped later on.
// no free space. Do not account them towards the |max_pages| limit. continue;
pages_freed += 1;
} }
DCHECK_GE(freed, 0); DCHECK_GE(freed, 0);
max_freed = Max(max_freed, freed); max_freed = Max(max_freed, freed);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment