uCosminexus Application Server, Maintenance and Migration Guide

[Contents][Glossary][Index][Back][Next]

9.6.1 Overview of the reference-related information output functionality

The class from which an instance of the class that is specified in the -class option of the jheapprof command is to be referenced, is output in the sequence beginning from the reference relation of the instance.

If there are many instances of the specified class, all the corresponding instances are output. Even if there are many instances having same name, you can identify the instances separately since the following information is output after the instance name:

In the reference-related information output functionality, investigate for the reference relation of object referred in the following order from the object that is the base. The base objects are the objects those are not investigated in other reference relation. 1., 2., and 3. indicates the priority order for investigating reference relation.

  1. Ascending order of the address within the Java heap
  2. Ascending order of the address within an Explicit management heap
  3. Ascending order of the address within the Permanent heap

When the reference destination object is the class specified in the -class option, the reference relation extended from the base object up to the object of the class specified in the -class option, is output in the reference-related information. Moreover, when the reference destination objects are investigated, return up to the branch point, and investigate for the reference relation. Moreover, when the reference destination objects are the objects that is the base of other reference relation, handle it as a reference destination object. Investigate for the reference relation until all the objects that are the base are lost.

Also, the static field-based reference relationship output functionality is enabled when you specify the -staticroot option with the jheapprof command. The reference relationship output functionality is a prerequisite for this functionality. With the static field-based reference relationship output functionality, the static field-based reference relationship is additionally output to the reference relationship output by the reference relationship output functionality. This output information is used to ascertain the cause of the memory leak using the reference relationships based on static fields.

The following figure shows an example of a reference relationship with a memory leak:

[Figure]

If you execute the static field-based reference relationship output functionality for the reference relationship instance d/Cd in the figure, the following reference relationship is output:

[Figure]

Based on this information, the references of the following fields will be cleared as a measure against the leak. Due to this, the d/Cd instance is collected in a garbage collection, so the memory leak can be resolved.

For details on the reference relationships of the reference relationship output functionality, see 9.6.2 Class-wise statistical information output by the reference-related information output functionality, and for the static field-based reference relationships, see 9.6.3 Class-wise statistical information output by the static field-based reference relationship output functionality.