MetanoKid / cpp-build-analyzer

Analyzes MSVC C++ compilations with C++ Build Insights SDK
GNU General Public License v3.0
80 stars 2 forks source link

Review BuildTimeline.json from readme-samples #9

Closed MetanoKid closed 4 years ago

MetanoKid commented 4 years ago

While reviewing readme-samples/BuildTimeline.json I noticed that CppBuildInsightsDataConversion.cpp should not start at thread 11 but 12. Conceptually, the process/thread recalculation should leave enough free threads between parallel entries for children to fit. However, those entries in thread 8 need 3 extra threads to fit their children.

MetanoKid commented 4 years ago

I've debugged the trace and the thread recalculation seems to work as expected.

Thread recalculation leaves enough free threads to fit children within the same hierarchy. If we were to check BuildTimeline.json we could see there are up to 7 Compiler entries. They look like this:

When I created this issue, I was worried there were FrontEndPass entries in thread 11 and also in thread 12. I expected to see them aligned. However, because they belong to separate hierarchies, they don't know each other and don't need to align to the same thread.

Will close because it turned out not to be a bug.