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

Unified Diff: src/heap/heap.h

Issue 2493803002: [heap] Add basic infrastructure for Minor Mark-Compact collector (Closed)
Patch Set: Addressed comment Created 4 years, 1 month 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/gc-tracer.cc ('k') | src/heap/heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.h
diff --git a/src/heap/heap.h b/src/heap/heap.h
index f4ef6953fd6352bc59b9d64726c93ec6379a7a97..c77902f0f634f4a8055df8f9c6b254fd63ad5ac6 100644
--- a/src/heap/heap.h
+++ b/src/heap/heap.h
@@ -684,6 +684,26 @@ class Heap {
#endif
}
+ static inline bool IsYoungGenerationCollector(GarbageCollector collector) {
+ return collector == SCAVENGER || collector == MINOR_MARK_COMPACTOR;
+ }
+
+ static inline GarbageCollector YoungGenerationCollector() {
+ return (FLAG_minor_mc) ? MINOR_MARK_COMPACTOR : SCAVENGER;
+ }
+
+ static inline const char* CollectorName(GarbageCollector collector) {
+ switch (collector) {
+ case SCAVENGER:
+ return "Scavenger";
+ case MARK_COMPACTOR:
+ return "Mark-Compact";
+ case MINOR_MARK_COMPACTOR:
+ return "Minor Mark-Compact";
+ }
+ return "Unknown collector";
+ }
+
V8_EXPORT_PRIVATE static double HeapGrowingFactor(double gc_speed,
double mutator_speed);
@@ -1773,6 +1793,8 @@ class Heap {
// Performs a major collection in the whole heap.
void MarkCompact();
+ // Performs a minor collection of just the young generation.
+ void MinorMarkCompact();
// Code to be run before and after mark-compact.
void MarkCompactPrologue();
« no previous file with comments | « src/heap/gc-tracer.cc ('k') | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698