Analyze Code

You identified multiply1 as the hottest function. In the Bottom-up window, double-click this function to open the Source window and view the source code and event distribution:

The table below explains some of the features available in the Source window when viewing Advanced Hotspots analysis data.

1

Source pane displaying the source code of the application if the function symbol information is available. The beginning of the function is highlighted. The source code in the Source pane is not editable.

If the function symbol information is not available, the Assembly pane opens, displaying assembler instructions for the selected hotspot function. To enable the Source pane, make sure to build the target properly.

2

Processor time attributed to a particular code line. If the hotspot is a system function, its time, by default, is attributed to the user function that called this system function.

3

Source window toolbar. Use the hotspot navigation buttons to switch between most performance-critical code lines. Hotspot navigation is based on the metric column selected as a Data of Interest. For the Advanced Hotspots analysis, this is CPU Time. Use the Source/Assembly buttons to toggle the Source/Assembly panes (if both of them are available) on/off.

4

Heat map markers to quickly identify performance-critical code lines (hotspots). The bright blue markers indicate hot lines for the function you selected for analysis. Light blue markers indicate hot lines for other functions. Scroll to a marker to locate the hot code lines it identifies.

Click the hotspot navigation button to go to the code line that has the highest Effective CPU Time. In the Source pane for the multiply1 function, you see that VTune Amplifier highlights the code section that multiplies matrix elements in the loop but ineffectively accesses the memory. Focus on this section and try to reduce memory issues.

Key Terms

Next Step

Tune Algorithms

For more complete information about compiler optimizations, see our Optimization Notice.