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

Unified Diff: src/mark-compact.h

Issue 11782028: Parallel and concurrent sweeping. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 11 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/mark-compact.h
diff --git a/src/mark-compact.h b/src/mark-compact.h
index 9a0b014d633d6a069f288c9341cd9eac38531a66..e92cbfe1f9e756b2616001029f8c4b94629bf1a3 100644
--- a/src/mark-compact.h
+++ b/src/mark-compact.h
@@ -500,6 +500,13 @@ class CodeFlusher {
class ThreadLocalTop;
+enum SweeperType {
+ CONSERVATIVE,
+ LAZY_CONSERVATIVE,
+ PRECISE
+};
+
+
// -------------------------------------------------------------------------
// Mark-Compact collector
class MarkCompactCollector {
@@ -584,12 +591,6 @@ class MarkCompactCollector {
inline bool is_code_flushing_enabled() const { return code_flusher_ != NULL; }
void EnableCodeFlushing(bool enable);
- enum SweeperType {
- CONSERVATIVE,
- LAZY_CONSERVATIVE,
- PRECISE
- };
-
#ifdef VERIFY_HEAP
void VerifyMarkbitsAreClean();
static void VerifyMarkbitsAreClean(PagedSpace* space);
@@ -598,7 +599,14 @@ class MarkCompactCollector {
// Sweep a single page from the given space conservatively.
// Return a number of reclaimed bytes.
- static intptr_t SweepConservatively(PagedSpace* space, Page* p);
+ static intptr_t SweepConservatively(PagedSpace* space,
+ FreeList* free_list,
+ Page* p);
+
+ static intptr_t Free(PagedSpace* space,
+ FreeList* free_list,
+ Address start,
+ int size);
INLINE(static bool ShouldSkipEvacuationSlotRecording(Object** anchor)) {
return Page::FromAddress(reinterpret_cast<Address>(anchor))->
@@ -664,6 +672,11 @@ class MarkCompactCollector {
MarkingParity marking_parity() { return marking_parity_; }
+ void SweepInParallel(PagedSpace* space,
+ SweeperType sweeper_type,
+ FreeList* private_free_list,
+ FreeList* free_list);
+
private:
MarkCompactCollector();
~MarkCompactCollector();
@@ -836,6 +849,8 @@ class MarkCompactCollector {
void SweepSpace(PagedSpace* space, SweeperType sweeper);
+ void PrepareParallelSweeping(PagedSpace* space);
+
#ifdef DEBUG
friend class MarkObjectVisitor;
static void VisitObject(HeapObject* obj);

Powered by Google App Engine
This is Rietveld 408576698