sun.tools.attach.LinuxVirtualMachine.class Maven / Gradle / Ivy
???? 2 $sun/tools/attach/LinuxVirtualMachine &sun/tools/attach/HotSpotVirtualMachine tmpdir Ljava/lang/String; isLinuxThreads Z path PROTOCOL_VERSION
ConstantValue
1 ATTACH_ERROR_BADVERSION I e $assertionsDisabled ()V Code
java/lang/Class desiredAssertionStatus ()Z java.io.tmpdir
" ! java/lang/System # $ getProperty &(Ljava/lang/String;)Ljava/lang/String; & ( attach
* + , loadLibrary (Ljava/lang/String;)V
. 0 LineNumberTable LocalVariableTable
StackMapTable >(Lcom/sun/tools/attach/spi/AttachProvider;Ljava/lang/String;)V
Exceptions 8 0com/sun/tools/attach/AttachNotSupportedException : java/io/IOException
< 4 5
> @ ? java/lang/Integer A B parseInt (Ljava/lang/String;)I D Invalid process identifier
7 F 4 ,
H I J findSocketFile (I)Ljava/lang/String; L
N O P createAttachFile (I)Ljava/io/File;
R S T getLinuxThreadsManager (I)I
9 V W X
getMessage ()Ljava/lang/String; Z java/lang/AssertionError
Y \ 4
^ _ ` sendQuitToChildrenOf (I)V
b c `
sendQuitTo ?
g h i
attachTimeout ()J
k m l java/lang/Thread n o sleep (J)V q RUnable to open socket file: target process not responding or HotSpot VM not loaded
s u t java/io/File v delete
x y , checkPermissions
{ | } socket ()I
? ? connect (ILjava/lang/String;)V
? ? ` close ? java/lang/NumberFormatException ? java/lang/InterruptedException this &Lsun/tools/attach/LinuxVirtualMachine; provider )Lcom/sun/tools/attach/spi/AttachProvider; vmid pid x !Ljava/lang/NumberFormatException; f Ljava/io/File; mpid Ljava/io/IOException; i delay J retries s ? 'com/sun/tools/attach/spi/AttachProvider ? java/lang/String ? java/lang/Throwable detach execute <(Ljava/lang/String;[Ljava/lang/Object;)Ljava/io/InputStream; ? 'com/sun/tools/attach/AgentLoadException ? Detached from target VM
9 F
? ? ? writeString ? ? 6sun/tools/attach/LinuxVirtualMachine$SocketInputStream
? ? 4 ? *(Lsun/tools/attach/LinuxVirtualMachine;I)V
? ? ? readInt (Ljava/io/InputStream;)I
? ? ? ? Protocol mismatch with target VM ? load
? ? ? ? equals (Ljava/lang/Object;)Z ? Failed to load agent library
? F ? Command failed in target VM cmd args [Ljava/lang/Object; p ioe sis 8Lsun/tools/attach/LinuxVirtualMachine$SocketInputStream; completionStatus ? ? java/lang/StringBuilder ? .java_pid
? F
? ? ? ? append (I)Ljava/lang/StringBuilder;
? ? ? X toString ? /proc/ ? /cwd/
? ? ? ? -(Ljava/lang/String;)Ljava/lang/StringBuilder;
s F
s ? ? exists
s ? 4 ? '(Ljava/lang/String;Ljava/lang/String;)V
s ? ? X getPath fn ? .attach_pid
s ? ?
createNewFile
? ? ? } length ? UTF-8
? ? ? ? getBytes (Ljava/lang/String;)[B ? java/lang/InternalError
? \
? ? write (I[BII)V $java/io/UnsupportedEncodingException fd b [B &Ljava/io/UnsupportedEncodingException; read (I[BII)I
SourceFile LinuxVirtualMachine.java InnerClasses SocketInputStream !
[ $? ? ? ? ? ? %'? )? -? /? 1 % ' R S 2 3 @ 4 5 6 7 9 ? ?*+,? ;,? =>? :? 7YC? E?**? G? K*? K? ?*? M:? /? 7? Q6? :? 7Y? U? E?? ? ? ? YY? [?? ]? ? a6 d7*? fm?6? j? : **? G? K??
*? K???*? K? ? 7Yp? E?:
? rW
?? rW*? K? w? z6*? K? ~?
:? ??? ?? ? 7 = @ 9 ? ? ? ? 1 ? ? ? ? ? 1 ? &