public class sun.tools.jcmd.JCmd
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: sun.tools.jcmd.JCmd
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/jcmd/JCmd;
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: aconst_null
astore 1
start local 1 1: new sun.tools.jcmd.Arguments
dup
aload 0
invokespecial sun.tools.jcmd.Arguments.<init>:([Ljava/lang/String;)V
astore 1
2: goto 9
StackMap locals: java.lang.String[] sun.tools.jcmd.Arguments
StackMap stack: java.lang.IllegalArgumentException
3: astore 2
start local 2 4: getstatic java.lang.System.err:Ljava/io/PrintStream;
new java.lang.StringBuilder
dup
ldc "Error parsing arguments: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 2
invokevirtual java.lang.IllegalArgumentException.getMessage:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
5: ldc "\n"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
6: invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
7: invokestatic sun.tools.jcmd.Arguments.usage:()V
8: iconst_1
invokestatic java.lang.System.exit:(I)V
end local 2 9: StackMap locals:
StackMap stack:
aload 1
invokevirtual sun.tools.jcmd.Arguments.isShowUsage:()Z
ifeq 12
10: invokestatic sun.tools.jcmd.Arguments.usage:()V
11: iconst_0
invokestatic java.lang.System.exit:(I)V
12: StackMap locals:
StackMap stack:
aconst_null
astore 2
start local 2 13: new sun.tools.common.ProcessArgumentMatcher
dup
aload 1
invokevirtual sun.tools.jcmd.Arguments.getProcessString:()Ljava/lang/String;
invokespecial sun.tools.common.ProcessArgumentMatcher.<init>:(Ljava/lang/String;)V
astore 2
14: goto 18
StackMap locals: java.lang.String[] sun.tools.jcmd.Arguments sun.tools.common.ProcessArgumentMatcher
StackMap stack: java.lang.IllegalArgumentException
15: pop
16: getstatic java.lang.System.err:Ljava/io/PrintStream;
new java.lang.StringBuilder
dup
ldc "Invalid pid '"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual sun.tools.jcmd.Arguments.getProcessString:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc "' specified"
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
17: iconst_1
invokestatic java.lang.System.exit:(I)V
18: StackMap locals:
StackMap stack:
aload 1
invokevirtual sun.tools.jcmd.Arguments.isListProcesses:()Z
ifeq 24
19: aload 2
invokevirtual sun.tools.common.ProcessArgumentMatcher.getVirtualMachineDescriptors:()Ljava/util/Collection;
invokeinterface java.util.Collection.iterator:()Ljava/util/Iterator;
astore 4
goto 22
StackMap locals: java.lang.String[] sun.tools.jcmd.Arguments sun.tools.common.ProcessArgumentMatcher top java.util.Iterator
StackMap stack:
20: aload 4
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast com.sun.tools.attach.VirtualMachineDescriptor
astore 3
start local 3 21: getstatic java.lang.System.out:Ljava/io/PrintStream;
new java.lang.StringBuilder
dup
aload 3
invokevirtual com.sun.tools.attach.VirtualMachineDescriptor.id:()Ljava/lang/String;
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 3
invokevirtual com.sun.tools.attach.VirtualMachineDescriptor.displayName:()Ljava/lang/String;
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
end local 3 22: StackMap locals:
StackMap stack:
aload 4
invokeinterface java.util.Iterator.hasNext:()Z
ifne 20
23: iconst_0
invokestatic java.lang.System.exit:(I)V
24: StackMap locals: java.lang.String[] sun.tools.jcmd.Arguments sun.tools.common.ProcessArgumentMatcher
StackMap stack:
aload 2
ldc Lsun/tools/jcmd/JCmd;
invokevirtual sun.tools.common.ProcessArgumentMatcher.getVirtualMachinePids:(Ljava/lang/Class;)Ljava/util/Collection;
astore 3
start local 3 25: aload 3
invokeinterface java.util.Collection.isEmpty:()Z
ifeq 30
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
27: aload 1
invokevirtual sun.tools.jcmd.Arguments.getProcessString:()Ljava/lang/String;
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;
28: invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
29: iconst_1
invokestatic java.lang.System.exit:(I)V
30: StackMap locals: java.util.Collection
StackMap stack:
iconst_1
istore 4
start local 4 31: aload 3
invokeinterface java.util.Collection.iterator:()Ljava/util/Iterator;
astore 6
goto 46
StackMap locals: java.lang.String[] sun.tools.jcmd.Arguments sun.tools.common.ProcessArgumentMatcher java.util.Collection int top java.util.Iterator
StackMap stack:
32: aload 6
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.lang.String
astore 5
start local 5 33: getstatic java.lang.System.out:Ljava/io/PrintStream;
new java.lang.StringBuilder
dup
aload 5
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;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
34: aload 1
invokevirtual sun.tools.jcmd.Arguments.isListCounters:()Z
ifeq 37
35: aload 5
invokestatic sun.tools.jcmd.JCmd.listCounters:(Ljava/lang/String;)V
36: goto 46
37: StackMap locals: java.lang.String[] sun.tools.jcmd.Arguments sun.tools.common.ProcessArgumentMatcher java.util.Collection int java.lang.String java.util.Iterator
StackMap stack:
aload 5
aload 1
invokevirtual sun.tools.jcmd.Arguments.getCommand:()Ljava/lang/String;
invokestatic sun.tools.jcmd.JCmd.executeCommandForPid:(Ljava/lang/String;Ljava/lang/String;)V
38: goto 46
StackMap locals:
StackMap stack: com.sun.tools.attach.AttachOperationFailedException
39: astore 7
start local 7 40: getstatic java.lang.System.err:Ljava/io/PrintStream;
aload 7
invokevirtual com.sun.tools.attach.AttachOperationFailedException.getMessage:()Ljava/lang/String;
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
41: iconst_0
istore 4
end local 7 42: goto 46
43: StackMap locals:
StackMap stack: java.lang.Exception
astore 7
start local 7 44: aload 7
invokevirtual java.lang.Exception.printStackTrace:()V
45: iconst_0
istore 4
end local 7 end local 5 46: StackMap locals: java.lang.String[] sun.tools.jcmd.Arguments sun.tools.common.ProcessArgumentMatcher java.util.Collection int top java.util.Iterator
StackMap stack:
aload 6
invokeinterface java.util.Iterator.hasNext:()Z
ifne 32
47: iload 4
ifeq 48
iconst_0
goto 49
StackMap locals: java.lang.String[] sun.tools.jcmd.Arguments sun.tools.common.ProcessArgumentMatcher java.util.Collection int
StackMap stack:
48: iconst_1
StackMap locals:
StackMap stack: int
49: invokestatic java.lang.System.exit:(I)V
50: return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 51 0 args [Ljava/lang/String;
1 51 1 arg Lsun/tools/jcmd/Arguments;
4 9 2 ex Ljava/lang/IllegalArgumentException;
13 51 2 ap Lsun/tools/common/ProcessArgumentMatcher;
21 22 3 vmd Lcom/sun/tools/attach/VirtualMachineDescriptor;
25 51 3 pids Ljava/util/Collection<Ljava/lang/String;>;
31 51 4 success Z
33 46 5 pid Ljava/lang/String;
40 42 7 ex Lcom/sun/tools/attach/AttachOperationFailedException;
44 46 7 ex Ljava/lang/Exception;
Exception table:
from to target type
1 2 3 Class java.lang.IllegalArgumentException
13 14 15 Class java.lang.IllegalArgumentException
37 38 39 Class com.sun.tools.attach.AttachOperationFailedException
37 38 43 Class java.lang.Exception
MethodParameters:
Name Flags
args
private static void executeCommandForPid(java.lang.String, java.lang.String);
descriptor: (Ljava/lang/String;Ljava/lang/String;)V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=4, locals=10, args_size=2
start local 0 start local 1 0: aload 0
invokestatic com.sun.tools.attach.VirtualMachine.attach:(Ljava/lang/String;)Lcom/sun/tools/attach/VirtualMachine;
astore 2
start local 2 1: aload 2
checkcast sun.tools.attach.HotSpotVirtualMachine
astore 3
start local 3 2: aload 1
ldc "\\n"
invokevirtual java.lang.String.split:(Ljava/lang/String;)[Ljava/lang/String;
astore 4
start local 4 3: aload 4
dup
astore 8
arraylength
istore 7
iconst_0
istore 6
goto 11
StackMap locals: java.lang.String java.lang.String com.sun.tools.attach.VirtualMachine sun.tools.attach.HotSpotVirtualMachine java.lang.String[] top int int java.lang.String[]
StackMap stack:
4: aload 8
iload 6
aaload
astore 5
start local 5 5: aload 5
invokevirtual java.lang.String.trim:()Ljava/lang/String;
ldc "stop"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 7
6: goto 12
7: StackMap locals: java.lang.String java.lang.String com.sun.tools.attach.VirtualMachine sun.tools.attach.HotSpotVirtualMachine java.lang.String[] java.lang.String int int java.lang.String[]
StackMap stack:
aload 3
aload 5
invokevirtual sun.tools.attach.HotSpotVirtualMachine.executeJCmd:(Ljava/lang/String;)Ljava/io/InputStream;
astore 9
start local 9 8: aload 9
getstatic java.lang.System.out:Ljava/io/PrintStream;
invokestatic sun.tools.common.PrintStreamPrinter.drainUTF8:(Ljava/io/InputStream;Ljava/io/PrintStream;)J
lconst_0
lcmp
ifne 10
9: getstatic java.lang.System.out:Ljava/io/PrintStream;
ldc "Command executed successfully"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
end local 9 end local 5 10: StackMap locals: java.lang.String java.lang.String com.sun.tools.attach.VirtualMachine sun.tools.attach.HotSpotVirtualMachine java.lang.String[] top int int java.lang.String[]
StackMap stack:
iinc 6 1
StackMap locals:
StackMap stack:
11: iload 6
iload 7
if_icmplt 4
12: StackMap locals: java.lang.String java.lang.String com.sun.tools.attach.VirtualMachine sun.tools.attach.HotSpotVirtualMachine java.lang.String[]
StackMap stack:
aload 2
invokevirtual com.sun.tools.attach.VirtualMachine.detach:()V
13: return
end local 4 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 command Ljava/lang/String;
1 14 2 vm Lcom/sun/tools/attach/VirtualMachine;
2 14 3 hvm Lsun/tools/attach/HotSpotVirtualMachine;
3 14 4 lines [Ljava/lang/String;
5 10 5 line Ljava/lang/String;
8 10 9 is Ljava/io/InputStream;
Exceptions:
throws com.sun.tools.attach.AttachNotSupportedException, java.io.IOException, java.io.UnsupportedEncodingException
MethodParameters:
Name Flags
pid
command
private static void listCounters(java.lang.String);
descriptor: (Ljava/lang/String;)V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=6, locals=5, args_size=1
start local 0 0: aconst_null
astore 1
start local 1 1: new sun.jvmstat.monitor.VmIdentifier
dup
aload 0
invokespecial sun.jvmstat.monitor.VmIdentifier.<init>:(Ljava/lang/String;)V
astore 1
2: goto 6
StackMap locals: java.lang.String sun.jvmstat.monitor.VmIdentifier
StackMap stack: java.net.URISyntaxException
3: pop
4: getstatic java.lang.System.err:Ljava/io/PrintStream;
new java.lang.StringBuilder
dup
ldc "Malformed VM Identifier: "
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
5: return
6: StackMap locals:
StackMap stack:
aload 1
invokestatic sun.jvmstat.monitor.MonitoredHost.getMonitoredHost:(Lsun/jvmstat/monitor/VmIdentifier;)Lsun/jvmstat/monitor/MonitoredHost;
astore 2
start local 2 7: aload 2
aload 1
iconst_m1
invokevirtual sun.jvmstat.monitor.MonitoredHost.getMonitoredVm:(Lsun/jvmstat/monitor/VmIdentifier;I)Lsun/jvmstat/monitor/MonitoredVm;
astore 3
start local 3 8: new sun.tools.jstat.JStatLogger
dup
aload 3
invokespecial sun.tools.jstat.JStatLogger.<init>:(Lsun/jvmstat/monitor/MonitoredVm;)V
astore 4
start local 4 9: aload 4
ldc "\\w*"
10: new sun.tools.jcmd.JCmd$AscendingMonitorComparator
dup
invokespecial sun.tools.jcmd.JCmd$AscendingMonitorComparator.<init>:()V
11: iconst_0
12: iconst_1
13: getstatic java.lang.System.out:Ljava/io/PrintStream;
14: invokevirtual sun.tools.jstat.JStatLogger.printSnapShot:(Ljava/lang/String;Ljava/util/Comparator;ZZLjava/io/PrintStream;)V
15: aload 2
aload 3
invokevirtual sun.jvmstat.monitor.MonitoredHost.detach:(Lsun/jvmstat/monitor/MonitoredVm;)V
end local 4 end local 3 end local 2 16: goto 19
StackMap locals:
StackMap stack: sun.jvmstat.monitor.MonitorException
17: astore 2
start local 2 18: aload 2
invokevirtual sun.jvmstat.monitor.MonitorException.printStackTrace:()V
end local 2 19: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 20 0 pid Ljava/lang/String;
1 20 1 vmId Lsun/jvmstat/monitor/VmIdentifier;
7 16 2 monitoredHost Lsun/jvmstat/monitor/MonitoredHost;
8 16 3 monitoredVm Lsun/jvmstat/monitor/MonitoredVm;
9 16 4 logger Lsun/tools/jstat/JStatLogger;
18 19 2 ex Lsun/jvmstat/monitor/MonitorException;
Exception table:
from to target type
1 2 3 Class java.net.URISyntaxException
6 16 17 Class sun.jvmstat.monitor.MonitorException
MethodParameters:
Name Flags
pid
}
SourceFile: "JCmd.java"
NestMembers:
sun.tools.jcmd.JCmd$AscendingMonitorComparator
InnerClasses:
AscendingMonitorComparator = sun.tools.jcmd.JCmd$AscendingMonitorComparator of sun.tools.jcmd.JCmd