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

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

Issue 2855143003: [heap] Minor MC: Implement page moving (Closed)
Patch Set: Disable flag Created 3 years, 7 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 | « src/heap/incremental-marking.cc ('k') | 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 b727124b9cf479804072da59a0964bb9a428c695..7303f071881abc3d36a1f75abfe677862c22fd6d 100644
--- a/src/heap/mark-compact.h
+++ b/src/heap/mark-compact.h
@@ -277,6 +277,8 @@ class LiveObjectVisitor BASE_EMBEDDED {
};
enum PageEvacuationMode { NEW_TO_NEW, NEW_TO_OLD };
+enum FreeSpaceTreatmentMode { IGNORE_FREE_SPACE, ZAP_FREE_SPACE };
+enum MarkingTreatmentMode { KEEP, CLEAR };
// Base class for minor and full MC collectors.
class MarkCompactCollectorBase {
@@ -322,6 +324,9 @@ class MarkCompactCollectorBase {
MigrationObserver* migration_observer, const intptr_t live_bytes,
const int& abandoned_pages);
+ // Returns whether this page should be moved according to heuristics.
+ bool ShouldMovePage(Page* p, intptr_t live_bytes);
+
Heap* heap_;
};
@@ -345,6 +350,10 @@ class MinorMarkCompactCollector final : public MarkCompactCollectorBase {
void TearDown() override;
void CollectGarbage() override;
+ void MakeIterable(Page* page, MarkingTreatmentMode marking_mode,
+ FreeSpaceTreatmentMode free_space_mode);
+ void CleanupSweepToIteratePages();
+
private:
class RootMarkingVisitor;
@@ -368,6 +377,7 @@ class MinorMarkCompactCollector final : public MarkCompactCollectorBase {
MarkingDeque marking_deque_;
base::Semaphore page_parallel_job_semaphore_;
List<Page*> new_space_evacuation_pages_;
+ std::vector<Page*> sweep_to_iterate_pages_;
friend class StaticYoungGenerationMarkingVisitor;
};
@@ -382,7 +392,6 @@ class MarkCompactCollector final : public MarkCompactCollectorBase {
class SweeperTask;
enum FreeListRebuildingMode { REBUILD_FREE_LIST, IGNORE_FREE_LIST };
- enum FreeSpaceTreatmentMode { IGNORE_FREE_SPACE, ZAP_FREE_SPACE };
enum ClearOldToNewSlotsMode {
DO_NOT_CLEAR,
CLEAR_REGULAR_SLOTS,
« no previous file with comments | « src/heap/incremental-marking.cc ('k') | src/heap/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698