Closed MetanoKid closed 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:
Compiler
0: compiles one file, its BackEndPass
requires 3 extra threads to fit its children. So, it uses threads 0 to 3.Compiler
1: compiles 4 files. BackEndPass
entry referred to TimelineEntry.cpp
only requires 2 extra threads to fit its children. That's why next ones get moved to thread 11.Compiler
2: similar to 1.Compiler
3: compiles 5 files. Its third file, FileInclusionGraphExporter.cpp
, has a BackEndPass
which needs 3 extra threads. That's why FileInclusionTimesExporter.cpp
gets moved to thread 12.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.
While reviewing
readme-samples/BuildTimeline.json
I noticed thatCppBuildInsightsDataConversion.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.