The Exploring the Workspace and GUI section serves as a visual guide to options and related screens. All options that have a separate information section contain links to that section.
The Project Panel opens initially with no projects open. Projects consist of sessions created by using profile configurations and by importing performance data captured using the CodeAnalyst Command Line Utility program (OProfile). Kinds of sessions displayed are TBP (time-based sampling sessions), EBP (event-based sampling sessions), and IBS (Instruction-Based Sampling sessions).
The status bar displays the current operation taking place. For example, while a profile is being collected, the Sampling Sessions Started status bar displays the amount of time left to run in percentages. The status bar displays some of the following examples:
CodeAnalyst provides a menu bar and three toolbars. The toolbars can float in any area of the workspace.
The following sections give descriptions and definitions of menus, tools, and icons available for creating projects, profile actions, and creating configurations.
The commands available in the File menu are shown in the following table. These icons also appear as toolbar group icons that can float or be docked.
Menu Command and Icon |
(Fast Key) |
Description |
---|---|---|
![]() |
(Ctrl+N)
|
Opens a new project. This opens the Project Options dialog box. |
![]() |
(Ctrl+O)
|
Opens an existing project. This opens a dialog box for navigating to CodeAnalyst workspace files. Recently opened projects are listed at the bottom of the File menu. |
![]() |
(Ctrl+O)
|
Saves an open project. |
Export System Data... | Exports the project data to a comma separated value (CSV) formatted file. This action opens the Save As dialog box of file type CSV. | |
Import... | Imports performance data files generated by Oprofile command-line tools. | |
Close | (Ctrl+W) | Closes an open project. |
Quit | (Ctrl+Q) | Closes the application. |
The Profile menu and icons are used to start, pause, and stop data collection. Options are also part of the toolbar in the Profile toolbar group, which includes the profile configuration to be used for collecting performance data.
The commands available for controlling data collection and for selecting the profile configuration are shown in the following table.
Icon | Description |
---|---|
Start ![]() |
Activates the sampling process in the same way as choosing Start from the Sampling menu. This icon is in the active state when a project is open and the sampling process has not yet started |
Pause ![]() |
Suspends the sampling process in the same way as choosing Pause from the Sampling menu. This icon is red in the active state when a project is open and the sampling process is in progress |
Stop ![]() |
Terminates the sampling process in the same way as choosing Stop from the Sampling menu. This icon is red in the active state when a project is open and the sampling process has started or has been paused. |
[profile configurations] | (Second list) Provides a list of pre-defined profile configurations for data collection. The profile configuration determines the performance data to be collected (time-based, event-based, etc.). The list changes according to which mode is selected. See Configuring Profile Data Collection for more details. |
The Tools menu contains icons for modifying project options for the current project and application-level CodeAnalyst options. These icons also appear as toolbar group icons that float or can be docked. As the last illustration shows, the Session Settings icon is not active unless a session is opened.
The following table summarizes the Tools menu items and associated toolbar icons. Hovering the mouse over the icon displays the name as indicated in parentheses. Links under "Menu Command" go to the corresponding section for more information. The rollover text is included to assist with similar naming conventions used.
Menu Command |
Icon (Rollover)
|
Description |
---|---|---|
Session Settings |
(Settings) |
Use this icon to change the sessions settings (e.g., time-based and event-based). |
CodeAnalyst Options... |
![]() |
Opens the CodeAnalyst Options dialog box. All of the application level configuration options can be changed. |
Configuration Management |
(Configuration) |
Profile configurations determine how performance data is collected. Profiles configurations can be defined by the user or predefined configurations can be selected. For more information, see Configuring Profile Data Collection. |
View Management |
(View Management) |
A "view" consists of a set of event data and computed performance measurements displayed together in a table or a graph. Use View Management to open the View Configuration dialog box and to change the contents displayed in the view. Exchange content from the Available Data list and the Column shown list. Items in the Column Shown list appear in the View Management window. Some views have prerequisites that must be met before they can be selected from the available data list. For more information, see View Configurations. The Manage button opens the view management dialog for the currently selected view. |
Diff Session |
(Diff Session) |
Opens the Diff Session Dialog where users can choose any two sessions in the project to differentiate (diff) data in sessions using the AMD DiffAnalyst tool. For detailed instructions using the tool, refer to the included document, AMD DiffAnanlyst for Linux, order# 45919. |
The Windows menu controls the display attributes of the Data window. These icons become active once more than one session is open in the work area.
Menu Command | Description |
---|---|
Cascade | Displays open windows as overlapping and cascading downward from the upper left area of the work area. |
Tile | Displays the open windows in a non-overlapping, tiled fashion. |
Close All | Closes all open windows. |
Session [ ] | Displays open windows. A check mark indicates the current window with focus. Each session is assigned a number and extension to differentiate between sessions with the same name File extensions further define the file as timer-based (.tbp), event-based (.ebp), or as a session imported from OProfile (import.tbp) |
When two or more sessions are open, session panes can be cascaded. Following are examples of cascading panes.
When two or more sessions are open, session panes can be tiled for viewing more than one pane at a time. Following are examples of tiled panes.
The Help menu displays the following.
The commands available in the Help menu are:
Menu Command | Description |
---|---|
About F1 | Displays the application flash screen and the version information. |
Contents | Displays the online help file. |
Index | Displays an index of the online help file. |
System Info | Displays the System Information dialog box and reports system characteristics such as processor model, operating system version, memory characteristics, and video resolution. |
The CodeAnalyst tools consist of menu items and corresponding icons or drop-down lists. Most menu items and icons are not active until after a session is opened (or a profile session is running), as the following illustrations show.
Toolbar groups have the ability to be floated or docked in the
workspace. Drag and drop a toolbar group using the grip
located to the left of
the group. Drag into the work area until the border darkens, and
release. The toolbar displays its group name in a header. Double-click
on the toolbar name to automatically return it to the toolbar area. To
replace in original position, drag and realign the group until the
shape changes (elongates) and then release the mouse. Following are
examples of toolbars being docked and floated.
Any single icon or groups of icons that include the grip bar
can be moved around the
work area. This includes tools found only on specific tab windows.
Beginning with CodeAnalyst 2.6, new user interface elements are available, located above the tabbed panels. Results are shown in the form of data tables, graphs, and annotated source code. The main window opens with no data. Once a profile (data collection) configuration has been selected from the drop-down list and data has been collected, results are displayed. The time-based and event-based sampling session window each contain three initial tabbed panels:
Additional interface elements are available. A drop-down list of preset views allows quick selection of a new view. A view is a set of event data and computed performance measurements that display together in a table or a graph. The All Data view is the default view, which shows all available data in columns. Each column represents a distinct type of data or a computed performance measurement. Use the View management dialog box to change view configurations.
Source code is organized to allow for drilling down at the source level using an expandable tree of functions. The source for the selected function is displayed while all other functions are hidden. The source functions are viewed using the + sign and are hidden using the - sign.
The System Data tab lists the modules and sample counts in descending sample count order. For multiprocessor systems, samples are shown for each processor. The 64-bit column distinguishes if samples are 32-bit modules or 64-bit modules. The System Graph tab displays a graphical view of the system data samples.
Double-click on a module name to drill down to a view of the TBP or EBP samples in a specific module.
The System Graph tab provides a visual display of the sample counts per module in a horizontal bar graph in descending order of sample count. This view provides a quick view of the most processor intensive modules. Multiprocessor systems can show events for each processor (see following figure) or a cumulative bar for each event. Double-click on a module to drill down to the TBP or EBP samples within the selected module.
The System Tasks tab displays the task name, total samples and percentage, and single (or multi-core) events. Double-clicking on a module drills down to the TBP or EBP samples within the selected module. Each column has an up/down arrow for sorting the column in ascending or descending order.
The Single Module Data tab drills down into a single module. It illustrates how the data samples are distributed within a module. Like the System Data tab, this view shows the distribution of samples per processor in a multiprocessor system and between 32-bit and 64-bit modules in a 64-bit system (64-bit column). The data samples can be expanded and collapsed around the available symbols. Right-clicking on an address will bring up a choice of viewing the information in a graph view. If debug information is available, double-clicking on an address navigates to the Source View. If debug information is not available, double-clicking on an address navigates to the Assembly View.
The Single Module Graph tab provides a view of the sample distribution within a single module. Right-click for a choice to navigate back to the Single Module Data View. If debug information is available, double-clicking will navigate to the Source View. Otherwise, double-clicking will navigate to the Assembly View.
The Profiling Session Source tab displays the source with the sample count for each source line. The source line can be expanded or collapsed to show or hide the assembly instructions that are associated with the source line. Right-click to select copy the selection to a buffer (the clipboard). The information may then be pasted into another document.
The Assembly tab displays the assembly instructions around an address selected from the Single Module View.
When selecting multiple instructions on the Assembly tab, AMD CodeAnalyst displays a summary of the selection in the status bar of the Assembly window.
The sample summary is also available for the source level.
Press the Page Up and Page Down to view 200 bytes above or below the highlighted instruction.
In Disassembly View, each basic block is shown by interleaving different background colors of white and gray. Users can navigate through code execution paths from one basic block to the previous or the next basic block. Right-clicking at the beginning of a basic block, opens a menu that lists the source addresses that are usually the destination address of a control transfer instruction in some basic blocks. Right-click at the end of a basic block to open a list with the destination address of the control transfer instruction (see previous figure).
Selecting "Show code density chart" under Tools > CodeAnalyst Options > Toolbars displays a code density chart on the Assembly (asm) tab and on the Source View tab. The chart on the asm tab shows the number of samples relative to the location within the module, function, a user-specified area, or the currently shown assembly. The chart for the Source View tab shows the number of samples relative to the source lines in the whole source file, function, a defined region, or the currently shown source. The initial zoom level is at the function level and can also be shown at module, partial, and current view.
A drop-down list provides choices for selecting code density.
The following example is for an assembly view with Current samples displayed.
The GUI provides interface elements on certain session tabs to control the display and use of Task and the aggregation/separation of data by task.
Task can be shown in the System Data view. Use the check box Separate Task in View Management to display or hide task name. A drop-down list also appears to allow faster access to specific task. Tasks may be selected separately or all tasks may be shown by selecting All.
The following illustration shows task name displayed.
The Open (project) dialog box is opened by choosing File > Open, or clicking the Open icon on the File toolbar. This dialog box opens a CodeAnalyst Workspace file (*.caw) by default.
The Session Settings dialog box sets and supports changes to the most basic and essential session parameters. Additional options are available using the Hide Options <<< or Show Options >>> buttons that hide or reveal extended settings. Refer to Session Settings for how to set up a session.
|
The Edit button is located in two dialog boxes:
Clicking Edit opens the "Edit Event Configuration" dialog box. For details on using the dialog box, read Edit Event Configuration.
The View Management dialog box allows customization of views. After performance data is collected (or imported), it is managed as a pool of available performance data. A CodeAnalyst view specifies the kinds of data to be displayed. This feature allows users to choose and focus on performance information that is the most relevant to the issue under investigation. For further explanation, refer to Viewing Results.
There are two types of View Management dialog: methods:
For details using this dialog box, go to View Management.
Performance data collection is controlled by profile configurations. A profile configuration specifies basic run control parameters, types of data to collect, and how data is to be collected. Certain configurations can be "managed" by the user to create new profile configurations. Specifications for basic run control, types of data collected, and how data is to be collected are determined through the configuration's profile. Predefined profile configurations and user-defined profile configurations are found in the Configuration Management dialog box or in the toolbar list of profile configurations.
Configuration management allows for customizing existing profiles and for creating new ones. Configurations for both profiles and views are stored in .xml files when CodeAnalyst is not running. Saving in this manner allows for easy sharing of files. Each user-created configuration is permanently stored as an .xml file until it is removed by using the Remove button. See Modifying a Profile Configuration for additional details.
Use the Configuration icon to open the dialog box.
The profile configuration list contains three "Current" configurations (Current time-based profile, Current event-based profile, Current instruction-based profile). These configurations are considered as appropriate starting points for customization. See Modifying a Profile Configuration for detailed information.
The CodeAnalyst options dialog box has tabs for setting the following options.
For details on using this dialog box, to to CodeAnalyst Options.
Specific colors are assigned to the bars in graphs to designated processors and events. The color key is located at the bottom of the System Graph tab. The following example shows the color key, event-based profile. Right-click in this area to open the list of samples.
Right-click on a box in the color key to obtain a pop-up menu. Select Manage Colors from the menu in order to change the color. A color selection drop-down list displays
The drop-down list contains the names of the events or processors in the graph. Choose a name from the list and click the color block to change the color for a particular graph element. Following is an example list.
Double-click on the color bar to the right of the list to open the color palette.
Profiling of Java applications is supported. A session is created to hold the performance data. Users can view the samples at the function, source, or assembly level. IBM and Sun versions of the Java Virtual Machine (JVM) are supported.
To profile Java applications
To launch the Java application from within AMD CodeAnalyst:
Example: "/usr/bin/java" -agentpath:/usr/local/bin/libCAJVMTIA.so example1, where example1.class is in your working directory.