Commit 91bfde42 authored by Anton Bikineev's avatar Anton Bikineev Committed by V8 LUCI CQ

cppgc: young-gen: Return DCHECKs to AddMainThreadEvent

The DCHECKs check that the metrics from previous cycles are extracted
for both young and full GCs.

Bug: chromium:1029379
Change-Id: I8390d474abc8bd698e7f02896383b6fe013d792e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3570430Reviewed-by: 's avatarOmer Katz <omerkatz@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79785}
parent fd7c100a
......@@ -298,8 +298,10 @@ void UnifiedHeapMarker::AddObject(void* object) {
void CppHeap::MetricRecorderAdapter::AddMainThreadEvent(
const GCCycle& cppgc_event) {
if (cppgc_event.type == MetricRecorder::GCCycle::Type::kMinor) {
DCHECK(!last_young_gc_event_);
last_young_gc_event_ = cppgc_event;
} else {
DCHECK(!last_full_gc_event_);
last_full_gc_event_ = cppgc_event;
}
GetIsolate()->heap()->tracer()->NotifyCppGCCompleted(
......
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