When the sample application exits, the Intel® VTune™ Amplifier finalizes the results and opens the Hotspots by CPU Usage viewpoint where each window or pane is configured to display code regions that consumed a lot of CPU time. To interpret the data on the sample code performance, do the following:
The screenshots and execution time data provided in this tutorial are created on a system with 4 CPU cores. Your data may vary depending on the number and type of CPU cores on your system.
Explore Application-level Performance
Start analysis with the Summary window that opens by default when data collection completes. To interpret the data, hover over the question mark icons to read the pop-up help and better understand what each performance metric means.
Analyze the Most Time-consuming Functions
Analyze the CPU Time column values. This column is marked with a yellow star as the Data of Interest column. It means that the VTune Amplifier uses this type of data for some calculations (for example, filtering, stack contribution, and others). Functions that took most CPU time to execute are listed on top.
Double-click the hotspot function to open the source and identify the most time-critical code lines.
Identify the Hotspot Code Region
By default, when you double-click the hotspot in the Bottom-up pane, the VTune Amplifier opens the source file related to this function. Click the hotspot navigation button to go to the code line that took the most CPU time. For the
NQUEENS_ip_SETQUEEN function, this is the code line that is used to create a local copy of the
queens array to avoid a data race. Click the Source Editor button on the Source window toolbar to open the default code editor and work on optimizing the code.
Depending on the sample code version, your source line numbers may slightly differ from the numbers provided in this tutorial.