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

Unified Diff: src/heap/mark-compact.cc

Issue 1608583002: New page local store buffer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase and fix signed unsigned conversion Created 4 years, 10 months 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/incremental-marking.cc ('k') | src/heap/slot-set.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/mark-compact.cc
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc
index f23918cbfe1f9c9da1e294839b634f93c17e6cf2..3433ee6ef69355ceec78252385b9db19799f915a 100644
--- a/src/heap/mark-compact.cc
+++ b/src/heap/mark-compact.cc
@@ -2873,11 +2873,12 @@ void MarkCompactCollector::UpdateSlotsRecordedIn(SlotsBuffer* buffer) {
static void UpdatePointer(HeapObject** address, HeapObject* object) {
MapWord map_word = object->map_word();
- // The store buffer can still contain stale pointers in dead large objects.
- // Ignore these pointers here.
+ // Since we only filter invalid slots in old space, the store buffer can
+ // still contain stale pointers in large object and in map spaces. Ignore
+ // these pointers here.
DCHECK(map_word.IsForwardingAddress() ||
- object->GetHeap()->lo_space()->FindPage(
- reinterpret_cast<Address>(address)) != NULL);
+ !object->GetHeap()->old_space()->Contains(
+ reinterpret_cast<Address>(address)));
if (map_word.IsForwardingAddress()) {
// Update the corresponding slot.
*address = map_word.ToForwardingAddress();
@@ -3327,7 +3328,6 @@ void MarkCompactCollector::EvacuatePagesInParallel() {
// entries of such pages are filtered before rescanning.
DCHECK(p->IsEvacuationCandidate());
p->SetFlag(Page::COMPACTION_WAS_ABORTED);
- p->set_scan_on_scavenge(true);
abandoned_pages++;
break;
case MemoryChunk::kCompactingFinalize:
@@ -3566,6 +3566,10 @@ bool MarkCompactCollector::VisitLiveObjects(MemoryChunk* page,
page->markbits()->ClearRange(
page->AddressToMarkbitIndex(page->area_start()),
page->AddressToMarkbitIndex(object->address()));
+ if (page->old_to_new_slots() != nullptr) {
+ page->old_to_new_slots()->RemoveRange(
+ 0, static_cast<int>(object->address() - page->address()));
+ }
RecomputeLiveBytes(page);
}
return false;
@@ -3720,8 +3724,6 @@ void MarkCompactCollector::UpdatePointersAfterEvacuation() {
// Update roots.
heap_->IterateRoots(&updating_visitor, VISIT_ALL_IN_SWEEP_NEWSPACE);
- StoreBufferRebuildScope scope(heap_, heap_->store_buffer(),
- &Heap::ScavengeStoreBufferCallback);
heap_->store_buffer()->IteratePointersToNewSpace(&UpdatePointer);
}
@@ -3808,14 +3810,12 @@ void MarkCompactCollector::ReleaseEvacuationCandidates() {
if (!p->IsEvacuationCandidate()) continue;
PagedSpace* space = static_cast<PagedSpace*>(p->owner());
space->Free(p->area_start(), p->area_size());
- p->set_scan_on_scavenge(false);
p->ResetLiveBytes();
CHECK(p->SweepingDone());
space->ReleasePage(p, true);
}
evacuation_candidates_.Rewind(0);
compacting_ = false;
- heap()->FilterStoreBufferEntriesOnAboutToBeFreedPages();
heap()->FreeQueuedChunks();
}
« no previous file with comments | « src/heap/incremental-marking.cc ('k') | src/heap/slot-set.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698