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

Unified Diff: src/heap/mark-compact-inl.h

Issue 1725073003: Revert of Replace slots buffer with remembered set. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/mark-compact.cc ('k') | src/heap/objects-visiting-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/mark-compact-inl.h
diff --git a/src/heap/mark-compact-inl.h b/src/heap/mark-compact-inl.h
index 9cc7d7c39e57ceb75f5bb78eb3293f26a2c160cb..f117acee9b12f8a28d0af898eb0bcb04176cf715 100644
--- a/src/heap/mark-compact-inl.h
+++ b/src/heap/mark-compact-inl.h
@@ -6,7 +6,7 @@
#define V8_HEAP_MARK_COMPACT_INL_H_
#include "src/heap/mark-compact.h"
-#include "src/heap/remembered-set.h"
+#include "src/heap/slots-buffer.h"
#include "src/isolate.h"
namespace v8 {
@@ -70,11 +70,25 @@
void MarkCompactCollector::RecordSlot(HeapObject* object, Object** slot,
Object* target) {
Page* target_page = Page::FromAddress(reinterpret_cast<Address>(target));
- Page* source_page = Page::FromAddress(reinterpret_cast<Address>(object));
if (target_page->IsEvacuationCandidate() &&
!ShouldSkipEvacuationSlotRecording(object)) {
- RememberedSet<OLD_TO_OLD>::Insert(source_page,
- reinterpret_cast<Address>(slot));
+ if (!SlotsBuffer::AddTo(slots_buffer_allocator_,
+ target_page->slots_buffer_address(), slot,
+ SlotsBuffer::FAIL_ON_OVERFLOW)) {
+ EvictPopularEvacuationCandidate(target_page);
+ }
+ }
+}
+
+
+void MarkCompactCollector::ForceRecordSlot(HeapObject* object, Object** slot,
+ Object* target) {
+ Page* target_page = Page::FromAddress(reinterpret_cast<Address>(target));
+ if (target_page->IsEvacuationCandidate() &&
+ !ShouldSkipEvacuationSlotRecording(object)) {
+ CHECK(SlotsBuffer::AddTo(slots_buffer_allocator_,
+ target_page->slots_buffer_address(), slot,
+ SlotsBuffer::IGNORE_OVERFLOW));
}
}
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/heap/objects-visiting-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698