After looking at the summary for comparisons we move onto the differences VTune shows to us in the Bottom-up pane. From here we obtain more insight as to how a few simple line changes in the source code can greatly change the wait time of synchronization objects. We go over the before and after wait time columns for both versions, which VTune nicely puts side by side for us to easily compare. We do this for Wait Count and other metrics as well.
- [Instructor] By clicking on the bottom up tab…we can see the comparisons for the critical section,…whereas before for the non optimized version…we saw this long red bar for the critical section,…but with the optimized version…we no longer see that bar.…If we scroll to the right…we can see more differences in the columns.…For the weight count in the non optimized version…the weight count was 509,…but now there is no weight count.…Something similar can be seen for the spin time.…
For the non optimized version…we had a spin time of two seconds,…but with the optimized version…there is no spin time.…There's more columns to the right…that give more information,…but coming back to the critical section…if we click on the drop down arrow…we can see similar results.…Pthread mutex lock once had the red bar,…it no longer has the red bar.…Same thing can be seen for the draw task function,…whereas before it had poor thread concurrency…now there's no longer a thread concurrency.…
Do the same comparisons in your application.…Compare the before verser…
By the end of this course you will know how to use the Locks and Waits analysis on your own application and improve the efficiency of parallel task execution on Windows.
- Installing VTune Amplifier
- Choosing options for the Locks and Waits analysis
- Working with the VTune Amplifier GUI
- Viewing the analysis summary
- Removing the lock
- Conducting lock-removed analysis
- Comparing results