From 6341222e58bd96d034b5beca74ca743b57ae42ef Mon Sep 17 00:00:00 2001 From: Dmitry Pimenov Date: Wed, 3 Sep 2025 13:11:19 +0300 Subject: [PATCH] Allocator tracker Signed-off-by: Dmitry Pimenov --- ets2panda/compiler/core/compilerImpl.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ets2panda/compiler/core/compilerImpl.cpp b/ets2panda/compiler/core/compilerImpl.cpp index 5436e1e0b5..2a52127a7b 100644 --- a/ets2panda/compiler/core/compilerImpl.cpp +++ b/ets2panda/compiler/core/compilerImpl.cpp @@ -14,6 +14,8 @@ */ #include "compilerImpl.h" +#include +#include #include "es2panda.h" #include "ast_verifier/ASTVerifier.h" @@ -35,6 +37,7 @@ #include "compiler/lowering/scopesInit/scopesInitPhase.h" #include "compiler/lowering/checkerPhase.h" #include "evaluate/scopedDebugInfoPlugin.h" +#include "libarkbase/mem/alloc_diag.h" #include "parser/program/DeclarationCache.h" #include "parser/parserImpl.h" #include "parser/JSparser.h" @@ -202,12 +205,14 @@ static bool RunVerifierAndPhases(public_lib::Context &context, parser::Program & verifier.Before(); bool afterCheckerPhase = false; + auto printer = ark::diag::ArenaDiagManager::Instance().Printer(); while (auto phase = context.phaseManager->NextPhase()) { const auto name = std::string {phase->Name()}; if (name == "plugins-after-check") { afterCheckerPhase = true; } ES2PANDA_PERF_EVENT_SCOPE("@phases/" + name); + auto const sn = printer.CreateSnapshot(name); if (options.GetSkipPhases().count(name) > 0) { continue; -- Gitee