From 0fe7aae91f6709c17d2d1b005f7fcac67930ff48 Mon Sep 17 00:00:00 2001 From: Kyle Edwards Date: Tue, 25 Oct 2022 14:38:35 -0400 Subject: cmake: Add profiling events for configure and generate --- Source/cmMakefileProfilingData.cxx | 2 +- Source/cmake.cxx | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Source/cmMakefileProfilingData.cxx b/Source/cmMakefileProfilingData.cxx index dc974b1..e4844f3 100644 --- a/Source/cmMakefileProfilingData.cxx +++ b/Source/cmMakefileProfilingData.cxx @@ -60,7 +60,7 @@ void cmMakefileProfilingData::StartEntry(const cmListFileFunction& lff, } (*argsValue)["location"] = cmStrCat(lfc.FilePath, ':', std::to_string(lfc.Line)); - this->StartEntry("cmake", lff.LowerCaseName(), std::move(argsValue)); + this->StartEntry("script", lff.LowerCaseName(), std::move(argsValue)); } void cmMakefileProfilingData::StartEntry(const std::string& category, diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 73b8e88..1a37ca2 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -2070,6 +2070,10 @@ int cmake::HandleDeleteCacheVariables(const std::string& var) int cmake::Configure() { +#if !defined(CMAKE_BOOTSTRAP) + auto profilingRAII = this->CreateProfilingEntry("project", "configure"); +#endif + DiagLevel diagLevel; if (this->DiagLevels.count("deprecated") == 1) { @@ -2582,6 +2586,11 @@ int cmake::Generate() if (!this->GlobalGenerator) { return -1; } + +#if !defined(CMAKE_BOOTSTRAP) + auto profilingRAII = this->CreateProfilingEntry("project", "generate"); +#endif + if (!this->GlobalGenerator->Compute()) { return -1; } -- cgit v0.12