uCosminexus Application Server, Maintenance and Migration Guide

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

9.6.2 Class-wise statistical information output by the reference-related information output functionality

This subsection describes about the output format, the output items, and the output examples of the class-wise statistical information output by the reference-related information output functionality.

Organization of this subsection
(1) Output format and output items
(2) Example of output

(1) Output format and output items

The output format of the class-wise statistical information output by the reference-related information output functionality is as follows:

Output format
Reference of class <option-specified-class-name>
--------------------------------------------#
<class-name>(<address>)[<area-name>]
 <class-name>(<address>)[<area-name>]
 <option-specified-class-name>(<address>)[<area-name>]
------
<class-name>(<address>)[<area-name>]
 java.lang.ref.Finalizer<<repetition-count> times>
 <class-name>(<address>)[<area-name>]
 <class-name>(<address>)[<area-name>]
 <option-specified-class-name>(<address>)[<area-name>]
------
...

# '-(hyphen)' for the number in which 19 is added is output to the string length of the option-specified-class-name.


Output items

The each items listed in the output format are described as follows:

Table 9-10 Output items (reference-related information output functionality)

Output items Meaning
<Class name> The class name to be referenced by an instance of the class that is specified in the -class option of the jheapprof command is output.
<Address> The address of the instance is output.
Area-name The area where instance belongs is output.
  • Eden: Indicates Eden area.
  • Survivor: Indicates Survivor area.
  • Tenured: Indicates Tenured area.
  • Perm: Indicates Permanent area.
  • EM(eid=<id>): Indicates Explicit memory block.
Option-specified-class-name The class name specified in the -class option of the jheapprof command is output.
java.lang.ref.Finalizer The object of java.lang.ref.Finalizer created in the class having the finalize() method is output all together.
Iteration-count The count where the reference of the Finalizer instance is continuous is output.

(2) Example of output

The output example of the class-wise statistical information output by the reference-related information output functionality, is described as the example of the following source:

public class instance2 {
 public static void main(String args[]) {
 classA cls_a1 = new classA(); classA cls_a2 = new classA();
 classB cls_b1 = new classB(); classB cls_b2 = new classB();
 classC cls_c1 = new classC(); classC cls_c2 = new classC();
 classC cls_c3 = new classC(); classC cls_c4 = new classC();
 cls_a1.cls_a = cls_a2; cls_a1.cls_b = cls_b1;
 cls_a1.cls_c = cls_c1; cls_a2.cls_b = cls_b2;
 cls_b1.cls_c = cls_c2; cls_b2.cls_c = cls_c3;
 cls_c1.cls_c = cls_c4;
 try {
 Thread.sleep(20000);
 } catch (Exception e) {}
 }
}
class classA {
 classA cls_a;
 classB cls_b;
 classC cls_c;
 
 classA() {
 classB cls_b;
 }
}
class classB {
 classC cls_c;
}
class classC {
 classC cls_c;
}

The following figure shows the instance structure.

Figure 9-6 Instance structure (reference-related information output functionality)

[Figure]

The following figure shows the output result of the reference-related information output functionality. In such case, specify an argument -class class-name in the jheapprof command, and then execute the command.

Figure 9-7 Output result (reference-related information output functionality)

[Figure]

The address of all class A has same addresses (0x10766840). Therefore, it is understood that instances of all class A are same. On the other hand, the class B in (1) and (4) has different address and therefore, has different instances.

Note that the placement for the instances on the memory is changed due to the garbage collection occurrence. Therefore, whenever the address and the area name is output, they might change every time.