Using the Memory Statistics view for Java 1.4 and lower jvm
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.
[see object allocation analysis view for Java 5.0 (Java 1.5) and higher jvm]
Prerequisites:
- Launching or attaching to an application
- In specifying profiling criteria, the Memory Analysis profiling set is selected or the Memory Analysis profiling set is enabled in a custom profiling set.
The Memory Statistics view provides a number of controls to allow you to manipulate the information shown within the view:
- Working with display modes
- Working with columns
- Filtering profiling data
- Opening other views
- Exporting the view data
- Refreshing the view
Working with display modes
There are three display modes are available based on the three object types: packages, classes, and instances.
- To switch between the package, class, and instance modes, select one of the following toolbar controls:
- Package Level information
![]()
- Class Level information
![]()
- Instance Level Information
![]()
- 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
![]()
Class statistics
![]()
Instance statistics
![]()
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, perform the following actions on the Profiling Types page for your profiling set:
- In the left hand pane, select the check boxes for Memory Analysis > Basic Memory Analysis and Time Analysis > Execution Time Analysis.
- Under Execution Time Analysis, select the Show execution flow graphical details radio button, then click the Advanced >> button and choose Collect instance level information.
Note: The profiling views are described here using Java. Profiling data from a different application context might change the terms and syntax used in the views. For more information, see Understanding application contexts in profiling views.
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.
- To specify which columns to display in the view, select the Choose Column
button in the toolbar drop-down menu
.
- In the Choose Columns dialog, select the columns that you want displayed in the view. Click OK to apply the changes.
- To show the change in each numeric column since the last refresh, select Show Delta Columns
in the toolbar.
- 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
Profiling filters can be applied to the Memory Statistics view 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. See the topic on Applying profiling filters for more details.
Opening other views
Other profiling views and source code views can be opened from the Memory Statistics view.
- To open the object references of a selected object, right-click and select Show Object References
. The Object References view will be opened and populated with data for the selected object.
- To open the source code view of a selected object, right-click and select Open Source
.
Exporting the data in the view
The data within the Memory Statistics view can be exported to available report formats (for example, HTML or XML).
- To export the data in the view, select Report...
in the toolbar. The New Report dialog appears, showing available report types.
- Select the report type.
- Check the Open editor option to open the document using the default system editor.
- Click Next to continue.
- Select a parent folder and enter a file name.
- Click Finish to generate the report.
Refreshing the view
The Memory Statistics view can be refreshed using the Refresh
button in the Profiling Monitor toolbar. When the view is refreshed, changes are marked with delta icons:
- The delta icons
and
indicate that there is a change in the numeric value (increase or decrease respectively) for that particular cell since the last time the table was refreshed.
- The diamond
indicates new occurrences since the last time the Refresh Views button
from the Profiling Monitor view was pressed.
Related concepts
Overview of the Profiling Tool
Profiling resourcesRelated tasks
Applying profiling filters
Profiling an application
Identifying memory-intensive classes
(C) Copyright IBM Corporation 2000, 2008. All Rights Reserved.