public class sun.tools.jmap.JMap
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: sun.tools.jmap.JMap
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/jmap/JMap;
public static void main(java.lang.String[]);
descriptor: ([Ljava/lang/String;)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=6, locals=9, args_size=1
start local 0 0: aload 0
arraylength
ifne 2
1: iconst_1
invokestatic sun.tools.jmap.JMap.usage:(I)V
2: StackMap locals:
StackMap stack:
aload 0
invokestatic sun.tools.jmap.JMap.checkForUnsupportedOptions:([Ljava/lang/String;)V
3: aconst_null
astore 1
start local 1 4: iconst_0
istore 2
start local 2 5: goto 16
6: StackMap locals: java.lang.String 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 17
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.jmap.JMap.usage:(I)V
11: goto 15
12: StackMap locals:
StackMap stack:
aload 1
ifnull 14
13: iconst_1
invokestatic sun.tools.jmap.JMap.usage:(I)V
14: StackMap locals:
StackMap stack:
aload 3
astore 1
15: StackMap locals:
StackMap stack:
iinc 2 1
end local 3 16: StackMap locals:
StackMap stack:
iload 2
aload 0
arraylength
if_icmplt 6
17: StackMap locals:
StackMap stack:
aload 1
ifnonnull 19
18: iconst_0
invokestatic sun.tools.jmap.JMap.usage:(I)V
19: StackMap locals:
StackMap stack:
aload 0
arraylength
iload 2
isub
istore 3
start local 3 20: iload 3
iconst_1
if_icmpeq 22
21: iconst_1
invokestatic sun.tools.jmap.JMap.usage:(I)V
22: StackMap locals: int
StackMap stack:
aload 0
iconst_1
aaload
astore 4
start local 4 23: new sun.tools.common.ProcessArgumentMatcher
dup
aload 4
invokespecial sun.tools.common.ProcessArgumentMatcher.<init>:(Ljava/lang/String;)V
astore 5
start local 5 24: aload 5
ldc Lsun/tools/jmap/JMap;
invokevirtual sun.tools.common.ProcessArgumentMatcher.getVirtualMachinePids:(Ljava/lang/Class;)Ljava/util/Collection;
astore 6
start local 6 25: aload 6
invokeinterface java.util.Collection.isEmpty:()Z
ifeq 28
26: 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
27: iconst_1
invokestatic java.lang.System.exit:(I)V
28: StackMap locals: java.lang.String sun.tools.common.ProcessArgumentMatcher java.util.Collection
StackMap stack:
aload 6
invokeinterface java.util.Collection.iterator:()Ljava/util/Iterator;
astore 8
goto 48
StackMap locals: java.lang.String[] java.lang.String int int java.lang.String sun.tools.common.ProcessArgumentMatcher java.util.Collection top java.util.Iterator
StackMap stack:
29: aload 8
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.lang.String
astore 7
start local 7 30: aload 6
invokeinterface java.util.Collection.size:()I
iconst_1
if_icmple 32
31: 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 7
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
32: StackMap locals: java.lang.String[] java.lang.String int int java.lang.String sun.tools.common.ProcessArgumentMatcher java.util.Collection java.lang.String java.util.Iterator
StackMap stack:
aload 1
ldc "-histo"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 35
33: aload 7
ldc ""
invokestatic sun.tools.jmap.JMap.histo:(Ljava/lang/String;Ljava/lang/String;)V
34: goto 48
StackMap locals:
StackMap stack:
35: aload 1
ldc "-histo:"
invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
ifeq 38
36: aload 7
aload 1
ldc "-histo:"
invokevirtual java.lang.String.length:()I
invokevirtual java.lang.String.substring:(I)Ljava/lang/String;
invokestatic sun.tools.jmap.JMap.histo:(Ljava/lang/String;Ljava/lang/String;)V
37: goto 48
StackMap locals:
StackMap stack:
38: aload 1
ldc "-dump:"
invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
ifeq 41
39: aload 7
aload 1
ldc "-dump:"
invokevirtual java.lang.String.length:()I
invokevirtual java.lang.String.substring:(I)Ljava/lang/String;
invokestatic sun.tools.jmap.JMap.dump:(Ljava/lang/String;Ljava/lang/String;)V
40: goto 48
StackMap locals:
StackMap stack:
41: aload 1
ldc "-finalizerinfo"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 44
42: aload 7
ldc "jcmd"
iconst_1
anewarray java.lang.Object
dup
iconst_0
ldc "GC.finalizer_info"
aastore
invokestatic sun.tools.jmap.JMap.executeCommandForPid:(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)V
43: goto 48
StackMap locals:
StackMap stack:
44: aload 1
ldc "-clstats"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 47
45: aload 7
ldc "jcmd"
iconst_1
anewarray java.lang.Object
dup
iconst_0
ldc "GC.class_stats"
aastore
invokestatic sun.tools.jmap.JMap.executeCommandForPid:(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)V
46: goto 48
47: StackMap locals:
StackMap stack:
iconst_1
invokestatic sun.tools.jmap.JMap.usage:(I)V
end local 7 48: StackMap locals: java.lang.String[] java.lang.String int int java.lang.String sun.tools.common.ProcessArgumentMatcher java.util.Collection top java.util.Iterator
StackMap stack:
aload 8
invokeinterface java.util.Iterator.hasNext:()Z
ifne 29
49: 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 50 0 args [Ljava/lang/String;
4 50 1 option Ljava/lang/String;
5 50 2 optionCount I
7 16 3 arg Ljava/lang/String;
20 50 3 paramCount I
23 50 4 pidArg Ljava/lang/String;
24 50 5 ap Lsun/tools/common/ProcessArgumentMatcher;
25 50 6 pids Ljava/util/Collection<Ljava/lang/String;>;
30 48 7 pid Ljava/lang/String;
Exceptions:
throws java.lang.Exception
MethodParameters:
Name Flags
args
private static void executeCommandForPid(java.lang.String, java.lang.String, java.lang.Object[]);
descriptor: (Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)V
flags: (0x008a) ACC_PRIVATE, ACC_STATIC, ACC_VARARGS
Code:
stack=6, locals=11, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokestatic com.sun.tools.attach.VirtualMachine.attach:(Ljava/lang/String;)Lcom/sun/tools/attach/VirtualMachine;
astore 3
start local 3 1: aload 3
checkcast sun.tools.attach.HotSpotVirtualMachine
astore 4
start local 4 2: aconst_null
astore 5
aconst_null
astore 6
3: aload 4
aload 1
aload 2
invokevirtual sun.tools.attach.HotSpotVirtualMachine.executeCommand:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/io/InputStream;
astore 7
start local 7 4: sipush 256
newarray 8
astore 8
start local 8 5: StackMap locals: java.lang.String java.lang.String java.lang.Object[] com.sun.tools.attach.VirtualMachine sun.tools.attach.HotSpotVirtualMachine java.lang.Throwable java.lang.Throwable java.io.InputStream byte[]
StackMap stack:
aload 7
aload 8
invokevirtual java.io.InputStream.read:([B)I
istore 9
start local 9 6: iload 9
ifle 9
7: new java.lang.String
dup
aload 8
iconst_0
iload 9
ldc "UTF-8"
invokespecial java.lang.String.<init>:([BIILjava/lang/String;)V
astore 10
start local 10 8: getstatic java.lang.System.out:Ljava/io/PrintStream;
aload 10
invokevirtual java.io.PrintStream.print:(Ljava/lang/String;)V
end local 10 9: StackMap locals: int
StackMap stack:
iload 9
10: ifgt 5
end local 9 end local 8 11: aload 7
ifnull 17
aload 7
invokevirtual java.io.InputStream.close:()V
goto 17
StackMap locals: java.lang.String java.lang.String java.lang.Object[] com.sun.tools.attach.VirtualMachine sun.tools.attach.HotSpotVirtualMachine java.lang.Throwable java.lang.Throwable java.io.InputStream
StackMap stack: java.lang.Throwable
12: astore 5
aload 7
ifnull 13
aload 7
invokevirtual java.io.InputStream.close:()V
end local 7 StackMap locals:
StackMap stack:
13: aload 5
athrow
StackMap locals:
StackMap stack: java.lang.Throwable
14: astore 6
aload 5
ifnonnull 15
aload 6
astore 5
goto 16
StackMap locals:
StackMap stack:
15: aload 5
aload 6
if_acmpeq 16
aload 5
aload 6
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
16: aload 5
athrow
17: StackMap locals:
StackMap stack:
aload 3
invokevirtual com.sun.tools.attach.VirtualMachine.detach:()V
18: return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 19 0 pid Ljava/lang/String;
0 19 1 command Ljava/lang/String;
0 19 2 args [Ljava/lang/Object;
1 19 3 vm Lcom/sun/tools/attach/VirtualMachine;
2 19 4 hvm Lsun/tools/attach/HotSpotVirtualMachine;
4 13 7 in Ljava/io/InputStream;
5 11 8 b [B
6 11 9 n I
8 9 10 s Ljava/lang/String;
Exception table:
from to target type
4 11 12 any
3 14 14 any
Exceptions:
throws com.sun.tools.attach.AttachNotSupportedException, java.io.IOException, java.io.UnsupportedEncodingException
MethodParameters:
Name Flags
pid
command
args
private static void histo(java.lang.String, java.lang.String);
descriptor: (Ljava/lang/String;Ljava/lang/String;)V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=6, locals=3, args_size=2
start local 0 start local 1 0: ldc "-all"
astore 2
start local 2 1: aload 1
ldc ""
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 6
aload 1
ldc "all"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 6
2: aload 1
ldc "live"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 5
3: ldc "-live"
astore 2
4: goto 6
5: StackMap locals: java.lang.String
StackMap stack:
iconst_1
invokestatic sun.tools.jmap.JMap.usage:(I)V
6: StackMap locals:
StackMap stack:
aload 0
ldc "inspectheap"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 2
aastore
invokestatic sun.tools.jmap.JMap.executeCommandForPid:(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)V
7: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 pid Ljava/lang/String;
0 8 1 options Ljava/lang/String;
1 8 2 liveopt Ljava/lang/String;
Exceptions:
throws com.sun.tools.attach.AttachNotSupportedException, java.io.IOException, java.io.UnsupportedEncodingException
MethodParameters:
Name Flags
pid
options
private static void dump(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: aload 1
ldc ","
invokevirtual java.lang.String.split:(Ljava/lang/String;)[Ljava/lang/String;
astore 2
start local 2 1: aconst_null
astore 3
start local 3 2: ldc "-all"
astore 4
start local 4 3: iconst_0
istore 5
start local 5 4: goto 13
5: StackMap locals: java.lang.String java.lang.String java.lang.String[] java.lang.String java.lang.String int
StackMap stack:
aload 2
iload 5
aaload
astore 6
start local 6 6: aload 6
ldc "live"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 9
7: ldc "-live"
astore 4
8: goto 12
StackMap locals: java.lang.String
StackMap stack:
9: aload 6
ldc "file="
invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
ifeq 12
10: aload 6
invokevirtual java.lang.String.length:()I
iconst_5
if_icmple 12
11: aload 6
iconst_5
invokevirtual java.lang.String.substring:(I)Ljava/lang/String;
astore 3
end local 6 12: StackMap locals:
StackMap stack:
iinc 5 1
StackMap locals:
StackMap stack:
13: iload 5
aload 2
arraylength
if_icmplt 5
end local 5 14: aload 3
ifnonnull 16
15: iconst_1
invokestatic sun.tools.jmap.JMap.usage:(I)V
16: StackMap locals:
StackMap stack:
new java.io.File
dup
aload 3
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
invokevirtual java.io.File.getCanonicalPath:()Ljava/lang/String;
astore 3
17: aload 0
ldc "dumpheap"
iconst_2
anewarray java.lang.Object
dup
iconst_0
aload 3
aastore
dup
iconst_1
aload 4
aastore
invokestatic sun.tools.jmap.JMap.executeCommandForPid:(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)V
18: return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 19 0 pid Ljava/lang/String;
0 19 1 options Ljava/lang/String;
1 19 2 subopts [Ljava/lang/String;
2 19 3 filename Ljava/lang/String;
3 19 4 liveopt Ljava/lang/String;
4 14 5 i I
6 12 6 subopt Ljava/lang/String;
Exceptions:
throws com.sun.tools.attach.AttachNotSupportedException, java.io.IOException, java.io.UnsupportedEncodingException
MethodParameters:
Name Flags
pid
options
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.jmap.JMap.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 "-heap"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 7
6: ldc "-heap option used"
invokestatic sun.tools.jmap.JMap.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.jmap.JMap.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 jmap 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 " jmap -clstats <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 and print class loader statistics"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
3: getstatic java.lang.System.err:Ljava/io/PrintStream;
ldc " jmap -finalizerinfo <pid>"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
4: getstatic java.lang.System.err:Ljava/io/PrintStream;
ldc " to connect to running process and print information on objects awaiting finalization"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
5: getstatic java.lang.System.err:Ljava/io/PrintStream;
ldc " jmap -histo[:live] <pid>"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
6: getstatic java.lang.System.err:Ljava/io/PrintStream;
ldc " to connect to running process and print histogram of java object heap"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
7: getstatic java.lang.System.err:Ljava/io/PrintStream;
ldc " if the \"live\" suboption is specified, only count live objects"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
8: getstatic java.lang.System.err:Ljava/io/PrintStream;
ldc " jmap -dump:<dump-options> <pid>"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
9: getstatic java.lang.System.err:Ljava/io/PrintStream;
ldc " to connect to running process and dump java heap"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
10: getstatic java.lang.System.err:Ljava/io/PrintStream;
ldc ""
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
11: getstatic java.lang.System.err:Ljava/io/PrintStream;
ldc " dump-options:"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
12: getstatic java.lang.System.err:Ljava/io/PrintStream;
ldc " live dump only live objects; if not specified,"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
13: getstatic java.lang.System.err:Ljava/io/PrintStream;
ldc " all objects in the heap are dumped."
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
14: getstatic java.lang.System.err:Ljava/io/PrintStream;
ldc " format=b binary format"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
15: getstatic java.lang.System.err:Ljava/io/PrintStream;
ldc " file=<file> dump heap to <file>"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
16: getstatic java.lang.System.err:Ljava/io/PrintStream;
ldc ""
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
17: getstatic java.lang.System.err:Ljava/io/PrintStream;
ldc " Example: jmap -dump:live,format=b,file=heap.bin <pid>"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
18: iload 0
invokestatic java.lang.System.exit:(I)V
19: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 20 0 exit I
MethodParameters:
Name Flags
exit
}
SourceFile: "JMap.java"