microsoft / vcperf

A build analysis tool for the MSVC toolchain.
MIT License
296 stars 35 forks source link

timetrace outputs with incorrect timing? #28

Open s9w opened 2 years ago

s9w commented 2 years ago

I think the timings the .json output from /timetrace might be incorrect As an example, I used this program:

#include <vector>
int main()
{
   return 0;
}

I ran vcperf and created both .etl and .json outputs. The json, when viewed in chrome, looks like this:

grafik

That's already a bit odd. the main.cpp file has seemingly two entries. One under the proper CL invocation, FrontEndPass etc - and one to the side. This looks much different in WPA:

grafik

In larger projects, this doesn't always happen. I couldn't quite nail the problem down but I think it has to do with the different "ph" properties of the entries. Sometimes there are double "B" entries where it almost seems as if the second should be an "E". But I'm not too familiar with the trace format.