final class org.glassfish.flashlight.impl.client.AgentAttacherInternal extends java.lang.Object
{
private static final java.util.logging.Logger LOG;
private static boolean isAttached;
void <init>()
{
org.glassfish.flashlight.impl.client.AgentAttacherInternal v;
v := @this: org.glassfish.flashlight.impl.client.AgentAttacherInternal;
specialinvoke v.<java.lang.Object: void <init>()>();
return;
}
static boolean isAttached()
{
boolean v;
v = <org.glassfish.flashlight.impl.client.AgentAttacherInternal: boolean isAttached>;
return v;
}
static boolean attachAgent()
{
boolean v;
v = staticinvoke <org.glassfish.flashlight.impl.client.AgentAttacherInternal: boolean attachAgent(long,java.lang.String)>(-1L, "");
return v;
}
static boolean attachAgent(long, java.lang.String)
{
java.lang.Throwable v;
long v;
java.util.logging.Level v, v, v, v;
byte v, v;
java.lang.ProcessHandle v;
java.lang.String v, v, v, v, v, v, v, v;
boolean v, v, v, v;
com.sun.tools.attach.VirtualMachine v;
java.util.logging.Logger v, v, v, v;
java.io.File v, v;
v := @parameter: long;
v := @parameter: java.lang.String;
label:
v = <org.glassfish.flashlight.impl.client.AgentAttacherInternal: boolean isAttached>;
if v == 0 goto label;
label:
return 1;
label:
v = v cmp 0L;
if v >= 0 goto label;
v = staticinvoke <java.lang.ProcessHandle: java.lang.ProcessHandle current()>();
v = interfaceinvoke v.<java.lang.ProcessHandle: long pid()>();
label:
v = v cmp 0L;
if v >= 0 goto label;
v = <org.glassfish.flashlight.impl.client.AgentAttacherInternal: java.util.logging.Logger LOG>;
v = <java.util.logging.Level: java.util.logging.Level WARNING>;
virtualinvoke v.<java.util.logging.Logger: void log(java.util.logging.Level,java.lang.String)>(v, "NCLS-MON-00501");
label:
return 0;
label:
v = staticinvoke <java.lang.String: java.lang.String valueOf(long)>(v);
v = staticinvoke <com.sun.tools.attach.VirtualMachine: com.sun.tools.attach.VirtualMachine attach(java.lang.String)>(v);
v = staticinvoke <java.lang.System: java.lang.String getProperty(java.lang.String)>("com.sun.aas.installRoot");
v = new java.io.File;
v = <java.io.File: java.lang.String separator>;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (java.lang.String)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("lib\u0001monitor");
specialinvoke v.<java.io.File: void <init>(java.lang.String,java.lang.String)>(v, v);
v = virtualinvoke v.<java.io.File: boolean isDirectory()>();
if v != 0 goto label;
v = <org.glassfish.flashlight.impl.client.AgentAttacherInternal: java.util.logging.Logger LOG>;
v = <java.util.logging.Level: java.util.logging.Level WARNING>;
virtualinvoke v.<java.util.logging.Logger: void log(java.util.logging.Level,java.lang.String,java.lang.Object)>(v, "NCLS-MON-00503", v);
label:
return 0;
label:
v = new java.io.File;
specialinvoke v.<java.io.File: void <init>(java.io.File,java.lang.String)>(v, "flashlight-agent.jar");
v = virtualinvoke v.<java.io.File: boolean isFile()>();
if v != 0 goto label;
v = <org.glassfish.flashlight.impl.client.AgentAttacherInternal: java.util.logging.Logger LOG>;
v = <java.util.logging.Level: java.util.logging.Level WARNING>;
virtualinvoke v.<java.util.logging.Logger: void log(java.util.logging.Level,java.lang.String,java.lang.Object)>(v, "NCLS-MON-00502", v);
label:
return 0;
label:
v = virtualinvoke v.<java.io.File: java.lang.String getPath()>();
v = staticinvoke <com.sun.enterprise.universal.io.SmartFile: java.lang.String sanitize(java.lang.String)>(v);
virtualinvoke v.<com.sun.tools.attach.VirtualMachine: void loadAgent(java.lang.String,java.lang.String)>(v, v);
<org.glassfish.flashlight.impl.client.AgentAttacherInternal: boolean isAttached> = 1;
label:
goto label;
label:
v := @caughtexception;
v = <org.glassfish.flashlight.impl.client.AgentAttacherInternal: java.util.logging.Logger LOG>;
v = <java.util.logging.Level: java.util.logging.Level WARNING>;
v = virtualinvoke v.<java.lang.Throwable: java.lang.String getMessage()>();
virtualinvoke v.<java.util.logging.Logger: void log(java.util.logging.Level,java.lang.String,java.lang.Object)>(v, "NCLS-MON-00504", v);
<org.glassfish.flashlight.impl.client.AgentAttacherInternal: boolean isAttached> = 0;
label:
v = <org.glassfish.flashlight.impl.client.AgentAttacherInternal: boolean isAttached>;
return v;
catch java.lang.Throwable from label to label with label;
catch java.lang.Throwable from label to label with label;
catch java.lang.Throwable from label to label with label;
catch java.lang.Throwable from label to label with label;
catch java.lang.Throwable from label to label with label;
}
static void <clinit>()
{
java.util.logging.Logger v;
v = staticinvoke <org.glassfish.flashlight.FlashlightLoggerInfo: java.util.logging.Logger getLogger()>();
<org.glassfish.flashlight.impl.client.AgentAttacherInternal: java.util.logging.Logger LOG> = v;
<org.glassfish.flashlight.impl.client.AgentAttacherInternal: boolean isAttached> = 0;
return;
}
}