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

Unified Diff: src/heap/store-buffer.cc

Issue 1497883003: [heap] Clean up stale store buffer entries for aborted pages. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Removed wrong comment Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap/mark-compact.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/store-buffer.cc
diff --git a/src/heap/store-buffer.cc b/src/heap/store-buffer.cc
index ebc513a4fc7619719e079c4f1715e5d7ce327e55..bd1b63863540d32f541bc35fd77948f5b4cd9bf4 100644
--- a/src/heap/store-buffer.cc
+++ b/src/heap/store-buffer.cc
@@ -490,13 +490,22 @@ void StoreBuffer::IteratePointersToNewSpace(ObjectSlotCallback slot_callback) {
}
}
} else {
- heap_->mark_compact_collector()->SweepOrWaitUntilSweepingCompleted(
- page);
- HeapObjectIterator iterator(page);
- for (HeapObject* heap_object = iterator.Next(); heap_object != NULL;
- heap_object = iterator.Next()) {
- // We iterate over objects that contain new space pointers only.
- heap_object->IterateBody(&visitor);
+ if (page->IsFlagSet(Page::COMPACTION_WAS_ABORTED)) {
+ // Aborted pages require iterating using mark bits because they
+ // don't have an iterable object layout before sweeping (which can
+ // only happen later). Note that we can never reach an
+ // aborted page through the scavenger.
+ DCHECK_EQ(heap_->gc_state(), Heap::MARK_COMPACT);
+ heap_->mark_compact_collector()->VisitLiveObjects(page, &visitor);
+ } else {
+ heap_->mark_compact_collector()
+ ->SweepOrWaitUntilSweepingCompleted(page);
+ HeapObjectIterator iterator(page);
+ for (HeapObject* heap_object = iterator.Next();
+ heap_object != nullptr; heap_object = iterator.Next()) {
+ // We iterate over objects that contain new space pointers only.
+ heap_object->IterateBody(&visitor);
+ }
}
}
}
« no previous file with comments | « src/heap/mark-compact.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698