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

Unified Diff: src/heap/mark-compact.h

Issue 1343333002: [heap] Introduce parallel compaction algorithm. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@counters-2nd-try
Patch Set: Fix moving free list / merge compaction space dance Created 5 years, 3 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 | « no previous file | src/heap/mark-compact.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/mark-compact.h
diff --git a/src/heap/mark-compact.h b/src/heap/mark-compact.h
index e0b7c38ca0bd0cfc2c0f785b31c59c476a576943..714ad16bc8b3005bb31649aa6a17fea3ac7ea6f9 100644
--- a/src/heap/mark-compact.h
+++ b/src/heap/mark-compact.h
@@ -553,8 +553,11 @@ class MarkCompactCollector {
// Synchronize sweeper threads.
base::Semaphore pending_sweeper_jobs_semaphore_;
- // Synchronize compaction threads.
- base::Semaphore pending_compaction_jobs_semaphore_;
+ // Synchronize compaction tasks.
+ base::Semaphore pending_compaction_tasks_semaphore_;
+
+ // Number of active compaction tasks (including main thread).
+ intptr_t concurrent_compaction_tasks_active_;
bool evacuation_;
@@ -712,12 +715,17 @@ class MarkCompactCollector {
void EvacuateNewSpace();
- void EvacuateLiveObjectsFromPage(Page* p, PagedSpace* target_space);
-
- void EvacuatePages();
+ bool EvacuateLiveObjectsFromPage(Page* p, PagedSpace* target_space);
+ void EvacuatePages(CompactionSpaceCollection* compaction_spaces);
void EvacuatePagesInParallel();
+ int NumberOfParallelCompactionTasks() {
+ // TODO(hpayer, mlippautz): Figure out some logic to determine the number
+ // of compaction tasks.
+ return 1;
+ }
+
void WaitUntilCompactionCompleted();
void EvacuateNewSpaceAndCandidates();
« no previous file with comments | « no previous file | src/heap/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698