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

Unified Diff: src/heap/mark-compact.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/incremental-marking-inl.h ('k') | src/heap/mark-compact.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/mark-compact.h
diff --git a/src/heap/mark-compact.h b/src/heap/mark-compact.h
index 20ac9f6c935873f164e2e062716757215ed68b41..cc5449f97765e7d1a6c2993b963ff569edc2df89 100644
--- a/src/heap/mark-compact.h
+++ b/src/heap/mark-compact.h
@@ -25,7 +25,9 @@
class MarkCompactCollector;
class MarkingVisitor;
class RootMarkingVisitor;
-class LocalSlotsBuffer;
+class SlotsBuffer;
+class SlotsBufferAllocator;
+
class Marking : public AllStatic {
public:
@@ -393,8 +395,8 @@
->IsEvacuationCandidate();
}
- void RecordRelocSlot(Code* host, RelocInfo* rinfo, Object* target);
- void RecordCodeEntrySlot(HeapObject* host, Address slot, Code* target);
+ void RecordRelocSlot(RelocInfo* rinfo, Object* target);
+ void RecordCodeEntrySlot(HeapObject* object, Address slot, Code* target);
void RecordCodeTargetPatch(Address pc, Code* target);
INLINE(void RecordSlot(HeapObject* object, Object** slot, Object* target));
INLINE(void ForceRecordSlot(HeapObject* object, Object** slot,
@@ -405,8 +407,8 @@
void MigrateObject(HeapObject* dst, HeapObject* src, int size,
AllocationSpace to_old_space,
- LocalSlotsBuffer* old_to_old_slots,
- LocalSlotsBuffer* old_to_new_slots);
+ SlotsBuffer** evacuation_slots_buffer,
+ LocalStoreBuffer* local_store_buffer);
void InvalidateCode(Code* code);
@@ -482,8 +484,9 @@
// whole transitive closure is known. They must be called before sweeping
// when mark bits are still intact.
bool IsSlotInBlackObject(Page* p, Address slot, HeapObject** out_object);
- HeapObject* FindBlackObjectBySlotSlow(Address slot);
+ bool IsSlotInBlackObjectSlow(Page* p, Address slot);
bool IsSlotInLiveObject(Address slot);
+ void VerifyIsSlotInLiveObject(Address slot, HeapObject* object);
// Removes all the slots in the slot buffers that are within the given
// address range.
@@ -517,7 +520,8 @@
explicit MarkCompactCollector(Heap* heap);
bool WillBeDeoptimized(Code* code);
- void ClearInvalidRememberedSetSlots();
+ void EvictPopularEvacuationCandidate(Page* page);
+ void ClearInvalidStoreAndSlotsBufferEntries();
void StartSweeperThreads();
@@ -545,6 +549,10 @@
bool was_marked_incrementally_;
bool evacuation_;
+
+ SlotsBufferAllocator* slots_buffer_allocator_;
+
+ SlotsBuffer* migration_slots_buffer_;
// Finishes GC, performs heap verification if enabled.
void Finish();
@@ -699,6 +707,9 @@
void EvacuateNewSpacePrologue();
void EvacuateNewSpaceEpilogue();
+ void AddEvacuationSlotsBufferSynchronized(
+ SlotsBuffer* evacuation_slots_buffer);
+
void EvacuatePagesInParallel();
// The number of parallel compaction tasks, including the main thread.
@@ -734,8 +745,16 @@
// Updates store buffer and slot buffer for a pointer in a migrating object.
void RecordMigratedSlot(Object* value, Address slot,
- LocalSlotsBuffer* old_to_old_slots,
- LocalSlotsBuffer* old_to_new_slots);
+ SlotsBuffer** evacuation_slots_buffer,
+ LocalStoreBuffer* local_store_buffer);
+
+ // Adds the code entry slot to the slots buffer.
+ void RecordMigratedCodeEntrySlot(Address code_entry, Address code_entry_slot,
+ SlotsBuffer** evacuation_slots_buffer);
+
+ // Adds the slot of a moved code object.
+ void RecordMigratedCodeObjectSlot(Address code_object,
+ SlotsBuffer** evacuation_slots_buffer);
#ifdef DEBUG
friend class MarkObjectVisitor;
@@ -754,6 +773,14 @@
List<Page*> evacuation_candidates_;
List<NewSpacePage*> newspace_evacuation_candidates_;
+
+ // The evacuation_slots_buffers_ are used by the compaction threads.
+ // When a compaction task finishes, it uses
+ // AddEvacuationSlotsbufferSynchronized to adds its slots buffer to the
+ // evacuation_slots_buffers_ list using the evacuation_slots_buffers_mutex_
+ // lock.
+ base::Mutex evacuation_slots_buffers_mutex_;
+ List<SlotsBuffer*> evacuation_slots_buffers_;
base::SmartPointer<FreeList> free_list_old_space_;
base::SmartPointer<FreeList> free_list_code_space_;
« no previous file with comments | « src/heap/incremental-marking-inl.h ('k') | src/heap/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698