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

Unified Diff: Source/platform/heap/ThreadState.h

Issue 1159773004: Oilpan: Implement a GC to take a heap snapshot (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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: Source/platform/heap/ThreadState.h
diff --git a/Source/platform/heap/ThreadState.h b/Source/platform/heap/ThreadState.h
index c50caa516de3d0c73515aaad5c8992d486a56937..88349d3f65b8863680dbfc86b6c1352ce440b2ca 100644
--- a/Source/platform/heap/ThreadState.h
+++ b/Source/platform/heap/ThreadState.h
@@ -178,8 +178,14 @@ public:
};
enum GCType {
- GCWithSweep, // Sweeping is completed in Heap::collectGarbage().
- GCWithoutSweep, // Lazy sweeping is scheduled.
+ // Run a marking task and a sweeping task in Heap::collectGarbage().
+ GCWithSweep,
+ // Run only a marking task in Heap::collectGarbage(). A sweeping task
+ // is split into chunks and scheduled lazily.
+ GCWithoutSweep,
+ // Run a marking task just to take a heap snapshot. A sweeping task
+ // doesn't run and the marks are just dropped.
+ TakeSnapshot,
};
// See setGCState() for possible state transitions.
@@ -340,6 +346,10 @@ public:
void preSweep();
void completeSweep();
void postSweep();
+ // makeConsistentForMutator() drops marks from marked objects and rebuild
+ // free lists. This is called after taking a snapshot and before resuming
+ // the executions of mutators.
+ void makeConsistentForMutator();
// Support for disallowing allocation. Mainly used for sanity
// checks asserts.
@@ -650,6 +660,7 @@ private:
void unregisterPreFinalizerInternal(void*);
void invokePreFinalizers(Visitor&);
+ void takeSnapshot();
#if ENABLE(GC_PROFILING)
void snapshotFreeList();
#endif

Powered by Google App Engine
This is Rietveld 408576698