Commit 5c612398 authored by Michael Lippautz's avatar Michael Lippautz Committed by Commit Bot

heap: Fix marking speed computation

The marking speed is computed from incremental marking steps reported.
In case of embedder tracing, such steps should not include time spent
processing embedder memory.

Bug: chromium:1044630, chromium:1049084
Change-Id: Ie7b5af569b4114dd8dffd2d85eaf28ece9dfa18c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2062394
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66316}
parent 545f820c
......@@ -1128,13 +1128,12 @@ StepResult IncrementalMarking::Step(double max_step_size_in_ms,
heap_->concurrent_marking()->RescheduleTasksIfNeeded();
}
}
double duration = (heap_->MonotonicallyIncreasingTimeInMs() - start);
if (state_ == MARKING) {
// Note that we report zero bytes here when sweeping was in progress or
// when we just started incremental marking. In these cases we did not
// process the marking deque.
heap_->tracer()->AddIncrementalMarkingStep(duration, v8_bytes_processed);
// Note that we do not report any marked by in case of finishing sweeping as
// we did not process the marking worklist.
const double v8_duration =
heap_->MonotonicallyIncreasingTimeInMs() - start - embedder_duration;
heap_->tracer()->AddIncrementalMarkingStep(v8_duration, v8_bytes_processed);
}
if (FLAG_trace_incremental_marking) {
heap_->isolate()->PrintWithTimestamp(
......@@ -1142,7 +1141,7 @@ StepResult IncrementalMarking::Step(double max_step_size_in_ms,
"in %.1f\n",
step_origin == StepOrigin::kV8 ? "in v8" : "in task",
v8_bytes_processed / KB, bytes_to_process / KB, embedder_duration,
embedder_deadline, duration);
embedder_deadline, heap_->MonotonicallyIncreasingTimeInMs() - start);
}
return combined_result;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment