Exploring the Workspace and GUI

The New Diff Session Wizard is the first step in generating a session. The wizard can be accessed by one of the following steps:

New Diff Session Wizard and Dialog

Once the New Diff Session Wizard is open, create a Diff session name. This name identifies each diff session because multiple diff sessions can be viewed at a time.

Next, specify a mode of operation. A mode description displays when the mode is selected. Available modes are:

CodeAnalyst Profile Diff Mode

This mode compares any AMD CodeAnalyst tool profiling output (.tbp or .ebp file). Use the Browse button to open a file navigation dialog to select a .tbp or .ebp file. Once a .tbp or .ebp file is selected, a list of available tasks (application processes) displays. Use the list to choose a particular task or all tasks. The list of available modules update accordingly. When done, click Add to add the current selection to the Diff Session Summary list. Use Edit or Remove to manipulate the list. Once two profiling sessions are selected, click Finish to generate the specified diff session.

This mode compares any binary files without profiling data, but this mode is not yet available.

Symbol Diff View

Symbol Diff View displays functions using their symbol names. Names display in the “Symbols” column when the function contains samples. The following figure shows an example of Symbol Diff view.

Each row represents a symbol. Each symbol has two address columns (white text with green background) showing symbol address associated with each module.   Performance data sets are shown in two groups differentiated by color (black text with white background and black text with gray back ground).

This view shows the symbol only if the function contains samples. For example, function main() does not contain any samples and is not shown here. Also, if a symbol is only present in one module, Symbol Diff View displays it but leaves the other module blank.

Cells with white text and red background contain the maximum value within the column, helping to identify hot spots of each performance event.

Symbol Diff View Toolbar

The Symbol Diff view toolbar contains the following icons and options for viewing:

 Left-Right ViewThis view groups performance data of each profiling session together (see previous figure).

 Side-by-Side View—This view groups each performance event from each profiling session together (see following figure).

 Delta View—This view shows the delta value of each performance event from each profiling session.

 Separated-by CPUs—This option shows samples of performance events collected separately on each CPU.                                  

 Show Percentage—This option shows sample percentage of each symbol with respect to the number of samples within this module for a particular performance event.

 Aggregate Samples into In-line Function—When the module contains in-line functions, this option aggregates samples into the original in-line function instead of the caller function.

In each in-line function, samples are separated into a different in-line instance.

In session 1 (right), multiply_ matrices () is declared as in-line function, and called by main().   Therefore, the samples that belong to the function multiply_ matrices () becomes part of main().

In session 1 (right), the last item in the list shows the in-line instance of function multiply_ matrices () inside main().

Merge Symbol

Different compilers usually have different symbol naming conventions. When compiling an application with different compilers, output binaries often contain functions with mismatched symbol names. This mismatching affects the Symbol Diff view because the tool tries to match symbols using the fully-qualified symbol name. In this case, a single symbol may be shown as two different symbols.

The Symbol Diff view tries to account for most of these scenarios in its symbol name-matching algorithm. However, if this problem continues, the user can manually merge the entries of the symbols. Select any two symbols, right-click, and select Merge symbol data.  The data of selected symbols merge into one entry in the Symbol Diff view.

Disassembly Diff View

The DiffAnalyst disassembly diff view is a docked window consisting of two separate lists for viewing disassembly of the function pair. To open to this view, double-click any entry in Symbol Diff view. This docked window can be moved or undocked. It can also be hidden by closing (X) or clear the check box for the option under Tools > Show Dasm Diff View.

The first level of each list contains basic block information sorted by address (in black text with white background). The Basic Block / Disassembly column displays a section of code that represents a serialized execution path, which does not contain any kinds of control transfer instruction (i.e., jump or call.). The beginning of a basic block is usually the destination of a single/multiple control transfer instruction with the ending a control transfer instruction.

Each basic block is denoted using an address range notation. For example, “[0x400875, 0x4008c7)” means the basic block starts from address 0x400874 to 0x4008c6.   Each basic block expands to reveal the contained disassembly instructions (displayed in blue text with white background).

Disassembly Diff View Toolbar

This option displays the Disassembly Diff View toolbar which contains various options for the view. Available options are:

 Show/Hide Code Byte—Toggles to show or hide a code byte column.

 Show In-line Instance—Toggles to show or hide the in-line function name column.  In-line instances are shown in red text with white background.

 Show Load/Store Statistics—Toggles to show or hide the load or store statistics column.

 Expand/Collapse All Basic Block—Expands or collapses all basic block in both disassembly lists.

 Synchronize Disassembly View—Allows for synchronizing (locking) scrolling actions.   If left and right basic blocks are aligned, expand/collapse actions are also synchronized.

 Highlight Difference within Basic Block—Compares disassembly instructions within the selected basic blocks in each list.

 Show Percentage Combo Box—Combo box selection of what type of information displays in each performance event column.   The available options are:

View Management Dialog

View Management dialog allows for the customization of the performance events being shown.   Each view is specific to hardware platforms and performance events available in each profiling session.   A set of predefined views are provided for user’s convenience.

The View Management dialog contains two tabs—Edit View and View Selection—as shown in the following example.

Edit View Tab

The Edit View tab allows users to customize the set of performance events to be shown in each view. Users begin by selecting a Platform name, which updates the View name combo box with available views for the selected platform. Users can use the right-arrow button to remove, and left-arrow button to add or delete performance events between the Available data and Columns shown lists.

View Selection Tab

The View Selection tab manages view selection of each profiling session to be compared. The user selects a profiling session from the View Configuration Selection list and uses the View Name combo box to choose the view of interest.

Property View

Property View is a docked window that contains a list of currently viewed profiling sessions.

This dock window can be moved or undocked.   It can also be hidden by closing (X) or clearing the check box for the option under Tools > Show Property View.

Properties shown are profiling session files, task names, and module names.