Index: src/heap.cc |
diff --git a/src/heap.cc b/src/heap.cc |
index 79aced7d4d33c90a8df1fcae98b16e870d60df62..44dad6cf8c62028efa90fc6f729927e6aeee5027 100644 |
--- a/src/heap.cc |
+++ b/src/heap.cc |
@@ -657,18 +657,19 @@ void Heap::PerformGarbageCollection(AllocationSpace space, |
void Heap::MarkCompact(GCTracer* tracer) { |
gc_state_ = MARK_COMPACT; |
- if (MarkCompactCollector::IsCompacting()) { |
- mc_count_++; |
- } else { |
- ms_count_++; |
- } |
- tracer->set_full_gc_count(mc_count_); |
LOG(ResourceEvent("markcompact", "begin")); |
MarkCompactCollector::Prepare(tracer); |
bool is_compacting = MarkCompactCollector::IsCompacting(); |
+ if (is_compacting) { |
+ mc_count_++; |
+ } else { |
+ ms_count_++; |
+ } |
+ tracer->set_full_gc_count(mc_count_ + ms_count_); |
+ |
MarkCompactPrologue(is_compacting); |
MarkCompactCollector::CollectGarbage(); |