Commit 0ac80246 authored by Omer Katz's avatar Omer Katz Committed by Commit Bot

cppgc: Fix missing scope in CppHeap

CppHeap was missing a scope for incremental marking.

This CL also introduces NestedEmbedderStepScope which is used for
identifying nested samples to avoid double accounting in UMA.

Bug: chromium:1056170
Change-Id: I8bba3fbfe6d098fe6861d1cfe5df8b88b4ac0fea
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2642260
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72265}
parent f5eae65a
...@@ -234,6 +234,14 @@ void CppHeap::TracePrologue(TraceFlags flags) { ...@@ -234,6 +234,14 @@ void CppHeap::TracePrologue(TraceFlags flags) {
} }
bool CppHeap::AdvanceTracing(double deadline_in_ms) { bool CppHeap::AdvanceTracing(double deadline_in_ms) {
// TODO(chromium:1154636): The kAtomicMark/kIncrementalMark scope below is
// needed for recording all cpp marking time. Note that it can lead to double
// accounting since this scope is also accounted under an outer v8 scope.
// Make sure to only account this scope once.
cppgc::internal::StatsCollector::EnabledScope stats_scope(
AsBase(), is_in_final_pause_
? cppgc::internal::StatsCollector::kAtomicMark
: cppgc::internal::StatsCollector::kIncrementalMark);
v8::base::TimeDelta deadline = v8::base::TimeDelta deadline =
is_in_final_pause_ is_in_final_pause_
? v8::base::TimeDelta::Max() ? v8::base::TimeDelta::Max()
......
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