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

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

Issue 1299623003: Only evacuation candidate pages have a slots buffer, just visit these pages when filtering slots. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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/mark-compact.h ('k') | no next file » | 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 dbb2d9c1fddb851a2838300bc93a3bd238a8edc5..49bf1040b0bbc8270470717cb2ed9878042a6e07 100644
--- a/src/heap/mark-compact.cc
+++ b/src/heap/mark-compact.cc
@@ -284,26 +284,13 @@ bool MarkCompactCollector::StartCompaction(CompactionMode mode) {
}
-void MarkCompactCollector::ClearInvalidSlotsBufferEntries(PagedSpace* space) {
- PageIterator it(space);
- while (it.has_next()) {
- Page* p = it.next();
- SlotsBuffer::RemoveInvalidSlots(heap_, p->slots_buffer());
- }
-}
-
-
void MarkCompactCollector::ClearInvalidStoreAndSlotsBufferEntries() {
heap_->store_buffer()->ClearInvalidStoreBufferEntries();
- ClearInvalidSlotsBufferEntries(heap_->old_space());
- ClearInvalidSlotsBufferEntries(heap_->code_space());
- ClearInvalidSlotsBufferEntries(heap_->map_space());
-
- LargeObjectIterator it(heap_->lo_space());
- for (HeapObject* object = it.Next(); object != NULL; object = it.Next()) {
- MemoryChunk* chunk = MemoryChunk::FromAddress(object->address());
- SlotsBuffer::RemoveInvalidSlots(heap_, chunk->slots_buffer());
+ int number_of_pages = evacuation_candidates_.length();
+ for (int i = 0; i < number_of_pages; i++) {
+ Page* p = evacuation_candidates_[i];
+ SlotsBuffer::RemoveInvalidSlots(heap_, p->slots_buffer());
}
}
« no previous file with comments | « src/heap/mark-compact.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698