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.
Link Copied
For more complete information about compiler optimizations, see our Optimization Notice.