Community
cancel
Showing results for 
Search instead for 
Did you mean: 
fxsknr
Beginner
31 Views

Total Time in Callgraph dosesn't Make Sense

I am using VS C++ 2005 and the VTUNE plugin. In my C++ program, I create several threads. At the start of thread A, I spawn off 2 more threads B and C. I monitor the results with the CallGraph function of VTUne. I used the default settings to create the activity. I then looked at the total Time for the Main function called in each Thread A, B, and C. Thread A's time and B's time are roughly the same. 65 seconds. Thread C's time is 22 seconds. It is my understanding that the Total time should include any time waiting, time while thread isn't running etc. To have something to compare to, I timed in my program how long C was taking. It was 65 seconds as well. I also tried calling GetThreadTime and got a User time of 55 seconds. Why would thread C's Total Time in VTunebe only 22 seconds. Thread C does call several openMP and IPP funcitions in case that some how is a factor.

Thanks.

0 Kudos
2 Replies
TimP
Black Belt
31 Views

VTune CallGraph begins by creating a modified copy of your .exe. If you had linked the (preferably debug) library functions statically (not _dll libraries) as part of your .exe, it would attempt to instrument them as well, although it won't work as well as your own source code. If it does that successfully, no doubt you will find it taking much longer than uninstrumented code.
fxsknr
Beginner
31 Views

Quoting - tim18
VTune CallGraph begins by creating a modified copy of your .exe. If you had linked the (preferably debug) library functions statically (not _dll libraries) as part of your .exe, it would attempt to instrument them as well, although it won't work as well as your own source code. If it does that successfully, no doubt you will find it taking much longer than uninstrumented code.

I tried compiling everything statically as suggested so it was all included in the exe. This had no effect on the Total time of thread C.