Immediately we saw a cut down in execution time for our demo app, but let's really see all the benefits gained from removing two simple code lines. We open up VTune and perform another Locks and Waits analysis, but this time on our new optimized version. We quickly go through the analysis setup for the new version.
- [Narrator] Let's reanalyze the application…to see if the changes we made have any performance benefits.…To do this, let's right-click on the analyze_locks…Visual Studio project.…And let's scroll down to the Intel Vtune Amplifier,…and select, New Analysis.…The project properties will come up…and let's make sure we have Locks and Waits selected.…We're going to leave everything else to default.…And, then let's click Start.…Vtune will launch the application…and visually we can see…an immediate change in the execution time.…
It is much faster.…Once the results are finalized…we're brought to the summary page, where we can already see…a shorter Elapsed Time, a shorter Spin Time…and a shorter CPU Time.…Another key difference is,…if we go to the Top Waiting Objects section,…Critical Section is no longer at the top.…The Wait Count is much less and the Wait Time is much less.…
Scrolling down to the Thread Concurrency Histogram,…it looks like there's not that many changes.…But, this is a 40 core system,…so if you look really closely,…
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