[heap] Skip unswept pages for CheckPossiblyEmptyBuckets

Sweeping was already restarted, ignore chunks that might be swept
concurrently.

Bug: chromium:1174007
Change-Id: I954bf4b25ddb27a612b9fd33bad1f1ba34358719
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2674005
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72529}
This commit is contained in:
Dominik Inführ 2021-02-04 11:14:47 +01:00 committed by Commit Bot
parent 03a468f832
commit cf4ec5aae8

View File

@ -410,7 +410,13 @@ void ScavengerCollector::CollectGarbage() {
MemoryChunk* chunk;
while (empty_chunks.Pop(kMainThreadId, &chunk)) {
RememberedSet<OLD_TO_NEW>::CheckPossiblyEmptyBuckets(chunk);
// Since sweeping was already restarted only check chunks that already got
// swept.
if (chunk->SweepingDone()) {
RememberedSet<OLD_TO_NEW>::CheckPossiblyEmptyBuckets(chunk);
} else {
chunk->possibly_empty_buckets()->Release();
}
}
#ifdef DEBUG