public class sun.tools.jstack.JStack
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: sun.tools.jstack.JStack
super_class: java.lang.Object
{
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lsun/tools/jstack/JStack;
public static void main(java.lang.String[]);
descriptor: ([Ljava/lang/String;)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=8, args_size=1
start local 0 0: aload 0
arraylength
ifne 2
1: invokestatic sun.tools.jstack.JStack.usage:()V
2: StackMap locals:
StackMap stack:
iconst_0
istore 1
start local 1 3: iconst_0
istore 2
start local 2 4: iconst_0
istore 3
start local 3 5: iconst_0
istore 4
start local 4 6: goto 21
7: StackMap locals: java.lang.String[] int int int int
StackMap stack:
aload 0
iload 4
aaload
astore 5
start local 5 8: aload 5
ldc "-"
invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
ifne 10
9: goto 22
10: StackMap locals: java.lang.String
StackMap stack:
aload 5
ldc "-F"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 13
11: iconst_1
istore 1
12: goto 20
13: StackMap locals:
StackMap stack:
aload 5
ldc "-m"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 16
14: iconst_1
istore 2
15: goto 20
16: StackMap locals:
StackMap stack:
aload 5
ldc "-l"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 19
17: iconst_1
istore 3
18: goto 20
19: StackMap locals:
StackMap stack:
invokestatic sun.tools.jstack.JStack.usage:()V
20: StackMap locals:
StackMap stack:
iinc 4 1
end local 5 21: StackMap locals:
StackMap stack:
iload 4
aload 0
arraylength
if_icmplt 7
22: StackMap locals:
StackMap stack:
iload 2
ifeq 24
23: iconst_1
istore 1
24: StackMap locals:
StackMap stack:
aload 0
arraylength
iload 4
isub
istore 5
start local 5 25: iload 5
ifeq 26
iload 5
iconst_2
if_icmple 27
26: StackMap locals: int
StackMap stack:
invokestatic sun.tools.jstack.JStack.usage:()V
27: StackMap locals:
StackMap stack:
iload 5
iconst_2
if_icmpne 30
28: iconst_1
istore 1
29: goto 32
30: StackMap locals:
StackMap stack:
aload 0
iload 4
aaload
ldc "[0-9]+"
invokevirtual java.lang.String.matches:(Ljava/lang/String;)Z
ifne 32
31: iconst_1
istore 1
32: StackMap locals:
StackMap stack:
iload 1
ifeq 41
33: iload 5
anewarray java.lang.String
astore 6
start local 6 34: iload 4
istore 7
start local 7 35: goto 38
36: StackMap locals: java.lang.String[] int
StackMap stack:
aload 6
iload 7
iload 4
isub
aload 0
iload 7
aaload
aastore
37: iinc 7 1
StackMap locals:
StackMap stack:
38: iload 7
aload 0
arraylength
if_icmplt 36
end local 7 39: iload 2
iload 3
aload 6
invokestatic sun.tools.jstack.JStack.runJStackTool:(ZZ[Ljava/lang/String;)V
end local 6 40: goto 47
41: StackMap locals:
StackMap stack:
aload 0
iload 4
aaload
astore 6
start local 6 42: iload 3
ifeq 45
43: iconst_1
anewarray java.lang.String
dup
iconst_0
ldc "-l"
aastore
astore 7
start local 7 44: goto 46
end local 7 45: StackMap locals: java.lang.String
StackMap stack:
iconst_0
anewarray java.lang.String
astore 7
start local 7 46: StackMap locals: java.lang.String[]
StackMap stack:
aload 6
aload 7
invokestatic sun.tools.jstack.JStack.runThreadDump:(Ljava/lang/String;[Ljava/lang/String;)V
end local 7 end local 6 47: StackMap locals:
StackMap stack:
return
end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 48 0 args [Ljava/lang/String;
3 48 1 useSA Z
4 48 2 mixed Z
5 48 3 locks Z
6 48 4 optionCount I
8 21 5 arg Ljava/lang/String;
25 48 5 paramCount I
34 40 6 params [Ljava/lang/String;
35 39 7 i I
42 47 6 pid Ljava/lang/String;
44 45 7 params [Ljava/lang/String;
46 47 7 params [Ljava/lang/String;
Exceptions:
throws java.lang.Exception
MethodParameters:
Name Flags
args
private static void runJStackTool(boolean, boolean, java.lang.String[]);
descriptor: (ZZ[Ljava/lang/String;)V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=4, locals=7, args_size=3
start local 0 start local 1 start local 2 0: invokestatic sun.tools.jstack.JStack.loadSAClass:()Ljava/lang/Class;
astore 3
start local 3 1: aload 3
ifnonnull 3
2: invokestatic sun.tools.jstack.JStack.usage:()V
3: StackMap locals: java.lang.Class
StackMap stack:
iload 0
ifeq 5
4: ldc "-m"
aload 2
invokestatic sun.tools.jstack.JStack.prepend:(Ljava/lang/String;[Ljava/lang/String;)[Ljava/lang/String;
astore 2
5: StackMap locals:
StackMap stack:
iload 1
ifeq 7
6: ldc "-l"
aload 2
invokestatic sun.tools.jstack.JStack.prepend:(Ljava/lang/String;[Ljava/lang/String;)[Ljava/lang/String;
astore 2
7: StackMap locals:
StackMap stack:
iconst_1
anewarray java.lang.Class
dup
iconst_0
ldc [Ljava/lang/String;
aastore
astore 4
start local 4 8: aload 3
ldc "main"
aload 4
invokevirtual java.lang.Class.getDeclaredMethod:(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
astore 5
start local 5 9: iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 2
aastore
astore 6
start local 6 10: aload 5
aconst_null
aload 6
invokevirtual java.lang.reflect.Method.invoke:(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
pop
11: return
end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 mixed Z
0 12 1 locks Z
0 12 2 args [Ljava/lang/String;
1 12 3 cl Ljava/lang/Class<*>;
8 12 4 argTypes [Ljava/lang/Class;
9 12 5 m Ljava/lang/reflect/Method;
10 12 6 invokeArgs [Ljava/lang/Object;
Exceptions:
throws java.lang.Exception
MethodParameters:
Name Flags
mixed
locks
args
private static java.lang.Class<?> loadSAClass();
descriptor: ()Ljava/lang/Class;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=3, locals=0, args_size=0
0: ldc "sun.jvm.hotspot.tools.JStack"
iconst_1
1: invokestatic java.lang.ClassLoader.getSystemClassLoader:()Ljava/lang/ClassLoader;
2: invokestatic java.lang.Class.forName:(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;
3: areturn
4: StackMap locals:
StackMap stack: java.lang.Exception
pop
5: aconst_null
areturn
LocalVariableTable:
Start End Slot Name Signature
Exception table:
from to target type
0 3 4 Class java.lang.Exception
Signature: ()Ljava/lang/Class<*>;
private static void runThreadDump(java.lang.String, java.lang.String[]);
descriptor: (Ljava/lang/String;[Ljava/lang/String;)V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=6, locals=7, args_size=2
start local 0 start local 1 0: aconst_null
astore 2
start local 2 1: aload 0
invokestatic com.sun.tools.attach.VirtualMachine.attach:(Ljava/lang/String;)Lcom/sun/tools/attach/VirtualMachine;
astore 2
2: goto 13
StackMap locals: java.lang.String java.lang.String[] com.sun.tools.attach.VirtualMachine
StackMap stack: java.lang.Exception
3: astore 3
start local 3 4: aload 3
invokevirtual java.lang.Exception.getMessage:()Ljava/lang/String;
astore 4
start local 4 5: aload 4
ifnull 8
6: getstatic java.lang.System.err:Ljava/io/PrintStream;
new java.lang.StringBuilder
dup
aload 0
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc ": "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 4
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
7: goto 9
8: StackMap locals: java.lang.Exception java.lang.String
StackMap stack:
aload 3
invokevirtual java.lang.Exception.printStackTrace:()V
9: StackMap locals:
StackMap stack:
aload 3
instanceof com.sun.tools.attach.AttachNotSupportedException
ifeq 12
10: invokestatic sun.tools.jstack.JStack.loadSAClass:()Ljava/lang/Class;
ifnull 12
11: getstatic java.lang.System.err:Ljava/io/PrintStream;
ldc "The -F option can be used when the target process is not responding"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
12: StackMap locals:
StackMap stack:
iconst_1
invokestatic java.lang.System.exit:(I)V
end local 4 end local 3 13: StackMap locals:
StackMap stack:
aload 2
checkcast sun.tools.attach.HotSpotVirtualMachine
aload 1
invokevirtual sun.tools.attach.HotSpotVirtualMachine.remoteDataDump:([Ljava/lang/Object;)Ljava/io/InputStream;
astore 3
start local 3 14: sipush 256
newarray 8
astore 4
start local 4 15: StackMap locals: java.io.InputStream byte[]
StackMap stack:
aload 3
aload 4
invokevirtual java.io.InputStream.read:([B)I
istore 5
start local 5 16: iload 5
ifle 19
17: new java.lang.String
dup
aload 4
iconst_0
iload 5
ldc "UTF-8"
invokespecial java.lang.String.<init>:([BIILjava/lang/String;)V
astore 6
start local 6 18: getstatic java.lang.System.out:Ljava/io/PrintStream;
aload 6
invokevirtual java.io.PrintStream.print:(Ljava/lang/String;)V
end local 6 19: StackMap locals: int
StackMap stack:
iload 5
20: ifgt 15
21: aload 3
invokevirtual java.io.InputStream.close:()V
22: aload 2
invokevirtual com.sun.tools.attach.VirtualMachine.detach:()V
23: return
end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 24 0 pid Ljava/lang/String;
0 24 1 args [Ljava/lang/String;
1 24 2 vm Lcom/sun/tools/attach/VirtualMachine;
4 13 3 x Ljava/lang/Exception;
5 13 4 msg Ljava/lang/String;
14 24 3 in Ljava/io/InputStream;
15 24 4 b [B
16 24 5 n I
18 19 6 s Ljava/lang/String;
Exception table:
from to target type
1 2 3 Class java.lang.Exception
Exceptions:
throws java.lang.Exception
MethodParameters:
Name Flags
pid
args
private static java.lang.String[] prepend(java.lang.String, java.lang.String[]);
descriptor: (Ljava/lang/String;[Ljava/lang/String;)[Ljava/lang/String;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=5, locals=3, args_size=2
start local 0 start local 1 0: aload 1
arraylength
iconst_1
iadd
anewarray java.lang.String
astore 2
start local 2 1: aload 2
iconst_0
aload 0
aastore
2: aload 1
iconst_0
aload 2
iconst_1
aload 1
arraylength
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
3: aload 2
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 arg Ljava/lang/String;
0 4 1 args [Ljava/lang/String;
1 4 2 newargs [Ljava/lang/String;
MethodParameters:
Name Flags
arg
args
private static void usage();
descriptor: ()V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=2, locals=0, args_size=0
0: getstatic java.lang.System.out:Ljava/io/PrintStream;
ldc "Usage:"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
1: getstatic java.lang.System.out:Ljava/io/PrintStream;
ldc " jstack [-l] <pid>"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
2: getstatic java.lang.System.out:Ljava/io/PrintStream;
ldc " (to connect to running process)"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
3: invokestatic sun.tools.jstack.JStack.loadSAClass:()Ljava/lang/Class;
ifnull 10
4: getstatic java.lang.System.out:Ljava/io/PrintStream;
ldc " jstack -F [-m] [-l] <pid>"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
5: getstatic java.lang.System.out:Ljava/io/PrintStream;
ldc " (to connect to a hung process)"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
6: getstatic java.lang.System.out:Ljava/io/PrintStream;
ldc " jstack [-m] [-l] <executable> <core>"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
7: getstatic java.lang.System.out:Ljava/io/PrintStream;
ldc " (to connect to a core file)"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
8: getstatic java.lang.System.out:Ljava/io/PrintStream;
ldc " jstack [-m] [-l] [server_id@]<remote server IP or hostname>"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
9: getstatic java.lang.System.out:Ljava/io/PrintStream;
ldc " (to connect to a remote debug server)"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
10: StackMap locals:
StackMap stack:
getstatic java.lang.System.out:Ljava/io/PrintStream;
ldc ""
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
11: getstatic java.lang.System.out:Ljava/io/PrintStream;
ldc "Options:"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
12: invokestatic sun.tools.jstack.JStack.loadSAClass:()Ljava/lang/Class;
ifnull 15
13: getstatic java.lang.System.out:Ljava/io/PrintStream;
ldc " -F to force a thread dump. Use when jstack <pid> does not respond (process is hung)"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
14: getstatic java.lang.System.out:Ljava/io/PrintStream;
ldc " -m to print both java and native frames (mixed mode)"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
15: StackMap locals:
StackMap stack:
getstatic java.lang.System.out:Ljava/io/PrintStream;
ldc " -l long listing. Prints additional information about locks"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
16: getstatic java.lang.System.out:Ljava/io/PrintStream;
ldc " -h or -help to print this help message"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
17: iconst_1
invokestatic java.lang.System.exit:(I)V
18: return
LocalVariableTable:
Start End Slot Name Signature
}
SourceFile: "JStack.java"