From 55029365356dfcceef67a9d96b54fa27c4768d7b Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Tue, 6 Sep 2005 18:20:22 +0000 Subject: [PATCH] Instead of relying on toString() returning something sensible, we go back to using the class name but get the appropriate class in the case of RunQueue queued intervals. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3695 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../threerings/presents/server/PresentsDObjectMgr.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/java/com/threerings/presents/server/PresentsDObjectMgr.java b/src/java/com/threerings/presents/server/PresentsDObjectMgr.java index 6951698d9..39317f9b4 100644 --- a/src/java/com/threerings/presents/server/PresentsDObjectMgr.java +++ b/src/java/com/threerings/presents/server/PresentsDObjectMgr.java @@ -32,6 +32,7 @@ import sun.misc.Perf; import com.samskivert.util.AuditLogger; import com.samskivert.util.HashIntMap; import com.samskivert.util.Histogram; +import com.samskivert.util.Interval; import com.samskivert.util.Invoker; import com.samskivert.util.Queue; import com.samskivert.util.RunQueue; @@ -304,10 +305,10 @@ public class PresentsDObjectMgr // do some jiggery pokery to get more fine grained profiling // details on certain "popular" unit types if (unit instanceof Runnable) { - cname = unit.toString(); - int laidx = cname.lastIndexOf("@"); - cname = (laidx == -1) ? cname : cname.substring(0, laidx); - cname = StringUtil.shortClassName(cname); + cname = StringUtil.shortClassName(unit); + } else if (unit instanceof Interval.RunQueueRunnable) { + Interval ival = ((Interval.RunQueueRunnable)unit).getInterval(); + cname = StringUtil.shortClassName(ival); } else if (unit instanceof InvocationRequestEvent) { InvocationRequestEvent ire = (InvocationRequestEvent)unit; Class c = PresentsServer.invmgr.getDispatcherClass(