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=10, 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: goto 17
6: StackMap locals: int int
StackMap stack:
aload 0
iload 2
aaload
astore 3
start local 3 7: aload 3
ldc "-"
invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
ifne 9
8: goto 18
9: StackMap locals: java.lang.String
StackMap stack:
aload 3
ldc "-help"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 10
aload 3
ldc "-h"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 12
10: StackMap locals:
StackMap stack:
iconst_0
invokestatic sun.tools.jstack.JStack.usage:(I)V
11: goto 16
12: StackMap locals:
StackMap stack:
aload 3
ldc "-l"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 15
13: iconst_1
istore 1
14: goto 16
15: StackMap locals:
StackMap stack:
iconst_1
invokestatic sun.tools.jstack.JStack.usage:(I)V
16: StackMap locals:
StackMap stack:
iinc 2 1
end local 3 17: StackMap locals:
StackMap stack:
iload 2
aload 0
arraylength
if_icmplt 6
18: StackMap locals:
StackMap stack:
aload 0
arraylength
iload 2
isub
istore 3
start local 3 19: iload 3
iconst_1
if_icmpeq 21
20: iconst_1
invokestatic sun.tools.jstack.JStack.usage:(I)V
21: StackMap locals: int
StackMap stack:
aload 0
iload 2
aaload
astore 4
start local 4 22: iload 1
ifeq 25
23: iconst_1
anewarray java.lang.String
dup
iconst_0
ldc "-l"
aastore
astore 5
start local 5 24: goto 26
end local 5 25: StackMap locals: java.lang.String
StackMap stack:
iconst_0
anewarray java.lang.String
astore 5
start local 5 26: StackMap locals: java.lang.String[]
StackMap stack:
new sun.tools.common.ProcessArgumentMatcher
dup
aload 4
invokespecial sun.tools.common.ProcessArgumentMatcher.<init>:(Ljava/lang/String;)V
astore 6
start local 6 27: aload 6
ldc Lsun/tools/jstack/JStack;
invokevirtual sun.tools.common.ProcessArgumentMatcher.getVirtualMachinePids:(Ljava/lang/Class;)Ljava/util/Collection;
astore 7
start local 7 28: aload 7
invokeinterface java.util.Collection.isEmpty:()Z
ifeq 31
29: 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 4
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
30: iconst_1
invokestatic java.lang.System.exit:(I)V
31: StackMap locals: sun.tools.common.ProcessArgumentMatcher java.util.Collection
StackMap stack:
aload 7
invokeinterface java.util.Collection.iterator:()Ljava/util/Iterator;
astore 9
goto 36
StackMap locals: java.lang.String[] int int int java.lang.String java.lang.String[] sun.tools.common.ProcessArgumentMatcher java.util.Collection top java.util.Iterator
StackMap stack:
32: aload 9
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.lang.String
astore 8
start local 8 33: aload 7
invokeinterface java.util.Collection.size:()I
iconst_1
if_icmple 35
34: 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 8
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
35: StackMap locals: java.lang.String[] 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 8
aload 5
invokestatic sun.tools.jstack.JStack.runThreadDump:(Ljava/lang/String;[Ljava/lang/String;)V
end local 8 36: StackMap locals: java.lang.String[] int int int java.lang.String java.lang.String[] sun.tools.common.ProcessArgumentMatcher java.util.Collection top java.util.Iterator
StackMap stack:
aload 9
invokeinterface java.util.Iterator.hasNext:()Z
ifne 32
37: return
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 38 0 args [Ljava/lang/String;
4 38 1 locks Z
5 38 2 optionCount I
7 17 3 arg Ljava/lang/String;
19 38 3 paramCount I
22 38 4 pidArg Ljava/lang/String;
24 25 5 params [Ljava/lang/String;
26 38 5 params [Ljava/lang/String;
27 38 6 ap Lsun/tools/common/ProcessArgumentMatcher;
28 38 7 pids Ljava/util/Collection<Ljava/lang/String;>;
33 36 8 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=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 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: sipush 256
newarray 8
astore 4
start local 4 12: StackMap locals: java.io.InputStream byte[]
StackMap stack:
aload 3
aload 4
invokevirtual java.io.InputStream.read:([B)I
istore 5
start local 5 13: iload 5
ifle 16
14: 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 15: getstatic java.lang.System.out:Ljava/io/PrintStream;
aload 6
invokevirtual java.io.PrintStream.print:(Ljava/lang/String;)V
end local 6 16: StackMap locals: int
StackMap stack:
iload 5
17: ifgt 12
18: aload 3
invokevirtual java.io.InputStream.close:()V
19: aload 2
invokevirtual com.sun.tools.attach.VirtualMachine.detach:()V
20: 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 21 0 pid Ljava/lang/String;
0 21 1 args [Ljava/lang/String;
1 21 2 vm Lcom/sun/tools/attach/VirtualMachine;
4 10 3 x Ljava/lang/Exception;
5 10 4 msg Ljava/lang/String;
11 21 3 in Ljava/io/InputStream;
12 21 4 b [B
13 21 5 n I
15 16 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 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] <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 " -h or -help to print this help message"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
7: iload 0
invokestatic java.lang.System.exit:(I)V
8: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 exit I
MethodParameters:
Name Flags
exit
}
SourceFile: "JStack.java"