Using the Memory Statistics view

The Memory Statistics views displays statistics about the application heap. It provides detailed information such as the number of classes loaded, the number of instances that are alive, and the memory size allocated by every class. Memory statistics are available at the package, class, and instance level.

The Memory Statistics view provides a number of controls to allow you to manipulate the information shown within the view:

Working with display modes

There are three display modes are available based on the three object types: packages, classes, and instances.

  1. To switch between the package, class, and instance modes, select one of the following toolbar controls:
  2. The data values displayed can also be shown as percentages. To display the data as percentages, select Show as Percentage % in the toolbar.

The data displayed depends what object type is selected. The following table summarizes the data available in each display mode.

Column heading Package statistics 
Icon for package
Class statistics
Icon for package
Instance statistics
Icon for package
Total Instances: The total number of instances that had been created of the selected package, class, or method. Accumulated by package Accumulated by class Count
Live Instances: The number of instances of the selected package, class, or method, where no garbage collection has taken place. Accumulated by package Accumulated by class Count
Collected: The number of instances of the selected package, class, or method, that were removed during garbage collection. Accumulated by package Accumulated by class Count
Total Size: The total size (in bytes) of the selected package, class, or method, of all instances that were created for it, including whatever has been removed through garbage collection. Accumulated by package Accumulated by class Size
Active Size: The summed size of all live instances.  Accumulated by package Accumulated by class Size

Note: The totals shown in this view represent only the data that has been collected since you started monitoring your process. If you start monitoring your process half way through the execution, you will only see the totals from the point that you started monitoring. As well, in the package mode, only the totals of the collected classes for that package are shown. Classes that you have filtered out will not be included in the totals.

Note: In order for instance level data to be shown for the active size and collected columns in the Memory Statistics view, instance level data must be collected for the Time Analysis profiling type. To collect instance level data, you must perform the following actions on the Profiling Types page for your profiling set:

  1. In the left hand pane, select the check boxes for Memory Analysis > Basic Memory Analysis and Time Analysis > Execution Time Analysis.
  2. Under Execution Time Analysis, select the Show execution flow graphical details radio button, then click the Advanced >> button and choose Collect instance level information.

For information on how to access the Profiling Types page for a profiling set, see the following tutorial: Analyzing the profiling data from a Java process.

Working with columns

There are different controls available that allow you to manipulate the columns displayed in this view.

  1. To specify which columns to display in the view, select the Choose Column Choose column icon button in the toolbar.
  2. In the Choose Columns dialog, select the columns that you want displayed in the view. Click OK to apply the changes.
  3. To show the change in each numeric column since the last refresh, select Show Delta Columns Show Delta icon in the toolbar.
  4. To sort column data, click the title of a column. Click the title of the column again to sort it in reverse order. The title of the column is prefixed with > if the column is sorted in ascending order or with < if it is sorted in descending order.

Filtering profiling data

The Memory Statistics view provides a filter mechanism which allows you to reduce the amount of data shown in the view. Profiling filters can be used across different profiling views as long as the view supports the filter.

  1. To work with filters, from the toolbar menu, select Manage Filters Filter icon.
  2. To add a new filter, select New.
  3. In the Edit Filters dialog, select Profiling Filter and click OK.
  4. Define your filter by using one or both of the Filter mechanisms on the two tabs: Standard or Advanced. The Standard tab lets you quickly set some simple, common filters. The Advanced tab lets you create highly customized filters.
  5. To define a standard filter:
    1. To filter out data that matches a pattern, specify a string pattern in the Filter String field.
    2. Select the object type to filter by, i.e. fitler by package, class or method.
    3. Click the Show information matching check box if you want only a specific set of data. Use the drop-down boxes to define the filter. In the example below, the filter is specified to show the highest 10 entries by the number of calls.
      basic filter
  6. To define an advanced filter:
    1. Click the Advanced tab. The Advanced filtering table shows all the filter criteria defined. Profiling data entries that match one or more of the criteria will be filtered out of the view.
    2. To add an entry in the table, click Add. Select the attribute you want to filter on from Attribute list. Select the operator (like performs a pattern match). Enter a value that profiling data entry must have for that attribute in order to be filtered:
      • Use an asterisk (*) to represent any string.
      • Use a bar (|) to represent a non-exclusive "or".
    3. Click OK.

    4. To edit an existing entry, select it, click Edit and modify the fields.
    5. To remove an entry, select it and click Remove.
  7. To edit an existing filter, select Manage filters from the toolbar or select the filter listed in the drop down menu. When a filter is selected and applied in the view, click on the Filter button to edit the filter. If there is no filter applied, clicking on the Filter button will open the Filter creation dialog.

Opening other views

Other profiling views and source code views can be opened from the Memory Statistics view.

  1. To open the object references of a selected object, right-click and select Show Object References Show object references. The Object References view will be opened and populated with data for the selected object.
  2. To open the source code view of a selected object, right-click and select Open Source Open source icon.

Exporting the data in the view

The data within the Memory Statistics view can be exported to an HTML document.

  1. To export the data in the view, select Export to HTML Export HTML icon in the toolbar.
  2. In the Export to HTML dialog, specify the file name that the data will be saved to.
  3. Click OK to save the data.

Refreshing the view

The Memory Statistics view can be refreshed using the Refresh Refresh Views icon button in the toolbar. When the view is refreshed, changes are marked with delta icons:

 


Related concepts
Overview of the Profiling Tool
Profiling resources

Related tasks
Applying profiling filters
Profiling an application
Identifying memory-intensive classes


(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.