mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-20 21:40:15 +08:00
cmake: Add profiling events for configure and generate
This commit is contained in:
@@ -60,7 +60,7 @@ void cmMakefileProfilingData::StartEntry(const cmListFileFunction& lff,
|
|||||||
}
|
}
|
||||||
(*argsValue)["location"] =
|
(*argsValue)["location"] =
|
||||||
cmStrCat(lfc.FilePath, ':', std::to_string(lfc.Line));
|
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,
|
void cmMakefileProfilingData::StartEntry(const std::string& category,
|
||||||
|
@@ -2070,6 +2070,10 @@ int cmake::HandleDeleteCacheVariables(const std::string& var)
|
|||||||
|
|
||||||
int cmake::Configure()
|
int cmake::Configure()
|
||||||
{
|
{
|
||||||
|
#if !defined(CMAKE_BOOTSTRAP)
|
||||||
|
auto profilingRAII = this->CreateProfilingEntry("project", "configure");
|
||||||
|
#endif
|
||||||
|
|
||||||
DiagLevel diagLevel;
|
DiagLevel diagLevel;
|
||||||
|
|
||||||
if (this->DiagLevels.count("deprecated") == 1) {
|
if (this->DiagLevels.count("deprecated") == 1) {
|
||||||
@@ -2582,6 +2586,11 @@ int cmake::Generate()
|
|||||||
if (!this->GlobalGenerator) {
|
if (!this->GlobalGenerator) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined(CMAKE_BOOTSTRAP)
|
||||||
|
auto profilingRAII = this->CreateProfilingEntry("project", "generate");
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!this->GlobalGenerator->Compute()) {
|
if (!this->GlobalGenerator->Compute()) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user