uCosminexus Application Server, Maintenance and Migration Guide
This subsection describes the output format, output items, and examples of output of the class-wise statistical information output by the static field-based reference relationship output functionality.
The output format of the class-wise statistical information output by the static field-based reference relationship output functionality is as follows:
Reference of class option-specified-class-name from static field -------------------------------------------------------------#1 static field static-field-declaring-class-name#2.static-field-name#2 class-name(address)[area-name] class-name(address)[area-name] option-specified-class-name(address)[area-name] ------ ... |
The following table describes the items shown in the output format.
Table 9-11 Output items (static field-based reference relationship output functionality)
Output items | Meaning |
---|---|
static-field-declaring-class-name | The class name declaring the static field that forms the base is output. |
static-field-name | The name of the static field that forms the base is output. |
class-name | The class name of the instance that references the instances of the classes specified in the -class option of the jheapprof command is output. |
address | The address of the instance is output. |
area-name | The area to which the instance belongs is output.
|
option-specified-class-name | The class name specified in the -class option of the jheapprof command is output. |
This subsection gives an example output of the class-wise statistical information output by the static field-based reference relationship output functionality using the following source as an example:
import JP.co.Hitachi.soft.jvm.MemoryArea.*; public class static_reference { public static void main(String args[]) { try { classA cls_a1 = 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(); BasicExplicitMemory emem = new BasicExplicitMemory(); classC cls_c4 = (classC)emem.newInstance(classC.class); cls_a1.s_cls_a = cls_a1; cls_a1.s_cls_b = cls_b1; cls_a1.s_cls_c = cls_c1; cls_a1.cls_b = cls_b2; cls_b1.cls_c = cls_c2; cls_b2.cls_c = cls_c3; cls_c1.cls_c = cls_c4; Thread.sleep(20000); } catch (Exception e) {e.printStackTrace();} } } class classA { static classA s_cls_a; static classB s_cls_b; static classC s_cls_c; classB cls_b; } class classB { classC cls_c; } class classC { classC cls_c; public classC(){ } } |
The following figure shows the structure of the instances.
Figure 9-8 Structure of the instances (static field-based reference relationship output functionality)
The following figure shows the output result of the static field-based reference relationship output functionality. In this case, the jheapprof command is executed specifying the argument -class class-name -staticroot.
Figure 9-9 Output result (static field-based reference relationship output functionality)
All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd.