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

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, 6 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 | « Source/platform/heap/MarkingVisitorImpl.h ('k') | Source/platform/heap/ThreadState.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/heap/ThreadState.h
diff --git a/Source/platform/heap/ThreadState.h b/Source/platform/heap/ThreadState.h
index a184beae87328675ff2b43e231ec96d1ef0f826c..6f751368b602c62634fc8160108bafa641981551 100644
--- a/Source/platform/heap/ThreadState.h
+++ b/Source/platform/heap/ThreadState.h
@@ -192,9 +192,19 @@ public:
};
enum GCType {
- GCWithSweep, // Sweeping is completed in Heap::collectGarbage().
- GCWithoutSweep, // Lazy sweeping is scheduled.
- ThreadTerminationGC, // A thread-local GC scheduled before the thread shutdown.
+ // Both of the marking task and the sweeping task run in
+ // Heap::collectGarbage().
+ GCWithSweep,
+ // Only the marking task runs in Heap::collectGarbage().
+ // The sweeping task is split into chunks and scheduled lazily.
+ GCWithoutSweep,
+ // Only the marking task runs just to take a heap snapshot.
+ // The sweeping task doesn't run. The marks added in the marking task
+ // are just cleared.
+ TakeSnapshot,
+ // The marking task does not mark objects outside the heap of the GCing
+ // thread.
+ ThreadTerminationGC,
};
// See setGCState() for possible state transitions.
@@ -354,6 +364,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.
@@ -671,6 +685,7 @@ private:
void unregisterPreFinalizerInternal(void*);
void invokePreFinalizers();
+ void takeSnapshot();
#if ENABLE(GC_PROFILING)
void snapshotFreeList();
#endif
« no previous file with comments | « Source/platform/heap/MarkingVisitorImpl.h ('k') | Source/platform/heap/ThreadState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698