Commit 01ae4743 authored by Michael Lippautz's avatar Michael Lippautz Committed by Commit Bot

[heap] Fix marking throughput computation

Exclude embedder tracing time

Bug: chromium:945806
Change-Id: I9719a42f86fd6edad8fd2b0f707b4dc7feada277
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1564437Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60783}
parent 0c670bf6
......@@ -1136,9 +1136,16 @@ void GCTracer::RecordGCPhasesHistograms(TimedHistogram* gc_timer) {
if (base::TimeTicks::IsHighResolution() &&
heap_->SizeOfObjects() > kMinObjectSizeForReportingThroughput) {
DCHECK_GT(overall_marking_time, 0.0);
const double overall_v8_marking_time =
overall_marking_time -
current_.scopes[Scope::MC_MARK_EMBEDDER_PROLOGUE] -
current_.scopes[Scope::MC_MARK_EMBEDDER_TRACING] -
current_.scopes[Scope::MC_INCREMENTAL_EMBEDDER_PROLOGUE] -
current_.scopes[Scope::MC_INCREMENTAL_EMBEDDER_TRACING];
DCHECK_GT(overall_v8_marking_time, 0.0);
const int main_thread_marking_throughput_mb_per_s =
static_cast<int>(static_cast<double>(heap_->SizeOfObjects()) /
overall_marking_time * 1000 / 1024 / 1024);
overall_v8_marking_time * 1000 / 1024 / 1024);
heap_->isolate()
->counters()
->gc_main_thread_marking_throughput()
......
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