Memory Profiling Results for Java

Memory Profiling for Java

After execution of an instrumented application, the Memory Profiling report displays:

  • In the Report Explorer window: a list of available snapshots

  • In the Memory Profiling window: the contents of the selected Memory Profiling snapshot

Report Explorer

The Report Explorer window displays a Test for each execution of the application node or for a test node when using Component Testing for Java. Inside each test, a Snapshot report is created for each Memory Profiling snapshot.

Method Snapshots

The Memory Profiling report displays snapshot data for each method that has performed an allocation. If the Java CLASSPATH is correctly set, you can click blue method names to open the corresponding source code in the Text Editor. System methods are displayed in black and cannot be clicked.

Method data is reset after each snapshot.

For each method, the report lists:

  • Method:The method name. Blue method names are hyperlinks to the source code under analysis

  • Allocated Objects: The number of objects allocated since the previous snapshot

  • Allocated Bytes: The total number of bytes used by the objects allocated by the method since the previous snapshot

  • Local + D Allocated Objects: The number of objects allocated by the method since the previous snapshot as well as any descendants called by the method

  • Local + D Allocated Bytes: The total number of bytes used by the objects allocated by the method since the previous snapshot and its descendants

Referenced Objects

If you selected the With objects filter option in the JVMPI Settings dialog box, the report can display, for each method, a list of objects created by the method and object-related data.

From the Memory Profiling menu, select Hide/Show Referenced Objects.

For each object, the report lists:

  • Reference Object Class:The name of the object class. Blue class names are hyperlinks to the source code under analysis.

  • Referenced Objects: The number of objects that exist at the moment the snapshot was taken

  • Referenced Bytes: The total number of bytes used by the referenced objects

Differential Reports

The Memory Profile report can display differential data between two snapshots within the same Test. This allows you to compare the referenced objects. There are two diff modes:

  • Automatic differential report with the previous snapshot

  • User differential report

Differential reports add the following columns to the current Memory Profiling snapshot report:

  • Referenced Objects Diff AUTO: Shows the difference in the number of referenced objects for the same method in the current snapshot as compared to the previous snapshot

  • Referenced Bytes Diff AUTO : Shows the difference in the memory used by the referenced objects for the same method in the current snapshot as compared to the previous snapshot

  • Referenced Objects Diff USER: Shows the difference in the number of referenced objects for the same method in the current snapshot as compared to the user-selected snapshot

  • Referenced Bytes Diff USER: Shows the difference in the memory used by the referenced objects for the same method in the current snapshot as compared to the user-selected snapshot

To add or remove data to the report:

  1. From the Memory Profiling menu, select Hide/Show Data.
  2. Toggle the data that you want to hide or display

To sort the report:

  1. In the Memory Profiling window, click a column label to sort the table on that value.

To obtain a differential report:

  1. From the Memory Profiling menu, select Diff with Previous Referenced Objects.

To obtain a user differential report:

  1. In the Report Explorer, select the current snapshot
  2. Right-click another snapshot in the same Test node and select Diff Report.

Related Topics

Using the Memory Profiling Viewer | Memory Profiling Settings