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

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

Issue 1010363005: Filter invalid slots out from the SlotsBuffer after marking. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebasing (argh!) Created 5 years, 9 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/flag-definitions.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 9e2730a205ac4328d8f6f68818abe173d4ab699c..b08ff36ea8ace70ccf860fb6dbc66a8a22465814 100644
--- a/src/heap/mark-compact.h
+++ b/src/heap/mark-compact.h
@@ -363,6 +363,15 @@ class SlotsBuffer {
SlotsBuffer** buffer_address, SlotType type, Address addr,
AdditionMode mode);
+ // Eliminates all stale entries from the slots buffer, i.e., slots that
+ // are not part of live objects anymore. This method must be called after
+ // marking, when the whole transitive closure is known and must be called
+ // before sweeping when mark bits are still intact.
+ static void RemoveInvalidSlots(Heap* heap, SlotsBuffer* buffer);
+
+ // Ensures that there are no invalid slots in the chain of slots buffers.
+ static void VerifySlots(Heap* heap, SlotsBuffer* buffer);
+
static const int kNumberOfElements = 1021;
private:
@@ -658,10 +667,10 @@ class MarkCompactCollector {
// The following four methods can just be called after marking, when the
// whole transitive closure is known. They must be called before sweeping
// when mark bits are still intact.
- bool IsSlotInBlackObject(Page* p, Address slot);
+ bool IsSlotInBlackObject(Page* p, Address slot, HeapObject** out_object);
bool IsSlotInBlackObjectSlow(Page* p, Address slot);
- bool IsSlotInLiveObject(HeapObject** address, HeapObject* object);
- void VerifyIsSlotInLiveObject(HeapObject** address, HeapObject* object);
+ bool IsSlotInLiveObject(Address slot);
+ void VerifyIsSlotInLiveObject(Address slot, HeapObject* object);
private:
class SweeperTask;
@@ -674,6 +683,8 @@ class MarkCompactCollector {
void RemoveDeadInvalidatedCode();
void ProcessInvalidatedCode(ObjectVisitor* visitor);
void EvictEvacuationCandidate(Page* page);
+ void ClearInvalidSlotsBufferEntries(PagedSpace* space);
+ void ClearInvalidStoreAndSlotsBufferEntries();
void StartSweeperThreads();
« no previous file with comments | « src/flag-definitions.h ('k') | src/heap/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698