Index: src/heap/incremental-marking.cc |
diff --git a/src/heap/incremental-marking.cc b/src/heap/incremental-marking.cc |
index 494aa67f726fb67d0bca59f6137aaaf080d345b6..54c89acbd2272223aec4f9ee5f6396e0bfa90a98 100644 |
--- a/src/heap/incremental-marking.cc |
+++ b/src/heap/incremental-marking.cc |
@@ -652,6 +652,8 @@ void IncrementalMarking::FinalizeIncrementally() { |
DCHECK(!finalize_marking_completed_); |
DCHECK(IsMarking()); |
+ double start = heap_->MonotonicallyIncreasingTimeInMs(); |
+ |
int old_marking_deque_top = |
heap_->mark_compact_collector()->marking_deque()->top(); |
@@ -666,6 +668,18 @@ void IncrementalMarking::FinalizeIncrementally() { |
abs(old_marking_deque_top - |
heap_->mark_compact_collector()->marking_deque()->top()); |
+ double end = heap_->MonotonicallyIncreasingTimeInMs(); |
+ double delta = end - start; |
+ heap_->tracer()->AddMarkingTime(delta); |
+ heap_->tracer()->AddIncrementalMarkingFinalizationStep(delta); |
+ if (FLAG_trace_incremental_marking) { |
+ PrintF( |
+ "[IncrementalMarking] Finalize incrementally round %d, " |
+ "spent %d ms, marking progress %d.\n", |
+ static_cast<int>(delta), incremental_marking_finalization_rounds_, |
+ marking_progress); |
+ } |
+ |
++incremental_marking_finalization_rounds_; |
if ((incremental_marking_finalization_rounds_ >= |
FLAG_max_incremental_marking_finalization_rounds) || |