From: Michael R. <mr...@br...> - 2002-08-16 10:36:05
|
Hi, modified DubugOutput to the current CVS files. Some methods i could not resolve. Best, Michael =========================================================== Michael Remme BrainT@GS GmbH mr...@br... Neuhofstr. 48 Tel. : 02161 / 40 64 871 D-41061 Mönchengladbach Fax. : 02161 / 40 64 874 http://www.BrainTags.de Mobil: 0173 / 535 21 37 *** DebugOutput.java 16 Feb 2002 16:22:18 -0000 1.4 --- DebugOutput.java 16 Aug 2002 10:30:16 -0000 *************** *** 27,37 **** */ public class DebugOutput { /** Print snapshot data to System.out. ! * @param sn SnapshotImpl data to print. */ public static void print (SnapshotImpl sn) { // classes list, ClassData object type ! Iterator it = sn.classes().iterator(); while (it.hasNext()) { ClassData c = (ClassData) it.next(); System.out.println("CLASS = " + c.getName()); --- 29,39 ---- */ public class DebugOutput { /** Print snapshot data to System.out. ! * @param sn SnapshotImpl data to print. */ public static void print (SnapshotImpl sn) { // classes list, ClassData object type ! Iterator it = sn.getClasses().iterator(); while (it.hasNext()) { ClassData c = (ClassData) it.next(); System.out.println("CLASS = " + c.getName()); *************** *** 45,69 **** System.out.println(); } System.out.println("INSTANCE FIELDS:"); ! Iterator itI = c.getInstanceFields().iterator(); while (itI.hasNext()) { ! ClassFieldData f = (ClassFieldData) itI.next(); ! System.out.println(f.getName() + " SIGN = " + f.getSignature() ! ); ! System.out.println(); } System.out.println("STATIC FIELDS:"); ! Iterator itS = c.getStaticFields().iterator(); while (itS.hasNext()) { ! ClassFieldData f = (ClassFieldData) itS.next(); ! System.out.println(f.getName() + " SIGN = " + f.getSignature() ! ); ! System.out.println(); } } ! // groupThreads list, ThreadGroupData object type ! it = sn.groupOfThreads().iterator(); while (it.hasNext()) { ThreadGroupData g = (ThreadGroupData) it.next(); System.out.println("GROUP = " + g.getName()); --- 47,75 ---- System.out.println(); } System.out.println("INSTANCE FIELDS:"); ! Iterator itI = c.getFields().iterator(); while (itI.hasNext()) { ! FieldData f = (FieldData) itI.next(); ! if ( ! f.isStatic() ){ ! System.out.println(f.getName() + " SIGN = " + f.getSignature() ! ); ! System.out.println(); ! } } System.out.println("STATIC FIELDS:"); ! Iterator itS = c.getFields().iterator(); while (itS.hasNext()) { ! FieldData f = (FieldData) itS.next(); ! if ( ! f.isStatic() ){ ! System.out.println(f.getName() + " SIGN = " + f.getSignature() ! ); ! System.out.println(); ! } } } ! // groupThreads list, ThreadGroupData object type ! it = sn.getThreadGroups().iterator(); while (it.hasNext()) { ThreadGroupData g = (ThreadGroupData) it.next(); System.out.println("GROUP = " + g.getName()); *************** *** 73,80 **** System.out.println(th.getName() + " : "); } } ! // objectTypes list, AllocClassData object type it = sn.allocTypes().iterator(); while (it.hasNext()) { AllocTypeData o = (AllocTypeData) it.next(); --- 79,88 ---- System.out.println(th.getName() + " : "); } } ! // objectTypes list, AllocClassData object type + /* + //Couldn't resolve that it = sn.allocTypes().iterator(); while (it.hasNext()) { AllocTypeData o = (AllocTypeData) it.next(); *************** *** 116,152 **** break; default: s = null; ! break; } System.out.println(s); System.out.println(); } ! // arenas list, AllocArenaData object type // FIX arenas() ! it = sn.arenas().iterator(); while (it.hasNext()) { AllocArenaData a = (AllocArenaData) it.next(); System.out.println("ARENA = " + a.getName()); System.out.println(); } ! // instances are N/A from IProf! // leaving blank ! // gcs list, GCData object type // FIX gcs() ! it = sn.gcs().iterator(); while (it.hasNext()) { ! GCData g = (GCData) it.next(); System.out.println("GC:"); System.out.println("start: " + g.getStartTime()); System.out.println("end: " + g.getEndTime()); } ! // jniGlobalRefs and jniWeakGlobalRefs are N/A from IProf! // leaving blank ! // Hash Statistics are N/A. // leaving blank --- 124,160 ---- break; default: s = null; ! break; } System.out.println(s); System.out.println(); } ! */ // arenas list, AllocArenaData object type // FIX arenas() ! it = sn.getArenas().iterator(); while (it.hasNext()) { AllocArenaData a = (AllocArenaData) it.next(); System.out.println("ARENA = " + a.getName()); System.out.println(); } ! // instances are N/A from IProf! // leaving blank ! // gcs list, GCData object type // FIX gcs() ! it = sn.getGCRuns().iterator(); while (it.hasNext()) { ! GCRunData g = (GCRunData) it.next(); System.out.println("GC:"); System.out.println("start: " + g.getStartTime()); System.out.println("end: " + g.getEndTime()); } ! // jniGlobalRefs and jniWeakGlobalRefs are N/A from IProf! // leaving blank ! // Hash Statistics are N/A. // leaving blank *************** *** 169,191 **** int totalMonTraces = 0; int totalMonThreadMethods = 0; int totalMonThreadTraces = 0; ! it = sn.classes().iterator(); while (it.hasNext()) { ClassData c = (ClassData) it.next(); Iterator itM = c.getMethods().iterator(); while (itM.hasNext()) { MethodData m = (MethodData) itM.next(); ! Iterator itT = m.getAllocTraces().values().iterator(); while (itT.hasNext()) { AllocTraceData t = (AllocTraceData) itT.next(); totalAllocTraces ++; } ! itT = m.getCPUTraces().values().iterator(); while (itT.hasNext()) { CPUTraceData t = (CPUTraceData) itT.next(); totalCpuTraces ++; } ! itT = m.getMonTraces().values().iterator(); while (itT.hasNext()) { MonTraceData t = (MonTraceData) itT.next(); totalMonTraces ++; --- 177,199 ---- int totalMonTraces = 0; int totalMonThreadMethods = 0; int totalMonThreadTraces = 0; ! it = sn.getClasses().iterator(); while (it.hasNext()) { ClassData c = (ClassData) it.next(); Iterator itM = c.getMethods().iterator(); while (itM.hasNext()) { MethodData m = (MethodData) itM.next(); ! Iterator itT = m.getAllocTraces().iterator(); while (itT.hasNext()) { AllocTraceData t = (AllocTraceData) itT.next(); totalAllocTraces ++; } ! itT = m.getCPUTraces().iterator(); while (itT.hasNext()) { CPUTraceData t = (CPUTraceData) itT.next(); totalCpuTraces ++; } ! itT = m.getMonTraces().iterator(); while (itT.hasNext()) { MonTraceData t = (MonTraceData) itT.next(); totalMonTraces ++; *************** *** 194,199 **** --- 202,209 ---- } totalClasses ++; } + /* + //Couldn't resolve it = sn.allocTypes().iterator(); while (it.hasNext()) { AllocTypeData a = (AllocTypeData) it.next(); *************** *** 209,258 **** } totalAllocObjects ++; } ! it = sn.threads().iterator(); while (it.hasNext()) { ThreadData th = (ThreadData) it.next(); ! Iterator itA = th.getTypes().values().iterator(); while (itA.hasNext()) { ! AllocThreadTypeData a = (AllocThreadTypeData) itA.next(); Iterator itM = a.getMethods().values().iterator(); while (itM.hasNext()) { ! AllocThreadTypeMethodData m = (AllocThreadTypeMethodData) itM.next(); Iterator itT = m.getTraces().values().iterator(); while (itT.hasNext()) { ! AllocThreadTypeTraceData t = ! (AllocThreadTypeTraceData) itT.next(); ! totalAllocThreadObjectTraces ++; } totalAllocThreadObjectMethods ++; } totalAllocThreadObjects ++; } ! Iterator itM = th.getAllocMethods().values().iterator(); while (itM.hasNext()) { AllocThreadMethodData m = (AllocThreadMethodData) itM.next(); ! Iterator itT = m.getTraces().values().iterator(); while (itT.hasNext()) { AllocThreadTraceData t = (AllocThreadTraceData) itT.next(); totalAllocThreadTraces ++; } totalAllocThreadMethods ++; } ! itM = th.getCPUMethods().values().iterator(); while (itM.hasNext()) { CPUThreadMethodData m = (CPUThreadMethodData) itM.next(); ! Iterator itT = m.getTraces().values().iterator(); while (itT.hasNext()) { CPUThreadTraceData t = (CPUThreadTraceData) itT.next(); totalCpuThreadTraces ++; } totalCpuThreadMethods ++; } ! itM = th.getMonMethods().values().iterator(); while (itM.hasNext()) { MonThreadMethodData m = (MonThreadMethodData) itM.next(); ! Iterator itT = m. getTraces().values().iterator(); while (itT.hasNext()) { MonThreadTraceData t = (MonThreadTraceData) itT.next(); totalMonThreadTraces ++; --- 219,272 ---- } totalAllocObjects ++; } ! */ ! it = sn.getThreads().iterator(); while (it.hasNext()) { ThreadData th = (ThreadData) it.next(); ! /* ! Couldn't resolve ! Iterator itA = th.getTypes().iterator(); while (itA.hasNext()) { ! AllocTypeThreadData a = (AllocThreadTypeData) itA.next(); Iterator itM = a.getMethods().values().iterator(); while (itM.hasNext()) { ! AllocTypeThreadMethodData m = (AllocThreadTypeMethodData) itM.next(); Iterator itT = m.getTraces().values().iterator(); while (itT.hasNext()) { ! AllocTypeThreadTraceData t = ! (AllocTypeThreadTraceData) itT.next(); ! totalAllocThreadObjectTraces ++; } totalAllocThreadObjectMethods ++; } totalAllocThreadObjects ++; } ! */ ! Iterator itM = th.getAllocThreadMethods().iterator(); while (itM.hasNext()) { AllocThreadMethodData m = (AllocThreadMethodData) itM.next(); ! Iterator itT = m.getAllocThreadTraces().iterator(); while (itT.hasNext()) { AllocThreadTraceData t = (AllocThreadTraceData) itT.next(); totalAllocThreadTraces ++; } totalAllocThreadMethods ++; } ! itM = th.getCPUThreadMethods().iterator(); while (itM.hasNext()) { CPUThreadMethodData m = (CPUThreadMethodData) itM.next(); ! Iterator itT = m.getCPUThreadTraces().iterator(); while (itT.hasNext()) { CPUThreadTraceData t = (CPUThreadTraceData) itT.next(); totalCpuThreadTraces ++; } totalCpuThreadMethods ++; } ! itM = th.getMonThreadMethods().iterator(); while (itM.hasNext()) { MonThreadMethodData m = (MonThreadMethodData) itM.next(); ! Iterator itT = m.getMonThreadTraces().iterator(); while (itT.hasNext()) { MonThreadTraceData t = (MonThreadTraceData) itT.next(); totalMonThreadTraces ++; *************** *** 272,284 **** System.out.println(); System.out.println("AllocObjectMethod: " + totalAllocObjectMethods); System.out.println("AllocThreadMethod: " + totalAllocThreadMethods); ! System.out.println("AllocThreadObjectMethod: " + totalAllocThreadObjectMethods); System.out.println(); System.out.println("AllocTrace: " + totalAllocTraces); System.out.println("AllocObjectTrace: " + totalAllocObjectTraces); System.out.println("AllocThreadTrace: " + totalAllocThreadTraces); ! System.out.println("AllocThreadObjectTrace: " + totalAllocThreadObjectTraces); System.out.println(); System.out.println("CpuThreadMethod: " + totalCpuThreadMethods); --- 286,298 ---- System.out.println(); System.out.println("AllocObjectMethod: " + totalAllocObjectMethods); System.out.println("AllocThreadMethod: " + totalAllocThreadMethods); ! System.out.println("AllocThreadObjectMethod: " + totalAllocThreadObjectMethods); System.out.println(); System.out.println("AllocTrace: " + totalAllocTraces); System.out.println("AllocObjectTrace: " + totalAllocObjectTraces); System.out.println("AllocThreadTrace: " + totalAllocThreadTraces); ! System.out.println("AllocThreadObjectTrace: " + totalAllocThreadObjectTraces); System.out.println(); System.out.println("CpuThreadMethod: " + totalCpuThreadMethods); |