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(); |