Chromium Code Reviews| Index: src/heap/mark-compact.cc |
| diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc |
| index 8338c5c38b9cb4650249d84c62e62ee6eeea9884..393ba6d3724a4009c7fbdb51f7f413aac481145c 100644 |
| --- a/src/heap/mark-compact.cc |
| +++ b/src/heap/mark-compact.cc |
| @@ -2881,11 +2881,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. |
| + // The store buffer can still contain stale pointers in large object |
| + // or in map spaces. |
|
Hannes Payer (out of office)
2016/01/20 19:43:00
Why map space?
ulan
2016/01/28 19:07:22
Clarified the comment.
Since we only filter invali
|
| // 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(); |
| @@ -3218,7 +3219,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: |
| @@ -3508,6 +3508,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; |
| @@ -3673,8 +3677,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); |
| } |
| @@ -3776,7 +3778,6 @@ 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->WasSwept()); |
| space->ReleasePage(p); |