Community
cancel
Showing results for 
Search instead for 
Did you mean: 
jimpurbrick
Beginner
91 Views

Wait Time == Blocking Time?

This is how I interpreted it, as the VTune docs specify wait time as the time the thread was suspended.
2 Things that cause me to question it are that on recent profiles I'm getting lots of wait time in the Windows ::LeaveCriticalSection call, which shouldn't block (it's releasing a synchronisation object, not waiting to obtain it) and that I'm getting different total times for different threads, even though all threads are running the entire test.
0 Kudos
3 Replies
Anonymous24
Beginner
91 Views

Jim:

One important note about wait time in the VTune analyzer -check out this online help definition of Self-wait Time:

The call graph calculation of the Self_Wait_Time is based on a heuristic estimation that tracks context switches caused by synchronization events and by other causes.

Note: Windows* 2000 multi-processors support the exact Wait time information collection.

This may help explain what you are seeing.
-dlanders
jimpurbrick
Beginner
91 Views

Thanks.
What this seems to say is that VTune can't tell the difference between blocking and context switching due to scheduling, so while Wait Time should equal blocking time it includes some guess work.
It doesn't explain why I only get wait time on some calls that should be blocking though.
How much can I trust VTune?
Anonymous24
Beginner
91 Views

You probably can't trust it to give you exact timing information, however, the timing information will be relatively correct. That is, the timing numbers for all functions will be representative of the impact, so that call graph will identify which functions are costing the most time. This can point you to where you should focus your optimization efforts.

Just my opinion, :-}
dlanders

Reply