From 13cb0916eee1c952af509057c127ef3797f3874c Mon Sep 17 00:00:00 2001 From: orbiter Date: Thu, 11 Dec 2008 20:13:14 +0000 Subject: [PATCH] changes to statistics and content of thread dump servlet (points now more directly to performance leaks without mentioning class calls inside of sun/java calls that cannot be changed anyway) git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5390 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/Threaddump_p.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/htroot/Threaddump_p.java b/htroot/Threaddump_p.java index f99124d60..2dc5e224a 100644 --- a/htroot/Threaddump_p.java +++ b/htroot/Threaddump_p.java @@ -151,14 +151,16 @@ public class Threaddump_p { Map trace; HashMap result = new HashMap(); HashMap> x; + int count; for (int i = 0; i < stackTraces.size(); i++) { trace = stackTraces.get(i); x = dumpCollection(rootPath, trace, plain, stateIn); for (final Entry> e: x.entrySet()) { Integer c = result.get(e.getKey()); - if (c == null) result.put(e.getKey(), new Integer(1)); + count = e.getValue().size(); + if (c == null) result.put(e.getKey(), new Integer(count)); else { - c = new Integer(c.intValue() + 1); + c = new Integer(c.intValue() + count); result.put(e.getKey(), c); } } @@ -192,6 +194,7 @@ public class Threaddump_p { String threadtitle = tracename + "Thread= " + thread.getName() + " " + (thread.isDaemon()?"daemon":"") + " id=" + thread.getId() + " " + thread.getState().toString(); for (int i = 0; i < stackTraceElements.length; i++) { ste = stackTraceElements[i]; + if (ste.getClassName().startsWith("java.") || ste.getClassName().startsWith("sun.")) continue; if (i == 0) { line = getLine(getClassFile(classPath, ste.getClassName()), ste.getLineNumber()); } else {