IBM Books

Operation and Use, Volume 2


Using the Profile Visualization Tool

The PVT is a post-mortem analysis tool. It is designed to process profile data files generated by the PCT used in application profiling. For more information on the PCT, refer to Using the Performance Collection Tool. After processing profile data, you can view the results in the PVT's graphical user interface display. You can also generate report and summary files. The PVT provides a command-line interface to process individual profile files directly into a summary file without initializing the graphic display. The command-line interface also enables you to generate textual profile reports. This section begins with a discussion of the PVT's graphical user interface, followed by a description of the command-line interface.

Using the Profile Visualization Tool's Graphical User Interface

The PVT provides a graphical user interface that enables you to process profile data files and view the results. The options available in the graphical user interface correspond to the commands available in the PVT's command-line interface. For more information on the command-line interface, refer to Using the Profile Visualization Tool's Command Line Interface.

Profile Visualization Tool (Graphical User Interface) Overview

The PVT's graphical user interface allows you to process and view profile data. You can load one or more files for processing and view the results in a variety of ways. After initializing the graphical user interface, you can choose the appropriate options:

If: Then:
You wish to load files for processing. Select File > Load....

Doing this opens the Load Files panel. The Load Files panel will enable you to specify what files to load into the tool for processing. You can specify one or more individual profile files, or a summary profile file.

You wish to control the way profile data is presented. Select the View option.

Doing this opens the View menu. The View menu will enable you to specify how profile data is presented in the Main Display window. You can specify how to sort data, as well as show function call count and resource usage.

You wish to view selected objects. Select the Object option.

Doing this opens the Object menu. The Object menu will enable you to view information such as source code, profile data, and statistics reports for selected objects.

You wish to search for a text string. Select File > Find...

Doing this opens the Find panel. The Find panel will enable you to specify the text string for which you want to search.

You wish to generate reports of profile data. Select the Report option.

Doing this opens the Report menu. The Report menu will enable you to select and view a variety of reports, including function call count, CPU usage, and memory usage.

You wish to save summary data to a file. Select File > Save Statistic Summary...

Doing this opens the Save Statistic Summary panel. This panel will enable you to accept a user-specified file name. The statistic summary data of the input profile file or files will be written to the file.

You wish to export profile data to a file. Select File > Export...

Doing this opens the Export panel. This panel will enable you to accept a user-specified file name. The profile data that is currently loaded will be written to the file.

You wish to set user preferences. Select File > Preferences...

Doing this opens the Preferences panel. At this time, this panel will enable you to access only one option: source code search paths. There is a text field available that allows you to specify where the source code files reside.

You wish to exit the PVT. Select File > Exit...

Doing this closes the Main Display window and exits the PVT.

The following sections describe the graphical user interface in greater detail.

Starting the Profile Visualization Tool

You can start the PVT in either graphical-user-interface (GUI) mode or command-line mode. For instructions on starting the PVT in command-line mode, refer to Using the Profile Visualization Tool's Command Line Interface. To start the PVT in graphical-user-interface mode:

Enter the pvt command at the AIX command prompt.

$ pvt

Doing this starts the PVT in graphical-user-interface mode and opens its first window - the Main Display.

To start the PVT in graphical-user-interface mode with input profile data loaded and showing in the Main Display window, enter:

$ pvt one_or_more_file_names

The following figure shows an example of the Main Display window with input profile data loaded.



View figure.

The Main Display window shows a hierarchical list of all the functions being profiled. The window is divided into two panes, the left one for viewing source code structure and the right one for viewing profile data. Each pane has a corresponding menu: the Source View menu and the Data View menu. Both the Source View and Data View menus are grayed out if no input file is loaded. The two panes share the same vertical scroll bar and are scrolled together. You can resize the panes horizontally to change their relative proportion in the Main Display window.

The source code structure pane uses ASCII text to show the identifier of each displayed object. The profile data pane represents a selected profile data field, which uses a bar chart to show the profile data associated with each object. The data value is displayed in front of the bar. When you select an object in the source code structure pane, an object menu opens that provides some actions associated with the selected object. You left-click to select an object, and right-click to bring up the selected object's object menu. When you select an object, the Object menu in the Main Display window will become available also, providing the same functions as the popup object menu.

