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

Unified Diff: src/heap/spaces.cc

Issue 2003553002: [heap] Introduce a new remembered set for typed pointers from old to new. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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
Index: src/heap/spaces.cc
diff --git a/src/heap/spaces.cc b/src/heap/spaces.cc
index d338eab34108eabdad5c7875b80e53aa51e6063c..e9d2244a0efc84875ee836e99e83bee13be98b37 100644
--- a/src/heap/spaces.cc
+++ b/src/heap/spaces.cc
@@ -505,6 +505,7 @@ MemoryChunk* MemoryChunk::Initialize(Heap* heap, Address base, size_t size,
chunk->InitializeReservedMemory();
chunk->old_to_new_slots_ = nullptr;
chunk->old_to_old_slots_ = nullptr;
+ chunk->typed_old_to_new_slots_ = nullptr;
chunk->typed_old_to_old_slots_ = nullptr;
chunk->skip_list_ = nullptr;
chunk->write_barrier_counter_ = kWriteBarrierCounterGranularity;
@@ -1037,6 +1038,8 @@ void MemoryChunk::ReleaseAllocatedMemory() {
}
if (old_to_new_slots_ != nullptr) ReleaseOldToNewSlots();
if (old_to_old_slots_ != nullptr) ReleaseOldToOldSlots();
+ if (typed_old_to_new_slots_ != nullptr) ReleaseTypedOldToNewSlots();
+ if (typed_old_to_old_slots_ != nullptr) ReleaseTypedOldToOldSlots();
}
static SlotSet* AllocateSlotSet(size_t size, Address page_start) {
@@ -1069,6 +1072,16 @@ void MemoryChunk::ReleaseOldToOldSlots() {
old_to_old_slots_ = nullptr;
}
+void MemoryChunk::AllocateTypedOldToNewSlots() {
+ DCHECK(nullptr == typed_old_to_new_slots_);
+ typed_old_to_new_slots_ = new TypedSlotSet(address());
+}
+
+void MemoryChunk::ReleaseTypedOldToNewSlots() {
+ delete typed_old_to_new_slots_;
+ typed_old_to_new_slots_ = nullptr;
+}
+
void MemoryChunk::AllocateTypedOldToOldSlots() {
DCHECK(nullptr == typed_old_to_old_slots_);
typed_old_to_old_slots_ = new TypedSlotSet(address());
« src/heap/mark-compact.cc ('K') | « src/heap/spaces.h ('k') | src/heap/spaces-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698