Intel VTune Performance Analyzer

Today I had a chance to practice with Intel VTune Performance Analyzer (7.1).
It made a good impression on me basically because I was able to find the problem in my code quickly without any prior user experience.

Initially I created new project and set up the debug version of my Highlighter application for instrumentation.
It took about 10 seconds to instrument my 9Kb executable.

In VTune the first run has default time of 20 seconds in which a lot of information is being collected.
During first run the average Processor Time was calculated as 39.922%.
The profiler automatically loaded all application symbols and I saw the sampling results:

Sampling view 1: processes

I double clicked on the Saver.exe graph and it showed me function level clockticks. Very nice:

Sampling view 2: modules

Another double click on any function name reveals clockticks at source code level.
The interface is quite convenient.
It is possible to see the source code or mixed source and disassembly layers.

Sampling view 3: code
Click here to see in full size

After just a few minutes I noticed that my_CopyMemory is called inefficiently.
There is no any need to copy the entire scene after each transformation thus only updated pixels should be copied.

I changed the source code a little and launched VTune again.
Processor time decreased to 35.938% and the clockticks were reported accordingly:

After some tuning

In summation I liked playing with VTune. Among other features I liked the system wide analysis, which allowed me
to see how frequently the different system libraries are used by all processes.
Free evaluation copy of Intel VTune Performance Analyzer is available on intel.com website.

By the way the Highlighter Screen Saver code was updated.

Leave a Reply