public class sun.tools.attach.SolarisVirtualMachine extends sun.tools.attach.HotSpotVirtualMachine
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: sun.tools.attach.SolarisVirtualMachine
super_class: sun.tools.attach.HotSpotVirtualMachine
{
private int fd;
descriptor: I
flags: (0x0002) ACC_PRIVATE
static final boolean $assertionsDisabled;
descriptor: Z
flags: (0x1018) ACC_STATIC, ACC_FINAL, ACC_SYNTHETIC
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: ldc Lsun/tools/attach/SolarisVirtualMachine;
invokevirtual java.lang.Class.desiredAssertionStatus:()Z
ifne 1
iconst_1
goto 2
StackMap locals:
StackMap stack:
1: iconst_0
StackMap locals:
StackMap stack: int
2: putstatic sun.tools.attach.SolarisVirtualMachine.$assertionsDisabled:Z
3: ldc "attach"
invokestatic java.lang.System.loadLibrary:(Ljava/lang/String;)V
4: return
LocalVariableTable:
Start End Slot Name Signature
void <init>(com.sun.tools.attach.spi.AttachProvider, java.lang.String);
descriptor: (Lcom/sun/tools/attach/spi/AttachProvider;Ljava/lang/String;)V
flags: (0x0000)
Code:
stack=4, locals=10, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 1
aload 2
invokespecial sun.tools.attach.HotSpotVirtualMachine.<init>:(Lcom/sun/tools/attach/spi/AttachProvider;Ljava/lang/String;)V
1: aload 0
iconst_m1
putfield sun.tools.attach.SolarisVirtualMachine.fd:I
2: aload 2
invokestatic java.lang.Integer.parseInt:(Ljava/lang/String;)I
istore 3
start local 3 3: goto 6
end local 3 StackMap locals: sun.tools.attach.SolarisVirtualMachine com.sun.tools.attach.spi.AttachProvider java.lang.String
StackMap stack: java.lang.NumberFormatException
4: pop
5: new com.sun.tools.attach.AttachNotSupportedException
dup
ldc "invalid process identifier"
invokespecial com.sun.tools.attach.AttachNotSupportedException.<init>:(Ljava/lang/String;)V
athrow
start local 3 6: StackMap locals: int
StackMap stack:
aload 0
aload 0
iload 3
invokevirtual sun.tools.attach.SolarisVirtualMachine.openDoor:(I)I
putfield sun.tools.attach.SolarisVirtualMachine.fd:I
7: goto 30
StackMap locals:
StackMap stack: java.io.FileNotFoundException
8: pop
9: aload 0
iload 3
invokevirtual sun.tools.attach.SolarisVirtualMachine.createAttachFile:(I)Ljava/io/File;
astore 4
start local 4 10: iload 3
invokestatic sun.tools.attach.SolarisVirtualMachine.sigquit:(I)V
11: iconst_0
istore 5
start local 5 12: ldc 200
lstore 6
start local 6 13: aload 0
invokevirtual sun.tools.attach.SolarisVirtualMachine.attachTimeout:()J
lload 6
ldiv
l2i
istore 8
start local 8 14: StackMap locals: sun.tools.attach.SolarisVirtualMachine com.sun.tools.attach.spi.AttachProvider java.lang.String int java.io.File int long int
StackMap stack:
lload 6
invokestatic java.lang.Thread.sleep:(J)V
15: goto 17
StackMap locals:
StackMap stack: java.lang.InterruptedException
16: pop
17: StackMap locals:
StackMap stack:
aload 0
aload 0
iload 3
invokevirtual sun.tools.attach.SolarisVirtualMachine.openDoor:(I)I
putfield sun.tools.attach.SolarisVirtualMachine.fd:I
18: goto 20
StackMap locals:
StackMap stack: java.io.FileNotFoundException
19: pop
20: StackMap locals:
StackMap stack:
iinc 5 1
21: iload 5
iload 8
if_icmpgt 22
aload 0
getfield sun.tools.attach.SolarisVirtualMachine.fd:I
iconst_m1
if_icmpeq 14
22: StackMap locals:
StackMap stack:
aload 0
getfield sun.tools.attach.SolarisVirtualMachine.fd:I
iconst_m1
if_icmpne 29
23: new com.sun.tools.attach.AttachNotSupportedException
dup
24: ldc "Unable to open door: target process not responding or HotSpot VM not loaded"
25: invokespecial com.sun.tools.attach.AttachNotSupportedException.<init>:(Ljava/lang/String;)V
athrow
end local 8 end local 6 end local 5 26: StackMap locals: sun.tools.attach.SolarisVirtualMachine com.sun.tools.attach.spi.AttachProvider java.lang.String int java.io.File
StackMap stack: java.lang.Throwable
astore 9
27: aload 4
invokevirtual java.io.File.delete:()Z
pop
28: aload 9
athrow
29: StackMap locals:
StackMap stack:
aload 4
invokevirtual java.io.File.delete:()Z
pop
end local 4 30: StackMap locals:
StackMap stack:
getstatic sun.tools.attach.SolarisVirtualMachine.$assertionsDisabled:Z
ifne 31
aload 0
getfield sun.tools.attach.SolarisVirtualMachine.fd:I
ifge 31
new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
31: StackMap locals:
StackMap stack:
return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 32 0 this Lsun/tools/attach/SolarisVirtualMachine;
0 32 1 provider Lcom/sun/tools/attach/spi/AttachProvider;
0 32 2 vmid Ljava/lang/String;
3 4 3 pid I
6 32 3 pid I
10 30 4 f Ljava/io/File;
12 26 5 i I
13 26 6 delay J
14 26 8 retries I
Exception table:
from to target type
2 3 4 Class java.lang.NumberFormatException
6 7 8 Class java.io.FileNotFoundException
14 15 16 Class java.lang.InterruptedException
17 18 19 Class java.io.FileNotFoundException
10 26 26 any
Exceptions:
throws com.sun.tools.attach.AttachNotSupportedException, java.io.IOException
MethodParameters:
Name Flags
provider
vmid
public void detach();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=1
start local 0 0: aload 0
dup
astore 1
monitorenter
1: aload 0
getfield sun.tools.attach.SolarisVirtualMachine.fd:I
iconst_m1
if_icmpeq 4
2: aload 0
getfield sun.tools.attach.SolarisVirtualMachine.fd:I
invokestatic sun.tools.attach.SolarisVirtualMachine.close:(I)V
3: aload 0
iconst_m1
putfield sun.tools.attach.SolarisVirtualMachine.fd:I
4: StackMap locals: sun.tools.attach.SolarisVirtualMachine
StackMap stack:
aload 1
monitorexit
5: goto 8
StackMap locals:
StackMap stack: java.lang.Throwable
6: aload 1
monitorexit
7: athrow
8: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lsun/tools/attach/SolarisVirtualMachine;
Exception table:
from to target type
1 5 6 any
6 7 6 any
Exceptions:
throws java.io.IOException
java.io.InputStream execute(java.lang.String, java.lang.Object[]);
descriptor: (Ljava/lang/String;[Ljava/lang/Object;)Ljava/io/InputStream;
flags: (0x0080) ACC_VARARGS
Code:
stack=4, locals=8, args_size=3
start local 0 start local 1 start local 2 0: getstatic sun.tools.attach.SolarisVirtualMachine.$assertionsDisabled:Z
ifne 1
aload 2
arraylength
iconst_3
if_icmple 1
new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
1: StackMap locals:
StackMap stack:
aload 0
dup
astore 4
monitorenter
2: aload 0
getfield sun.tools.attach.SolarisVirtualMachine.fd:I
iconst_m1
if_icmpne 4
3: new java.io.IOException
dup
ldc "Detached from target VM"
invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals: sun.tools.attach.SolarisVirtualMachine java.lang.String java.lang.Object[] top sun.tools.attach.SolarisVirtualMachine
StackMap stack:
aload 0
getfield sun.tools.attach.SolarisVirtualMachine.fd:I
istore 3
start local 3 5: aload 4
monitorexit
6: goto 9
end local 3 StackMap locals:
StackMap stack: java.lang.Throwable
7: aload 4
monitorexit
8: athrow
start local 3 9: StackMap locals: sun.tools.attach.SolarisVirtualMachine java.lang.String java.lang.Object[] int
StackMap stack:
iload 3
aload 1
aload 2
invokestatic sun.tools.attach.SolarisVirtualMachine.enqueue:(ILjava/lang/String;[Ljava/lang/Object;)I
istore 4
start local 4 10: getstatic sun.tools.attach.SolarisVirtualMachine.$assertionsDisabled:Z
ifne 11
iload 4
ifge 11
new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
11: StackMap locals: int
StackMap stack:
new sun.tools.attach.SolarisVirtualMachine$SocketInputStream
dup
aload 0
iload 4
invokespecial sun.tools.attach.SolarisVirtualMachine$SocketInputStream.<init>:(Lsun/tools/attach/SolarisVirtualMachine;I)V
astore 5
start local 5 12: aload 0
aload 5
invokevirtual sun.tools.attach.SolarisVirtualMachine.readInt:(Ljava/io/InputStream;)I
istore 6
start local 6 13: goto 17
end local 6 StackMap locals: sun.tools.attach.SolarisVirtualMachine java.lang.String java.lang.Object[] int int sun.tools.attach.SolarisVirtualMachine$SocketInputStream
StackMap stack: java.io.IOException
14: astore 7
start local 7 15: aload 5
invokevirtual sun.tools.attach.SolarisVirtualMachine$SocketInputStream.close:()V
16: aload 7
athrow
end local 7 start local 6 17: StackMap locals: int
StackMap stack:
iload 6
ifeq 22
18: aload 5
invokevirtual sun.tools.attach.SolarisVirtualMachine$SocketInputStream.close:()V
19: aload 1
ldc "load"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 21
20: new com.sun.tools.attach.AgentLoadException
dup
ldc "Failed to load agent library"
invokespecial com.sun.tools.attach.AgentLoadException.<init>:(Ljava/lang/String;)V
athrow
21: StackMap locals:
StackMap stack:
new java.io.IOException
dup
ldc "Command failed in target VM"
invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
athrow
22: StackMap locals:
StackMap stack:
aload 5
areturn
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 23 0 this Lsun/tools/attach/SolarisVirtualMachine;
0 23 1 cmd Ljava/lang/String;
0 23 2 args [Ljava/lang/Object;
5 7 3 door I
9 23 3 door I
10 23 4 s I
12 23 5 sis Lsun/tools/attach/SolarisVirtualMachine$SocketInputStream;
13 14 6 completionStatus I
17 23 6 completionStatus I
15 17 7 ioe Ljava/io/IOException;
Exception table:
from to target type
2 6 7 any
7 8 7 any
12 13 14 Class java.io.IOException
Exceptions:
throws com.sun.tools.attach.AgentLoadException, java.io.IOException
MethodParameters:
Name Flags
cmd
args
private int openDoor(int);
descriptor: (I)I
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=5, args_size=2
start local 0 start local 1 0: new java.lang.StringBuilder
dup
ldc ".java_pid"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
iload 1
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
astore 2
start local 2 1: new java.lang.StringBuilder
dup
ldc "/proc/"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
iload 1
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
ldc "/cwd/"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 2
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
astore 3
start local 3 2: aload 0
aload 3
invokestatic sun.tools.attach.SolarisVirtualMachine.open:(Ljava/lang/String;)I
putfield sun.tools.attach.SolarisVirtualMachine.fd:I
3: goto 7
StackMap locals: sun.tools.attach.SolarisVirtualMachine int java.lang.String java.lang.String
StackMap stack: java.io.FileNotFoundException
4: pop
5: new java.lang.StringBuilder
dup
ldc "/tmp/"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 2
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
astore 3
6: aload 0
aload 3
invokestatic sun.tools.attach.SolarisVirtualMachine.open:(Ljava/lang/String;)I
putfield sun.tools.attach.SolarisVirtualMachine.fd:I
7: StackMap locals:
StackMap stack:
aload 3
invokestatic sun.tools.attach.SolarisVirtualMachine.checkPermissions:(Ljava/lang/String;)V
8: goto 12
StackMap locals:
StackMap stack: java.io.IOException
9: astore 4
start local 4 10: aload 0
getfield sun.tools.attach.SolarisVirtualMachine.fd:I
invokestatic sun.tools.attach.SolarisVirtualMachine.close:(I)V
11: aload 4
athrow
end local 4 12: StackMap locals:
StackMap stack:
aload 0
getfield sun.tools.attach.SolarisVirtualMachine.fd:I
ireturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 this Lsun/tools/attach/SolarisVirtualMachine;
0 13 1 pid I
1 13 2 fn Ljava/lang/String;
2 13 3 path Ljava/lang/String;
10 12 4 ioe Ljava/io/IOException;
Exception table:
from to target type
2 3 4 Class java.io.FileNotFoundException
7 8 9 Class java.io.IOException
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
pid
private java.io.File createAttachFile(int);
descriptor: (I)Ljava/io/File;
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=5, args_size=2
start local 0 start local 1 0: new java.lang.StringBuilder
dup
ldc ".attach_pid"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
iload 1
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
astore 2
start local 2 1: new java.lang.StringBuilder
dup
ldc "/proc/"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
iload 1
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
ldc "/cwd/"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 2
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
astore 3
start local 3 2: new java.io.File
dup
aload 3
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
astore 4
start local 4 3: aload 4
invokevirtual java.io.File.createNewFile:()Z
pop
4: goto 9
StackMap locals: sun.tools.attach.SolarisVirtualMachine int java.lang.String java.lang.String java.io.File
StackMap stack: java.io.IOException
5: pop
6: new java.lang.StringBuilder
dup
ldc "/tmp/"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 2
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
astore 3
7: new java.io.File
dup
aload 3
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
astore 4
8: aload 4
invokevirtual java.io.File.createNewFile:()Z
pop
9: StackMap locals:
StackMap stack:
aload 4
areturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lsun/tools/attach/SolarisVirtualMachine;
0 10 1 pid I
1 10 2 fn Ljava/lang/String;
2 10 3 path Ljava/lang/String;
3 10 4 f Ljava/io/File;
Exception table:
from to target type
3 4 5 Class java.io.IOException
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
pid
static native int open(java.lang.String);
descriptor: (Ljava/lang/String;)I
flags: (0x0108) ACC_STATIC, ACC_NATIVE
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
path
static native void close(int);
descriptor: (I)V
flags: (0x0108) ACC_STATIC, ACC_NATIVE
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
fd
static native int read(int, byte[], int, int);
descriptor: (I[BII)I
flags: (0x0108) ACC_STATIC, ACC_NATIVE
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
fd
buf
off
buflen
static native void checkPermissions(java.lang.String);
descriptor: (Ljava/lang/String;)V
flags: (0x0108) ACC_STATIC, ACC_NATIVE
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
path
static native void sigquit(int);
descriptor: (I)V
flags: (0x0108) ACC_STATIC, ACC_NATIVE
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
pid
static native int enqueue(int, java.lang.String, java.lang.Object[]);
descriptor: (ILjava/lang/String;[Ljava/lang/Object;)I
flags: (0x0188) ACC_STATIC, ACC_VARARGS, ACC_NATIVE
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
fd
cmd
args
}
SourceFile: "SolarisVirtualMachine.java"
NestMembers:
sun.tools.attach.SolarisVirtualMachine$SocketInputStream
InnerClasses:
private SocketInputStream = sun.tools.attach.SolarisVirtualMachine$SocketInputStream of sun.tools.attach.SolarisVirtualMachine