Hitachi

Hitachi Application Server V10 Definition Reference Guide (For UNIX® Systems)


7.10.2 -XX:[+|-]HitachiLocalsInStackTrace

-XX:[+|-]HitachiLocalsInStackTrace adds the local variable information of each method to the stack traces that are generated when thread dumps are output, and then outputs the stack traces.

Description

-XX:[+|-]HitachiLocalsInStackTrace adds the local variable information of each method to the stack traces that are generated when thread dumps are output, and then outputs the stack traces.

Syntax

-XX:[+|-]HitachiLocalsInStackTrace

Specifiable values

Type: String

-XX:+HitachiLocalsInStackTrace

Outputs local variable information to the stack traces that are generated when thread dumps are output.

-XX:-HitachiLocalsInStackTrace

Does not output local variable information to the stack traces that are generated when thread dumps are output.

Default value

If the definition item is omitted:

-XX:-HitachiLocalsInStackTrace

Examples

An example of the output (in the simple output format) when the following Java program example is used is shown below.

Java program example
class Example2 {
    public static void main(String[] args) {
        Example2 e2 = new Example2();
        e2.method();  // 4th line
    }
 
    synchronized void method() {
        int l1 = 1;
        float l2 = 2.0f;
        String l3 = "local 3";
        Character l4 = new Character('X');
        Object l5 = new Thread();
        Object[] l6 = new Thread[10];
 
        <Here, a thread dump is output!>  // 15th line
    }
}
Example of output

When the -XX:+HitachiLocalsSimpleFormat option and the -XX:+HitachiTrueTypeInLocals option are specified:

"main" #1 prio=5 os_prio=0 jid=<N/A> tid=0x0000000000297800 nid=0x11500 
runnable [0x0000000002a8f000..0x0000000002a8f6c0]
   java.lang.Thread.State:  RUNNABLE
  stack=
[0x0000000002a90000..0x0000000002994000..0x0000000002991000..0x0000000002990000]
  [user cpu time=3790ms, kernel cpu time=78ms] [blocked count=0, waited count=0]
 at Example2.method(Unknown Source)
 - locked <0x00000000120d03a8> (a Example2)
   locals: 
     (Example2) this = <0x00000000120d03a8>
     (int) l1 = 1
     (float) l2 = 2
     (java.lang.String) l3 = <0x00000000120d03b8>
     (java.lang.Character) l4 = <0x00000000120d0600>
     (java.lang.Object) l5 = <0x00000000120d07f8>
     (java.lang.Object[]) l6 = <0x00000000120d0bc8>
 at Example2.main(Unknown Source)
   locals: 
     (java.lang.String[]) args [arg1] = <0x00000000120d0390>
     (Example2) e2 = <0x00000000120d03a8>

Notes