Index: src/mark-compact.h |
diff --git a/src/mark-compact.h b/src/mark-compact.h |
index 9a0b014d633d6a069f288c9341cd9eac38531a66..0c5934df8a560248def42b7d5533d0f296b551b9 100644 |
--- a/src/mark-compact.h |
+++ b/src/mark-compact.h |
@@ -500,6 +500,13 @@ class CodeFlusher { |
class ThreadLocalTop; |
+enum SweeperType { |
Michael Starzinger
2013/01/28 16:30:18
Move this back into MarkCompactCollector, no longe
Hannes Payer (out of office)
2013/01/30 10:11:27
Done.
|
+ 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,17 @@ class MarkCompactCollector { |
MarkingParity marking_parity() { return marking_parity_; } |
+ void SweepInParallel(PagedSpace* space, |
+ SweeperType sweeper_type, |
Michael Starzinger
2013/01/28 16:30:18
As discussed offline: Parallel sweeping will alway
Hannes Payer (out of office)
2013/01/30 10:11:27
Done.
|
+ FreeList* private_free_list, |
+ FreeList* free_list); |
+ |
+ void WaitUntilSweepingCompleted(); |
+ |
+ intptr_t StealMemoryFromSweeperThreads(PagedSpace* space); |
+ |
+ bool AreSweeperThreadsActivated(); |
+ |
private: |
MarkCompactCollector(); |
~MarkCompactCollector(); |
@@ -672,6 +691,7 @@ class MarkCompactCollector { |
void RemoveDeadInvalidatedCode(); |
void ProcessInvalidatedCode(ObjectVisitor* visitor); |
+ void StartSweeperThreads(SweeperType sweeper_type); |
#ifdef DEBUG |
enum CollectorState { |
@@ -836,6 +856,8 @@ class MarkCompactCollector { |
void SweepSpace(PagedSpace* space, SweeperType sweeper); |
+ void PrepareParallelSweeping(PagedSpace* space); |
+ |
#ifdef DEBUG |
friend class MarkObjectVisitor; |
static void VisitObject(HeapObject* obj); |