Objects Comparison


  The objects comparison is one of the memory comparisons. It is created by invoking the memory comparison wizard. For more information on snapshot comparisons, please see the snapshot comparison overview.
  The wizard has the following additional steps:
  • Select snapshots
    The objects comparison compares two snapshot files. In this step, you select the first and the second snapshot file for the comparison. The combo boxes contain all snapshot files that have been added to the snapshot selector. The first and second snapshot files must be different.
  • Recording type
    In this step, you choose whether you want to compare
    • All objects
      All objects on the heap will be compared.
    • Recorded objects
      Only objects that were recorded will be compared when this option is selected.
    • Heap snapshot objects
      All objects that were captured in a heap snapshot taken in the heap walker will be compared when this option is selected. Heap snapshot must be present in both selected snapshots to yield meaningful results. This is the only option that works for HPROF heap dumps.
  • View parameters
    In this steps you can select aggregation and liveness mode (only for recorded objects), just as for the all objects view and the recorded objects view.
  Each row in the objects comparison has the following columns:
  • the name of the class
  • the size in the second snapshot file minus the size in the first snapshot file
  • the instances in the second snapshot file minus the instances in the first snapshot file
The second column incorporates a bidirectional bar chart. Increases are painted in red and to the right, while decreases are painted in green and to the left. In the view settings dialog you can choose whether you want this bar chart to display absolute changes or the percentage of the change. The other value is displayed in parentheses. This setting also determines how this column is sorted. The second column can show either size or instances. This is configurable in the view settings dialog and is called the primary measure.
  By default, only classs that have changed from one snapshot file to the other are displayed. You can change this behavior in the view settings dialog.
  At the bottom of the objects comparison is a view filter selector that filters data for specific package or class names.
  The context menu and the View menu provide actions for creating an allocation call tree comparison or an allocation hot spot comparison for the selected class.

Please note that if the current comparison compares "All objects" (see above), the numbers will likely not correspond with the object comparison since the allocation comparisons only compare recorded objects.

  At the bottom of the objects comparison is a view filter selector that filters data for specific package or class names.