public class com.codahale.metrics.servlets.CpuProfileServlet extends javax.servlet.http.HttpServlet
{
private static final long serialVersionUID;
private static final java.lang.String CONTENT_TYPE;
private static final java.lang.String CACHE_CONTROL;
private static final java.lang.String NO_CACHE;
private final java.util.concurrent.locks.Lock lock;
public void <init>()
{
java.util.concurrent.locks.ReentrantLock v;
com.codahale.metrics.servlets.CpuProfileServlet v;
v := @this: com.codahale.metrics.servlets.CpuProfileServlet;
specialinvoke v.<javax.servlet.http.HttpServlet: void <init>()>();
v = new java.util.concurrent.locks.ReentrantLock;
specialinvoke v.<java.util.concurrent.locks.ReentrantLock: void <init>()>();
v.<com.codahale.metrics.servlets.CpuProfileServlet: java.util.concurrent.locks.Lock lock> = v;
return;
}
protected void doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) throws javax.servlet.ServletException, java.io.IOException
{
java.lang.Throwable v;
javax.servlet.http.HttpServletRequest v;
javax.servlet.ServletOutputStream v;
int v, v, v, v;
java.lang.String v, v, v, v, v, v;
boolean v;
java.lang.Thread$State v;
javax.servlet.http.HttpServletResponse v;
java.lang.NumberFormatException v, v;
com.codahale.metrics.servlets.CpuProfileServlet v;
v := @this: com.codahale.metrics.servlets.CpuProfileServlet;
v := @parameter: javax.servlet.http.HttpServletRequest;
v := @parameter: javax.servlet.http.HttpServletResponse;
v = 10;
v = interfaceinvoke v.<javax.servlet.http.HttpServletRequest: java.lang.String getParameter(java.lang.String)>("duration");
if v == null goto label;
label:
v = interfaceinvoke v.<javax.servlet.http.HttpServletRequest: java.lang.String getParameter(java.lang.String)>("duration");
v = staticinvoke <java.lang.Integer: int parseInt(java.lang.String)>(v);
label:
goto label;
label:
v := @caughtexception;
v = 10;
label:
v = 100;
v = interfaceinvoke v.<javax.servlet.http.HttpServletRequest: java.lang.String getParameter(java.lang.String)>("frequency");
if v == null goto label;
label:
v = interfaceinvoke v.<javax.servlet.http.HttpServletRequest: java.lang.String getParameter(java.lang.String)>("frequency");
v = staticinvoke <java.lang.Integer: int parseInt(java.lang.String)>(v);
v = staticinvoke <java.lang.Math: int max(int,int)>(v, 1);
v = staticinvoke <java.lang.Math: int min(int,int)>(v, 1000);
label:
goto label;
label:
v := @caughtexception;
v = 100;
label:
v = "blocked";
v = interfaceinvoke v.<javax.servlet.http.HttpServletRequest: java.lang.String getParameter(java.lang.String)>("state");
v = virtualinvoke v.<java.lang.String: boolean equalsIgnoreCase(java.lang.String)>(v);
if v == 0 goto label;
v = <java.lang.Thread$State: java.lang.Thread$State BLOCKED>;
goto label;
label:
v = <java.lang.Thread$State: java.lang.Thread$State RUNNABLE>;
label:
interfaceinvoke v.<javax.servlet.http.HttpServletResponse: void setStatus(int)>(200);
interfaceinvoke v.<javax.servlet.http.HttpServletResponse: void setHeader(java.lang.String,java.lang.String)>("Cache-Control", "must-revalidate,no-cache,no-store");
interfaceinvoke v.<javax.servlet.http.HttpServletResponse: void setContentType(java.lang.String)>("pprof/raw");
v = interfaceinvoke v.<javax.servlet.http.HttpServletResponse: javax.servlet.ServletOutputStream getOutputStream()>();
label:
virtualinvoke v.<com.codahale.metrics.servlets.CpuProfileServlet: void doProfile(java.io.OutputStream,int,int,java.lang.Thread$State)>(v, v, v, v);
label:
if v == null goto label;
virtualinvoke v.<java.io.OutputStream: void close()>();
goto label;
label:
v := @caughtexception;
throw v;
label:
return;
catch java.lang.NumberFormatException from label to label with label;
catch java.lang.NumberFormatException from label to label with label;
catch java.lang.Throwable from label to label with label;
}
protected void doProfile(java.io.OutputStream, int, int, java.lang.Thread$State) throws java.io.IOException
{
java.io.OutputStream v;
java.lang.Throwable v;
java.lang.Thread$State v;
java.lang.RuntimeException v, v;
com.codahale.metrics.servlets.CpuProfileServlet v;
java.util.concurrent.locks.Lock v, v, v;
java.time.Duration v;
int v, v;
com.papertrail.profiler.CpuProfile v;
boolean v;
v := @this: com.codahale.metrics.servlets.CpuProfileServlet;
v := @parameter: java.io.OutputStream;
v := @parameter: int;
v := @parameter: int;
v := @parameter: java.lang.Thread$State;
v = v.<com.codahale.metrics.servlets.CpuProfileServlet: java.util.concurrent.locks.Lock lock>;
v = interfaceinvoke v.<java.util.concurrent.locks.Lock: boolean tryLock()>();
if v == 0 goto label;
label:
v = staticinvoke <java.time.Duration: java.time.Duration ofSeconds(long)>(v);
v = staticinvoke <com.papertrail.profiler.CpuProfile: com.papertrail.profiler.CpuProfile record(java.time.Duration,int,java.lang.Thread$State)>(v, v, v);
if v != null goto label;
v = new java.lang.RuntimeException;
specialinvoke v.<java.lang.RuntimeException: void <init>(java.lang.String)>("could not create CpuProfile");
throw v;
label:
virtualinvoke v.<com.papertrail.profiler.CpuProfile: void writeGoogleProfile(java.io.OutputStream)>(v);
label:
v = v.<com.codahale.metrics.servlets.CpuProfileServlet: java.util.concurrent.locks.Lock lock>;
interfaceinvoke v.<java.util.concurrent.locks.Lock: void unlock()>();
return;
label:
v := @caughtexception;
v = v.<com.codahale.metrics.servlets.CpuProfileServlet: java.util.concurrent.locks.Lock lock>;
interfaceinvoke v.<java.util.concurrent.locks.Lock: void unlock()>();
throw v;
label:
v = new java.lang.RuntimeException;
specialinvoke v.<java.lang.RuntimeException: void <init>(java.lang.String)>("Only one profile request may be active at a time");
throw v;
catch java.lang.Throwable from label to label with label;
}
}