improved QueuedThreadPool dump
This commit is contained in:
parent
5e5355cd20
commit
17867dc0a7
|
@ -526,15 +526,27 @@ public class QueuedThreadPool extends AbstractLifeCycle implements SizedThreadPo
|
|||
String knownMethod = "";
|
||||
for (StackTraceElement t : trace)
|
||||
{
|
||||
if ("idleJobPoll".equals(t.getMethodName()))
|
||||
if ("idleJobPoll".equals(t.getMethodName()) && t.getClassName().endsWith("QueuedThreadPool"))
|
||||
{
|
||||
knownMethod = "IDLE ";
|
||||
break;
|
||||
}
|
||||
|
||||
if ("preallocatedWait".equals(t.getMethodName()))
|
||||
if ("reservedWait".equals(t.getMethodName()) && t.getClassName().endsWith("ReservedThread"))
|
||||
{
|
||||
knownMethod = "PREALLOCATED ";
|
||||
knownMethod = "RESERVED ";
|
||||
break;
|
||||
}
|
||||
|
||||
if ("select".equals(t.getMethodName()) && t.getClassName().endsWith("SelectorProducer"))
|
||||
{
|
||||
knownMethod = "SELECTING ";
|
||||
break;
|
||||
}
|
||||
|
||||
if ("accept".equals(t.getMethodName()) && t.getClassName().contains("ServerConnector"))
|
||||
{
|
||||
knownMethod = "ACCEPTING ";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -256,8 +256,8 @@ public class ReservedThreadExecutor extends AbstractLifeCycle implements Executo
|
|||
public String toString()
|
||||
{
|
||||
if (_owner==null)
|
||||
return String.format("%s@%x{s=%d,p=%d}",this.getClass().getSimpleName(),hashCode(),_size.get(),_pending.get());
|
||||
return String.format("%s@%s{s=%d,p=%d}",this.getClass().getSimpleName(),_owner,_size.get(),_pending.get());
|
||||
return String.format("%s@%x{s=%d/%d,p=%d}",this.getClass().getSimpleName(),hashCode(),_size.get(),_capacity,_pending.get());
|
||||
return String.format("%s@%s{s=%d/%d,p=%d}",this.getClass().getSimpleName(),_owner,_size.get(),_capacity,_pending.get());
|
||||
}
|
||||
|
||||
private class ReservedThread extends ConcurrentStack.Node implements Runnable
|
||||
|
|
Loading…
Reference in New Issue