summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2022-10-25 18:38:35 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2022-10-27 13:56:49 (GMT)
commit0fe7aae91f6709c17d2d1b005f7fcac67930ff48 (patch)
tree24adc2c5e0233685084d3d3d0be7184c2f7ab7e9
parent3d6a8d7eac588e42ae60231409fc763a6bc41e9b (diff)
downloadCMake-0fe7aae91f6709c17d2d1b005f7fcac67930ff48.zip
CMake-0fe7aae91f6709c17d2d1b005f7fcac67930ff48.tar.gz
CMake-0fe7aae91f6709c17d2d1b005f7fcac67930ff48.tar.bz2
cmake: Add profiling events for configure and generate
-rw-r--r--Source/cmMakefileProfilingData.cxx2
-rw-r--r--Source/cmake.cxx9
2 files changed, 10 insertions, 1 deletions
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;
}