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=5, locals=11, args_size=1
start local 0 0: aload 0
arraylength
ifne 2
1: iconst_1
invokestatic sun.tools.jstack.JStack.usage:(I)V
2: StackMap locals:
StackMap stack:
aload 0
invokestatic sun.tools.jstack.JStack.checkForUnsupportedOptions:([Ljava/lang/String;)V
3: iconst_0
istore 1
start local 1 4: iconst_0
istore 2
start local 2 5: iconst_0
istore 3
start local 3 6: goto 24
7: StackMap locals: int int int
StackMap stack:
aload 0
iload 3
aaload
astore 4
start local 4 8: aload 4
ldc "-"
invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
ifne 10
9: goto 25
10: StackMap locals: java.lang.String
StackMap stack:
aload 4
ldc "-?"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 14
11: aload 4
ldc "-h"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 14
12: aload 4
ldc "--help"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 14
13: aload 4
ldc "-help"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 16
14: StackMap locals:
StackMap stack:
iconst_0
invokestatic sun.tools.jstack.JStack.usage:(I)V
15: goto 23
16: StackMap locals:
StackMap stack:
aload 4
ldc "-l"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 19
17: iconst_1
istore 1
18: goto 23
19: StackMap locals:
StackMap stack:
aload 4
ldc "-e"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 22
20: iconst_1
istore 2
21: goto 23
22: StackMap locals:
StackMap stack:
iconst_1
invokestatic sun.tools.jstack.JStack.usage:(I)V
23: StackMap locals:
StackMap stack:
iinc 3 1
end local 4 24: StackMap locals:
StackMap stack:
iload 3
aload 0
arraylength
if_icmplt 7
25: StackMap locals:
StackMap stack:
aload 0
arraylength
iload 3
isub
istore 4
start local 4 26: iload 4
iconst_1
if_icmpeq 28
27: iconst_1
invokestatic sun.tools.jstack.JStack.usage:(I)V
28: StackMap locals: int
StackMap stack:
aload 0
iload 3
aaload
astore 5
start local 5 29: iconst_1
anewarray java.lang.String
dup
iconst_0
ldc ""
aastore
astore 6
start local 6 30: iload 2
ifeq 32
31: aload 6
iconst_0
dup2
aaload
new java.lang.StringBuilder
dup_x1
swap
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc "-e "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
aastore
32: StackMap locals: java.lang.String java.lang.String[]
StackMap stack:
iload 1
ifeq 34
33: aload 6
iconst_0
dup2
aaload
new java.lang.StringBuilder
dup_x1
swap
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc "-l"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
aastore
34: StackMap locals:
StackMap stack:
new sun.tools.common.ProcessArgumentMatcher
dup
aload 5
invokespecial sun.tools.common.ProcessArgumentMatcher.<init>:(Ljava/lang/String;)V
astore 7
start local 7 35: aload 7
ldc Lsun/tools/jstack/JStack;
invokevirtual sun.tools.common.ProcessArgumentMatcher.getVirtualMachinePids:(Ljava/lang/Class;)Ljava/util/Collection;
astore 8
start local 8 36: aload 8
invokeinterface java.util.Collection.isEmpty:()Z
ifeq 39
37: getstatic java.lang.System.err:Ljava/io/PrintStream;
new java.lang.StringBuilder
dup
ldc "Could not find any processes matching : '"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 5
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc "'"
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
38: iconst_1
invokestatic java.lang.System.exit:(I)V
39: StackMap locals: sun.tools.common.ProcessArgumentMatcher java.util.Collection
StackMap stack:
aload 8
invokeinterface java.util.Collection.iterator:()Ljava/util/Iterator;
astore 10
goto 44
StackMap locals: java.lang.String[] int int int int java.lang.String java.lang.String[] sun.tools.common.ProcessArgumentMatcher java.util.Collection top java.util.Iterator
StackMap stack:
40: aload 10
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.lang.String
astore 9
start local 9 41: aload 8
invokeinterface java.util.Collection.size:()I
iconst_1
if_icmple 43
42: getstatic java.lang.System.out:Ljava/io/PrintStream;
new java.lang.StringBuilder
dup
ldc "Pid:"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 9
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
43: StackMap locals: java.lang.String[] int int int int java.lang.String java.lang.String[] sun.tools.common.ProcessArgumentMatcher java.util.Collection java.lang.String java.util.Iterator
StackMap stack:
aload 9
aload 6
invokestatic sun.tools.jstack.JStack.runThreadDump:(Ljava/lang/String;[Ljava/lang/String;)V
end local 9 44: StackMap locals: java.lang.String[] int int int int java.lang.String java.lang.String[] sun.tools.common.ProcessArgumentMatcher java.util.Collection top java.util.Iterator
StackMap stack:
aload 10
invokeinterface java.util.Iterator.hasNext:()Z
ifne 40
45: return
end local 8 end local 7 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 46 0 args [Ljava/lang/String;
4 46 1 locks Z
5 46 2 extended Z
6 46 3 optionCount I
8 24 4 arg Ljava/lang/String;
26 46 4 paramCount I
29 46 5 pidArg Ljava/lang/String;
30 46 6 params [Ljava/lang/String;
35 46 7 ap Lsun/tools/common/ProcessArgumentMatcher;
36 46 8 pids Ljava/util/Collection<Ljava/lang/String;>;
41 44 9 pid Ljava/lang/String;
Exceptions:
throws java.lang.Exception
MethodParameters:
Name Flags
args
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=4, locals=5, 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 10
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:
iconst_1
invokestatic java.lang.System.exit:(I)V
end local 4 end local 3 10: 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 11: aload 3
getstatic java.lang.System.out:Ljava/io/PrintStream;
invokestatic sun.tools.common.PrintStreamPrinter.drainUTF8:(Ljava/io/InputStream;Ljava/io/PrintStream;)J
pop2
12: aload 2
invokevirtual com.sun.tools.attach.VirtualMachine.detach:()V
13: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 14 0 pid Ljava/lang/String;
0 14 1 args [Ljava/lang/String;
1 14 2 vm Lcom/sun/tools/attach/VirtualMachine;
4 10 3 x Ljava/lang/Exception;
5 10 4 msg Ljava/lang/String;
11 14 3 in Ljava/io/InputStream;
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 void checkForUnsupportedOptions(java.lang.String[]);
descriptor: ([Ljava/lang/String;)V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=2, locals=6, args_size=1
start local 0 0: iconst_0
istore 1
start local 1 1: aload 0
dup
astore 5
arraylength
istore 4
iconst_0
istore 3
goto 10
StackMap locals: java.lang.String[] int top int int java.lang.String[]
StackMap stack:
2: aload 5
iload 3
aaload
astore 2
start local 2 3: aload 2
ldc "-F"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 5
4: ldc "-F option used"
invokestatic sun.tools.jstack.JStack.SAOptionError:(Ljava/lang/String;)V
5: StackMap locals: java.lang.String[] int java.lang.String int int java.lang.String[]
StackMap stack:
aload 2
ldc "-m"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 7
6: ldc "-m option used"
invokestatic sun.tools.jstack.JStack.SAOptionError:(Ljava/lang/String;)V
7: StackMap locals:
StackMap stack:
aload 2
ldc "-"
invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
ifne 9
8: iinc 1 1
end local 2 9: StackMap locals: java.lang.String[] int top int int java.lang.String[]
StackMap stack:
iinc 3 1
StackMap locals:
StackMap stack:
10: iload 3
iload 4
if_icmplt 2
11: iload 1
iconst_1
if_icmple 13
12: ldc "More than one non-option argument"
invokestatic sun.tools.jstack.JStack.SAOptionError:(Ljava/lang/String;)V
13: StackMap locals: java.lang.String[] int
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 14 0 args [Ljava/lang/String;
1 14 1 paramCount I
3 9 2 s Ljava/lang/String;
MethodParameters:
Name Flags
args
private static void SAOptionError(java.lang.String);
descriptor: (Ljava/lang/String;)V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=4, locals=1, args_size=1
start local 0 0: getstatic java.lang.System.err:Ljava/io/PrintStream;
new java.lang.StringBuilder
dup
ldc "Error: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
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
1: getstatic java.lang.System.err:Ljava/io/PrintStream;
ldc "Cannot connect to core dump or remote debug server. Use jhsdb jstack instead"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
2: iconst_1
invokestatic java.lang.System.exit:(I)V
3: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 msg Ljava/lang/String;
MethodParameters:
Name Flags
msg
private static void usage(int);
descriptor: (I)V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: getstatic java.lang.System.err:Ljava/io/PrintStream;
ldc "Usage:"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
1: getstatic java.lang.System.err:Ljava/io/PrintStream;
ldc " jstack [-l][-e] <pid>"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
2: getstatic java.lang.System.err:Ljava/io/PrintStream;
ldc " (to connect to running process)"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
3: getstatic java.lang.System.err:Ljava/io/PrintStream;
ldc ""
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
4: getstatic java.lang.System.err:Ljava/io/PrintStream;
ldc "Options:"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
5: getstatic java.lang.System.err:Ljava/io/PrintStream;
ldc " -l long listing. Prints additional information about locks"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
6: getstatic java.lang.System.err:Ljava/io/PrintStream;
ldc " -e extended listing. Prints additional information about threads"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
7: getstatic java.lang.System.err:Ljava/io/PrintStream;
ldc " -? -h --help -help to print this help message"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
8: iload 0
invokestatic java.lang.System.exit:(I)V
9: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 exit I
MethodParameters:
Name Flags
exit
}
SourceFile: "JStack.java"