1. If you have not done so already, select your Java virtual machine (JVM) in the JVM tab of the Preferences dialog box.
2. Open the Run Program dialog box.
3. Select the Memory profiling data button.
4. In Program name, click to select the name of the program you want to profile. Purify enters the following information in the Run Program dialog box:
Program name |
The name of a viewer program for the JVM you specified in the Preferences dialog box, for example; java.exe, or appletviewer.exe. |
Command-line arguments |
Any switches or options for the viewer, followed by the name of the program you selected. |
Working directory |
The working directory to use for the current run. |
5. Specify the working directory to use for the current run.
6. Click Settings to specify settings for this and future runs of the program. If you want to view object details, in the PowerCheck tab, make sure Generate Object Reference Graph data is selected.
7. Click Run. Purify will launch your program and begin collecting memory usage data. As your program runs, Purify shows run (thread) status and a memory allocation graph in a Data Browser window.
Notes:
§ For information about configuring your Java Runtime Environment for PurifyPlus, click .
§ By default, Purify does not collect detailed object data. To collect and view detailed object data, in the PowerCheck tab in the Settings for <exename> dialog box, select Generate Object Reference Graph data.
§ To profile code launched from a container program, click in Program name to select the container program you want to use, then type any switches or options required for the container program, followed by the full path and filename of your Java program in Command-line arguments. For a list of options you can type into the dialog box, click
.
§ You can also drag and drop a Java program, jar file, or class file, or an HTML file onto the memory profiling main window to start profiling the code.
§ To rerun the same program with the same settings, select File > Run Again or click
§ To stop profiling, select File > Cancel Run or click
§ In the Navigator, each aggregate run , snapshot,
and diff
entry represents a separate dataset which Purify keeps in memory until you either close the run, snapshot, or diff, or exit Purify. Since you normally use snapshots and diffs to perform your data analysis, you can conserve Purify memory by discarding the unneeded run datasets. Use the Workspace tab in the Preferences dialog box to change the default to automatically discard the aggregate run dataset after each program run.
§ If you want to conserve Purify memory but don't want to have Purify automatically discard the aggregate run datasets, you can discard them manually by double-clicking a run in the Navigator and selecting File > Close, or right-clicking the entry and selecting Close from the shortcut menu.
(C) Copyright IBM Corporation 1992, 2010.