TOC PREV NEXT INDEX

7 Other features

This chapter includes the following sections:

· Controlling the test program
· Generating a snapshot of the current profiling
· Opening a snapshot
· Exporting data
· Viewing source code
· Creating filters
· Displaying OptimizeIt console messages
· Find panel

7.1 Controlling the test program

The OptimizeIt toolbar provides the following buttons to control the test program. These buttons can be used from any mode:

Starts or resumes the test program. This control is red when the test program is running.

Pauses or resumes the test program. Use this button when it is necessary to freeze the flow of incoming data in the memory profiler to study some specific results more closely.

Stops the test program. The test virtual machine exits.

Forces the garbage collector to act immediately.

7.2 Generating a snapshot for the current profiling session

At any time during the profiling, OptimizeIt allows you to save the profiling data into a snapshot. You can then reload the snapshot later for further analysis or for performance comparisons.

To generate a snapshot choose Generate Snapshot from the File menu.

The following table describes each option:

Option Description
Directory Indicates the directory where the snapshot is created.
Name

The filename of the snapshot.

Include CPU profiler data Indicates whether or not the CPU profiling information should be included. Note: Generating a snapshot with this option stops the CPU profiler.
If the CPU profiler is not running, this option has no effect
Include memory profiler data Indicates whether or not the memory profiler information (heap mode and backtrace mode) should be stored. Note: The amount of data to be stored for the reference mode is important. The snapshots generated with this option are larger files and take more time to be generated. Only select this option when you really need the reference mode information.
Comments Contains other information, such as addition text to distinguish this snapshot from others.

Note: The data of the virtual machine information mode is not stored in the snapshot.

7.3 Opening a snapshot

OptimizeIt works the same way with snapshots as when profiling an application. Nevertheless, there are several restrictions that you should be aware of when you open a snapshot:

· the Virtual Machine Information mode is not available
· the console shows information about the opened snapshot (date of generation, host were it was generated, user that generated it, comments)
· the inspectors are disabled

To open a snapshot, choose Open a snapshot from the File menu. Select a snapshot and click open. OptimizeIt opens the snapshot and you can browse the profiling information of the snapshot.

7.4 Exporting data

OptimizeIt can export profile data as ASCII, HTML, or easy-to-parse ASCII. After the data is exported it can be printed, compared and archived.

To export the contents of a screen, choose Export Data from the File menu. You can also click the Export Data button.

The Export Data dialog box provides options to set the content and format of the data exported:

The following table describes each option:

Option Description
Export Enumerates all data types that you can export from the current context. Use it to select the data to export.
Export as

Specifies the output of the file format. Select HTML to produce an HTML document that presents data in the same format as the Optimizeit views. Select ASCII for a more compact file. Select Importable ASCII if you expect to use the output as input to another tool.

Filename Indicates the full path name of the file created.
Title Contains a description inserted at the top of the exported document.
Comments Contains other information, such as additional text to distinguish this profile from others.

After exporting data in the specified filename, OptimizeIt opens the file with the corresponding editor or web browser.

7.5 Viewing source code

When available, OptimizeIt can display the source code corresponding to a selection in any of the OptimizeIt windows.

To view source code

Double-click the object or instance in the OptimizeIt window.

You can also click the Show Source Code button .

OptimizeIt opens a separate window displaying the source code responsible for the allocation or definition of the selected object.

The following screen shot shows the source code viewer:

The relevant lines of code are highlighted in yellow. If more than one line of code is highlighted, use the small arrow buttons to automatically scroll to the next relevant line of code.

If the Java file is not found, the source code viewer provides a button that allows you to browse the file system to retrieve the file. Once the file is loaded, OptimizeIt prompts you to store the source file location in the default source path, so any Java file in the same package is immediately available.

7.6 Creating filters

Although OptimizeIt provides several filters which are ready to use, it is also possible to create your own filters, see "Profiling with filters" on chapter 3.10 for some information about using filters.

To create a new filter

1. Select Settings from the File menu.
2. Switch to the filter section by clicking the Filters tab.
3. Click the New button.
4. Enter the name of your filter in the name textfield.
5. Select "any of the following patterns" if you want to perform a logic OR between the different patterns of your filter, or select "all of the following patterns" if you want to perform a logic AND between the different patterns of your filter.
6. To add a pattern, click the Add button, then enter your pattern in the pattern editor. Note that both the asterisk wildcard character (*) and the not (!) are supported. Your pattern can define packages, classes or methods. When you are done with this pattern click OK.
7. To change a pattern, select the pattern in the list and click the Edit button.
8. To delete a pattern, select the pattern in the list then click the Delete button.
9. When you have finished with your filter, click OK. Notice that your filter appears at the end of the filter list. User filter names are written with bold letters, OptimizeIt filter names are written with normal letters.
10. Once you have created a filter, click on the corresponding column to enable it for the CPU profiler or the memory profiler.

Custom filters are part of OptimizeIt configuration files. They are saved and loaded when using Save and Open commands from the File menu.

7.7 Displaying OptimizeIt console messages

The purpose of the console is to print audit system-specific messages as well as the test program standard output and standard error. Use the console to read messages from the test program or to see errors if the Java program does not start.

Note: If you select the option "Open a console" in the start options, the standard output and the standard error of the test program won't be redirected to the OptimizeIt console.

7.8 Find panel

In any view, you can find the information you are looking for by using the find panel. The find panel is accessible from the edit menu.

Note: Sometimes the list or graph in which the search occurs does not have all the information required for the search. When this happens, the find panel displays "Fetching data..." in its status field. Once the data is fetched, the search occurs.

Intuitive Systems
http://www.optimizeit.com
optimizeit@intuisys.com
TOC PREV NEXT INDEX