From d58a1067c2a7a983b28651fce9425b588de173c9 Mon Sep 17 00:00:00 2001 From: zealotchen Date: Mon, 21 Oct 2024 20:18:44 +0800 Subject: [PATCH] feat(devtools): add v8 js profile --- .../devtools-integration/native/src/v8/trace_control.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/devtools/devtools-integration/native/src/v8/trace_control.cc b/devtools/devtools-integration/native/src/v8/trace_control.cc index 1b1b3972758..6e0d49104b1 100644 --- a/devtools/devtools-integration/native/src/v8/trace_control.cc +++ b/devtools/devtools-integration/native/src/v8/trace_control.cc @@ -67,6 +67,15 @@ void TraceControl::StartTracing() { auto trace_config = v8::platform::tracing::TraceConfig::CreateDefaultTraceConfig(); trace_config->SetTraceRecordMode(v8::platform::tracing::TraceRecordMode::RECORD_CONTINUOUSLY); trace_config->AddIncludedCategory(kTraceIncludedCategoryV8); + trace_config->EnableSystrace(); + trace_config->AddIncludedCategory("devtools.timeline"); + trace_config->AddIncludedCategory("v8.execute"); + trace_config->AddIncludedCategory("disabled-by-default-devtools.timeline"); + trace_config->AddIncludedCategory("disabled-by-default-devtools.timeline.frame"); + trace_config->AddIncludedCategory("disabled-by-default-devtools.timeline.stack"); + trace_config->AddIncludedCategory("disabled-by-default-v8.cpu_profiler"); + trace_config->AddIncludedCategory("disabled-by-default-v8.cpu_profiler.hires"); + trace_config->AddIncludedCategory("latencyInfo"); v8_trace_control_->StartTracing(trace_config); tracing_has_start_ = true; }