diff --git a/ecmascript/compiler/aot_compiler.cpp b/ecmascript/compiler/aot_compiler.cpp index 7cc17b50087c2cac2004f172c27f9ce0efb5089f..8712cf5e6bc38a65d7a7b1d2598efabc07a35b48 100644 --- a/ecmascript/compiler/aot_compiler.cpp +++ b/ecmascript/compiler/aot_compiler.cpp @@ -113,8 +113,10 @@ int Main(const int argc, const char **argv) AotCompilerStats compilerStats; std::string bundleName = ""; + std::string pgoDir = ""; if (cPreprocessor.GetMainPkgArgs()) { bundleName = cPreprocessor.GetMainPkgArgs()->GetBundleName(); + pgoDir = cPreprocessor.GetMainPkgArgs()->GetPgoDir(); } compilerStats.SetBundleName(bundleName); compilerStats.SetAotFilePath(cOptions.outputFileName_); @@ -212,7 +214,7 @@ int Main(const int argc, const char **argv) log.Print(); if (runtimeOptions.IsTargetCompilerMode()) { compilerStats.PrintCompilerStatsLog(); - compilerStats.SendDataPartitionSysEvent(cPreprocessor.GetMainPkgArgs()->GetPgoDir()); + compilerStats.SendDataPartitionSysEvent(pgoDir); } }