Viewing Data from the Survey Tool

The Survey tool runs and watches your running serial program's target executable. After it analyzes (profiles) your target's execution, it displays the Survey Report window to help you choose possible (candidate) places to add parallelism.

Use the Intel Advisor Survey tool to measure where your program's target spends its time. This tool displays the collected data in an expanded top-down call tree that includes loops. If you recently used a different profile tool and already know where your target spends its time, you can use the Survey tool's report to quickly verify the results from the other profile tool and use the Survey Report window to help you identify the hot part of the call tree.

When a target executes for a very short duration, it may not be possible for the Survey tool to collect sufficient data to provide a Survey Report. In this case, a message appears instead (click the link for the Troubleshooting Survey Tool ... help topic listed below under See Also).

If the target was not built with debug information, a message appears at the top of the Survey Report (click the link for the Troubleshooting Debug Information Not Available help topic listed below under See Also).

if the Survey tool detects that the target does not contain debug information, the top part of the Survey Report contains a message Some target modules do not contain debug information. In this case, click the link for the Troubleshooting Debug Information Not Available help topic listed below under See Also.

Using the Survey Report Window

Once data collection completes, data appears in the Survey Report window. In addition to the Survey Report window, you can view details in the Survey Source window.

The Survey Report window displays a top-down extended call tree of your target's loops and function calls. Each function or loop appears on a separate line. When a function calls itself, each nested call will appear on a separate line. You can click the icon next to a function to show the functions and loops it calls (invoked within it).

Loops are identified with an icon, the word [loop, followed by the source location and the function or procedure name that executes it. The top five loops that consume significant CPU time are identified by a checkmark in the Hot Loops column. With large applications, examine other loops or functions that also consume significant CPU time.

The extended call tree resembles a tree's branches, where main() is the base of the tree's main trunk. The primary branches are called call chains (such as function A calls B, function B calls C, and function C calls D). The Survey Report shows the hottest call chains at the top. The same function or loop may appear in multiple call chains if multiple functions call that function or loop and it uses sufficient CPU time.

To view details about a specific function or loop, view its corresponding source location in the:

Survey Source window

Double-click its line, or right-click and select View Source from the context menu. To return to the Survey Report window, click Survey Report.

Code editor

Right-click its line and select Edit Source from the context menu to open the corresponding source file in a code editor. When using Visual Studio, the Visual Studio code editor appears with the file open at the corresponding location. When using the Intel Advisor GUI, the file type association (or Open With dialog box) determines the editor used.

To return to the Survey Report or Survey Source window:

  1. Click the Result tab.

  2. Click either Survey Report or Survey Source.

The Self Time column shows the CPU time used by that function or loop. The Total Time shows the CPU time used by a function or loop, and all called functions. The Total Time % shows the Total Time as a percentage of the program's total execution time.

Focus on call and loop chains with high Total Time values. They will lead to functions or loops with significant Self Time values. Code locations along such call chains are often good candidates for parallelism - see Tips on Understanding the Survey Report and Survey Source Windows below.

Note

If a loop or function already uses parallelism, the Total Time is the sum of the CPU time for all threads (see Using Partially Parallel Programs with Intel Advisor Tools). However, some of that time will be added to the Total Time of the parallel framework run-time system entry points, instead of to the caller(s) in the thread that entered the parallel region.

Copying Annotation Code Snippets and Build Settings

The bottom of the Survey tool windows provide an annotation assistant that lets you copy annotation code snippets and build settings that you can paste into your code editor. Select the topic to be viewed and copied from the drop-down list.

For instructions, see the help topic Copying Annotations and Build Settings Using the Annotation Assistant Pane.

Using the Survey Source Window

Within the Survey Source window, you can:

  • View the Total Time next to a statement line. This shows the measured time executing this statement and all functions called from it.

  • View the Loop Time column next to a the loop header or one of the statements in the loop. This shows the Total Time for all the statements executed in this loop.

  • Double-click a line, or right-click and select Edit Source, to open the corresponding source file in a code editor. When using Visual Studio, the Visual Studio code editor appears with the file open at the corresponding location. When using the Intel Advisor GUI, the file type association (or Open With dialog box) determines the editor used. To return to the Result tab, click Result.

  • Click Survey Report to return to the Survey Report window.

The Survey Report , Survey Source, and other Intel Advisor windows appear within the Result tab. There is one Result tab for each startup project.

Tips on Understanding the Survey Report and Survey Source Windows

Use the Survey Source window to help you decide where to place Intel Advisor annotations that mark parallel sites and their tasks to the Intel Advisor Suitability and Correctness tools.

To minimize your program target's run time, focus your attention on where it spends its time. With serial optimization, you focus your attention on the hotspot and try to make code in the hotspot run as fast as possible. With parallel execution, you try to distribute the work done in the hotspot to as many tasks as possible at or above the hotspot's location in the call chain.

Start by examining the call chains near the top of the Survey Report, because they have the highest Total Time and will lead to hotspots with high Self Time values. If you look from the top down, you may see places where multiple hotspots are present and at some function or loop the Total Time decreases a lot. A good candidate parallel code region might be just above this location because it covers more Total Time.

To reduce your program's run-time, identify the statements in these code regions that can run in parallel as multiple parallel tasks. Loops along the call chain are usually the easiest locations to parallelize as tasks (this is why the Survey Report shows loops as well as functions). Locations closer to the main entry point in the call tree are usually better candidates because they often provide better scalability.

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