heap: Fix traced time for parallel scavengers

The time spent by the parallel scavengers running on the main thread
was being added twice to the SCAVENGER_SCAVENGE_PARALLEL scope.

Change-Id: I358b28cbf56f554d04e3da927182a7c1a7568dad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3253341
Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77617}
This commit is contained in:
Nikolaos Papaspyrou 2021-10-29 14:52:36 +02:00 committed by V8 LUCI CQ
parent a817c2fac2
commit 7cd4345644

View File

@ -195,8 +195,8 @@ void ScavengerCollector::JobTask::Run(JobDelegate* delegate) {
DCHECK_LT(delegate->GetTaskId(), scavengers_->size());
Scavenger* scavenger = (*scavengers_)[delegate->GetTaskId()].get();
if (delegate->IsJoiningThread()) {
TRACE_GC(outer_->heap_->tracer(),
GCTracer::Scope::SCAVENGER_SCAVENGE_PARALLEL);
// This is already traced in GCTracer::Scope::SCAVENGER_SCAVENGE_PARALLEL
// in ScavengerCollector::CollectGarbage.
ProcessItems(delegate, scavenger);
} else {
TRACE_GC_EPOCH(outer_->heap_->tracer(),