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

Unified Diff: src/heap.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/heap.h
diff --git a/src/heap.h b/src/heap.h
index 9281fa9d72e354bfc4e16d035bcc14e71eb7a158..1d13f6713fafc9a96b677b4f3b9dc7a0f5176a28 100644
--- a/src/heap.h
+++ b/src/heap.h
@@ -1082,6 +1082,14 @@ class Heap {
inline bool CollectGarbage(AllocationSpace space,
const char* gc_reason = NULL);
+ void StartParallelSweeping(SweeperType sweeper_type);
+ void WaitUntilParallelSweepingCompleted();
+ void StealMemoryFromSweeperThreads(PagedSpace* space);
+ void FinalizeParallelSweeping();
+ bool IsConcurrentSweepingActivated();
+ bool AreSweepingThreadsActivated();
+ bool IsConcurrentSweepingPending();
Michael Starzinger 2013/01/24 17:15:54 We should try to move most of that functionality i
Hannes Payer (out of office) 2013/01/25 10:46:49 Done.
+
static const int kNoGCFlags = 0;
static const int kSweepPreciselyMask = 1;
static const int kReduceMemoryFootprintMask = 2;
@@ -1567,7 +1575,18 @@ class Heap {
old_pointer_space()->IsSweepingComplete();
}
+ void SweepInParallel(PagedSpace* paged_space,
Michael Starzinger 2013/01/24 17:15:54 This dispatcher should not be necessary.
Hannes Payer (out of office) 2013/01/25 10:46:49 Done.
+ SweeperType sweeper_type,
+ FreeList* private_free_list,
+ FreeList* free_list) {
+ mark_compact_collector()->SweepInParallel(paged_space,
+ sweeper_type,
+ private_free_list,
+ free_list);
+ }
+
bool AdvanceSweepers(int step_size) {
Michael Starzinger 2013/01/24 17:15:54 This is still being called from the idle notificat
Hannes Payer (out of office) 2013/01/25 10:46:49 Done.
+ ASSERT(!FLAG_parallel_sweeping && !FLAG_concurrent_sweeping);
bool sweeping_complete = old_data_space()->AdvanceSweeper(step_size);
sweeping_complete &= old_pointer_space()->AdvanceSweeper(step_size);
return sweeping_complete;

Powered by Google App Engine
This is Rietveld 408576698