If you load a summary profile file to start the GUI, process objects are labeled as summary process object in order to distinguish them from the process objects available in an individual profile file. Each function object has a set of statistics records associated with each profile data field.

Following are explanations of the Source View and Data View menus.

Viewing Source Code Structure

The Source View is a drop-down menu with two options: a Thread-Centric View and a Function-Centric View. The same options are available under the View drop-down menu in the Main Display window. See Viewing program variables for more information. If the input file you are loading to start the GUI is a summary file, there will be no thread information in the file. The structure displayed will be the same no matter which view is used.

Viewing Selected Profile Data

The Data View is a drop-down menu that enables you to change the type of data to be shown in the Main Display window. The Data View menu options include the following categories:

You will find similar options available in the View drop-down menu. When a particular data type is unavailable in any of the input data files, its corresponding menu option in the View menu is grayed out. The Data View drop-down menu only shows the options that have corresponding values in the input data files. When a set of files is loaded, Function Call Count is the default field in the Data View menu.

Accessing the Profile Visualization Tool's online help system

The PVT's graphical user interface has been designed to be intuitive and easy to use. However, if you do have any trouble, you can refer to the PVT's online help system. To access the tool's online help, select Help > Contents off the main window's menu bar. Many dialogs of the tool also provide Help buttons or menu items for starting the help system.



View figure.

If you open the help from one of the PVT's dialogs, a help topic describing that dialog is displayed. If you open the help from the main window, a task overview topic is displayed.

The PVT help contains topics for each of the major tasks you can perform with the PVT. The left hand pane of the window enables you to navigate the help system to display the needed help topic in the right hand pane. There are three ways to navigate the help system -- using the contents tab, using the index tab, or using the search tab:



View figure.

Using the Profile Visualization Tool's Command Line Interface

The PVT provides a command-line interface that enables you to process profile files directly without initializing the graphical user interface. The subcommands available in the command-line interface correspond to the options available in the graphical user interface. For more information on the graphical user interface, refer to Using the Profile Visualization Tool's Graphical User Interface.

Profile Visualization Tool (Command Line Interface) Overview

The PVT's command-line interface allows you to process profile data directly without using the graphical user interface. After initializing the command-line interface, you can enter the appropriate subcommands that enable you to:

The following sections describe the command-line interface in greater detail.

Starting the Profile Visualization Tool in Command-Line Mode

To start the PVT in command-line mode, enter:

pvt -c

Doing this starts a command-line session without associated profile data. To start a command-line session with associated profile data, enter:

pvt -c one_or_more_file_names

Once you start a command-line session, the command line prompt changes to pvt> and remains this way until you enter the exit command to end the command-line session.

The following sections describe the command-line mode subcommands.

Loading Files

You can load a set of profile data files into the session with the load command. Enter:

load one_or_more_file_names

If a set of data already exists, then the existing data is discarded and the newly loaded data becomes the current data to be used in future actions.

Creating a Summary File

You can create a summary file of all the loaded data with the sum command. Enter:

sum summary_file_name

The merged summary data is written to the file that you specify in the command, with a suffix of .cdf being appended to the specified file name.

Generating Reports

You can generate textual reports of profile data using the report command. You can specify several different options with the report command, depending on what type of output you want. To show a list of available report types, enter:

report list

The result will look something like:

To generate all the available reports to a file, enter:

report output_file_name

To generate reports by report name to a file, enter:

report "one_or_more_report_names" output_file_name

For example:

report "wclock,ru_cpu" output

To generate reports by report id to a file, enter:

report "one_or_more_report_ids" output_file_name

For example:

report "1,2" output

The report names or report ids in double quotes must be separated by a comma, with no blank space in between. No matter how many reports are selected in one report command, all the reports are output to a single file specified in the report command.

Exporting Files

You can export profile data to a specified file using the export command. Enter:

export output_file_name

A suffix .txt will be appended to the specified file name.

The currently loaded profile data is written to the user-specified file in plain text format, so the data can be loaded easily into a spreadsheet tool like Lotus(R) 1-2-3(R). The data that is loaded into the tool can be grouped into the following types of records:

Exiting the Profile Visualization Tool

You can end a command-line session with the exit command. Enter:

exit


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]