Update of /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data In directory usw-pr-cvs1:/tmp/cvs-serv14898 Modified Files: ThreadData.java MonTraceData.java MonThreadMethodData.java CPUTraceData.java CPUThreadMethodData.java ClassData.java AllocTypeTraceData.java AllocTypeMethodData.java AllocTypeData.java AllocTraceData.java AllocThreadTypeMethodData.java AllocThreadTypeData.java AllocThreadTraceData.java AllocThreadMethodData.java Log Message: removed/delayed allocation, use of Collections.EMPTY_MAP Index: ThreadData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/ThreadData.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** ThreadData.java 3 Mar 2002 01:20:09 -0000 1.16 --- ThreadData.java 4 Mar 2002 23:59:53 -0000 1.17 *************** *** 82,90 **** this.parent=parent; //warning probably may be null this.active=active; ! children=new LinkedList(); ! types=new HashMap(); ! allocMethods=new HashMap(); ! CPUMethods=new HashMap(); ! MonMethods=new HashMap(); } --- 82,90 ---- this.parent=parent; //warning probably may be null this.active=active; ! children=Collections.EMPTY_LIST; ! types=Collections.EMPTY_MAP; ! allocMethods=Collections.EMPTY_MAP; ! CPUMethods=Collections.EMPTY_MAP; ! MonMethods=Collections.EMPTY_MAP; } *************** *** 175,178 **** --- 175,180 ---- */ void addChild(ThreadData child) { + if ( children == Collections.EMPTY_LIST ) + children = new LinkedList(); children.add(child); } *************** *** 194,198 **** */ void addType(AllocThreadTypeData allocType) { ! //FIXME: types.put(allocType.getID(), allocType); } --- 196,201 ---- */ void addType(AllocThreadTypeData allocType) { ! if ( types == Collections.EMPTY_MAP ) ! types = new HashMap(); types.put(allocType.getID(), allocType); } *************** *** 225,228 **** --- 228,233 ---- */ void addAllocMethod(AllocThreadMethodData method) { + if ( allocMethods == Collections.EMPTY_MAP ) + allocMethods = new HashMap(); allocMethods.put(method.getMethod().getID(), method); } *************** *** 254,257 **** --- 259,264 ---- */ void addCPUMethod(CPUThreadMethodData method) { + if ( CPUMethods == Collections.EMPTY_MAP ) + CPUMethods = new HashMap(); CPUMethods.put(method.getMethod().getID(), method); } *************** *** 283,286 **** --- 290,295 ---- */ void addMonMethod(MonThreadMethodData method) { + if ( MonMethods == Collections.EMPTY_MAP ) + MonMethods = new HashMap(); MonMethods.put(method.getMethod().getID(), method); } *************** *** 300,303 **** --- 309,315 ---- /* * $Log$ + * Revision 1.17 2002/03/04 23:59:53 vachis + * removed/delayed allocation, use of Collections.EMPTY_MAP + * * Revision 1.16 2002/03/03 01:20:09 vachis * type of ID changed from int to Integer Index: MonTraceData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/MonTraceData.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** MonTraceData.java 3 Mar 2002 01:20:09 -0000 1.5 --- MonTraceData.java 4 Mar 2002 23:59:53 -0000 1.6 *************** *** 58,62 **** this.method=method; this.frames=frames; ! threads=new HashMap(); } --- 58,62 ---- this.method=method; this.frames=frames; ! threads=Collections.EMPTY_MAP; } *************** *** 108,111 **** --- 108,113 ---- */ void addThread(MonThreadTraceData thread) { + if ( threads == Collections.EMPTY_MAP ) + threads = new HashMap(); threads.put(thread.getThreadMethod().getThread().getID(), thread); } *************** *** 126,129 **** --- 128,134 ---- /* * $Log$ + * Revision 1.6 2002/03/04 23:59:53 vachis + * removed/delayed allocation, use of Collections.EMPTY_MAP + * * Revision 1.5 2002/03/03 01:20:09 vachis * type of ID changed from int to Integer Index: MonThreadMethodData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/MonThreadMethodData.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** MonThreadMethodData.java 3 Mar 2002 01:20:09 -0000 1.4 --- MonThreadMethodData.java 4 Mar 2002 23:59:53 -0000 1.5 *************** *** 53,57 **** this.thread=thread; this.method=method; ! traces=new HashMap(); } --- 53,57 ---- this.thread=thread; this.method=method; ! traces=Collections.EMPTY_MAP; } *************** *** 103,106 **** --- 103,108 ---- */ void addTrace(MonThreadTraceData trace) { + if ( traces == Collections.EMPTY_MAP ) + traces = new HashMap(); traces.put(trace.getTrace().getID(), trace); } *************** *** 122,125 **** --- 124,130 ---- /* * $Log$ + * Revision 1.5 2002/03/04 23:59:53 vachis + * removed/delayed allocation, use of Collections.EMPTY_MAP + * * Revision 1.4 2002/03/03 01:20:09 vachis * type of ID changed from int to Integer Index: CPUTraceData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/CPUTraceData.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** CPUTraceData.java 3 Mar 2002 01:20:08 -0000 1.8 --- CPUTraceData.java 4 Mar 2002 23:59:53 -0000 1.9 *************** *** 56,60 **** this.method=method; this.frames=frames; ! threads=new HashMap(); } --- 56,60 ---- this.method=method; this.frames=frames; ! threads=Collections.EMPTY_MAP; } *************** *** 105,108 **** --- 105,110 ---- */ void addThread(CPUThreadTraceData thread) { + if ( threads == Collections.EMPTY_MAP ) + threads = new HashMap(); threads.put(thread.getThreadMethod().getThread().getID(), thread); } *************** *** 123,126 **** --- 125,131 ---- /* * $Log$ + * Revision 1.9 2002/03/04 23:59:53 vachis + * removed/delayed allocation, use of Collections.EMPTY_MAP + * * Revision 1.8 2002/03/03 01:20:08 vachis * type of ID changed from int to Integer Index: CPUThreadMethodData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/CPUThreadMethodData.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** CPUThreadMethodData.java 3 Mar 2002 01:20:08 -0000 1.7 --- CPUThreadMethodData.java 4 Mar 2002 23:59:53 -0000 1.8 *************** *** 52,56 **** this.thread=thread; this.method=method; ! traces=new HashMap(); } --- 52,56 ---- this.thread=thread; this.method=method; ! traces=Collections.EMPTY_MAP; } *************** *** 102,105 **** --- 102,107 ---- */ void addTrace(CPUThreadTraceData trace) { + if ( traces == Collections.EMPTY_MAP ) + traces = new HashMap(); traces.put( trace.getTrace().getID(), trace); } *************** *** 120,123 **** --- 122,128 ---- /* * $Log$ + * Revision 1.8 2002/03/04 23:59:53 vachis + * removed/delayed allocation, use of Collections.EMPTY_MAP + * * Revision 1.7 2002/03/03 01:20:08 vachis * type of ID changed from int to Integer Index: ClassData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/ClassData.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** ClassData.java 3 Mar 2002 01:20:08 -0000 1.9 --- ClassData.java 4 Mar 2002 23:59:53 -0000 1.10 *************** *** 91,95 **** this.active=active; ! this.methods= new LinkedList(); } --- 91,95 ---- this.active=active; ! this.methods=Collections.EMPTY_LIST; } *************** *** 124,129 **** ((IProf.sClassInfo)sid.info).sourceName, ((IProf.sClassInfo)sid.info).numInterfaces,// 0, ! 0, new LinkedList(), ! 0, new LinkedList(), sid.active); } --- 124,129 ---- ((IProf.sClassInfo)sid.info).sourceName, ((IProf.sClassInfo)sid.info).numInterfaces,// 0, ! 0, Collections.EMPTY_LIST, ! 0, Collections.EMPTY_LIST, sid.active); } *************** *** 146,149 **** --- 146,151 ---- */ void addMethod(MethodData method) { + if ( methods == Collections.EMPTY_LIST ) + methods = new LinkedList(); methods.add( method ); numMethods++; *************** *** 268,271 **** --- 270,276 ---- /* * $Log$ + * Revision 1.10 2002/03/04 23:59:53 vachis + * removed/delayed allocation, use of Collections.EMPTY_MAP + * * Revision 1.9 2002/03/03 01:20:08 vachis * type of ID changed from int to Integer Index: AllocTypeTraceData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/AllocTypeTraceData.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** AllocTypeTraceData.java 3 Mar 2002 01:20:08 -0000 1.3 --- AllocTypeTraceData.java 4 Mar 2002 23:59:53 -0000 1.4 *************** *** 53,57 **** this.typeMethod=typeMethod; this.trace=trace; ! threads=new HashMap(); } --- 53,57 ---- this.typeMethod=typeMethod; this.trace=trace; ! threads=Collections.EMPTY_MAP; } *************** *** 105,108 **** --- 105,110 ---- */ void addThread(AllocThreadTypeTraceData thread) { + if ( threads == Collections.EMPTY_MAP ) + threads = new HashMap(); threads.put( thread.getThreadTrace().getThreadMethod().getThread().getID(), thread); } *************** *** 125,128 **** --- 127,133 ---- /* * $Log$ + * Revision 1.4 2002/03/04 23:59:53 vachis + * removed/delayed allocation, use of Collections.EMPTY_MAP + * * Revision 1.3 2002/03/03 01:20:08 vachis * type of ID changed from int to Integer Index: AllocTypeMethodData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/AllocTypeMethodData.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** AllocTypeMethodData.java 3 Mar 2002 01:20:08 -0000 1.3 --- AllocTypeMethodData.java 4 Mar 2002 23:59:53 -0000 1.4 *************** *** 60,65 **** this.type=type; this.method=method; ! traces=new HashMap(); ! threads=new HashMap(); } --- 60,65 ---- this.type=type; this.method=method; ! traces=Collections.EMPTY_MAP; ! threads=Collections.EMPTY_MAP; } *************** *** 113,116 **** --- 113,118 ---- */ void addTrace(AllocTypeTraceData trace) { + if ( traces == Collections.EMPTY_MAP ) + traces = new HashMap(); traces.put(trace.getTrace().getID(), trace); } *************** *** 146,149 **** --- 148,153 ---- */ void addThread(AllocThreadTypeMethodData thread) { + if ( threads == Collections.EMPTY_MAP ) + threads = new HashMap(); threads.put(thread.getThreadType().getThread().getID(), thread); } *************** *** 165,168 **** --- 169,175 ---- /* * $Log$ + * Revision 1.4 2002/03/04 23:59:53 vachis + * removed/delayed allocation, use of Collections.EMPTY_MAP + * * Revision 1.3 2002/03/03 01:20:08 vachis * type of ID changed from int to Integer Index: AllocTypeData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/AllocTypeData.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** AllocTypeData.java 3 Mar 2002 01:20:08 -0000 1.5 --- AllocTypeData.java 4 Mar 2002 23:59:54 -0000 1.6 *************** *** 60,65 **** this.clazz=classData; this.arrayType=arrayType; ! methods=new HashMap(); //??use EMPTY_MAP ! threads= Collections.EMPTY_MAP; } --- 60,65 ---- this.clazz=classData; this.arrayType=arrayType; ! methods=Collections.EMPTY_MAP; ! threads=Collections.EMPTY_MAP; } *************** *** 109,112 **** --- 109,114 ---- */ void addMethod(AllocTypeMethodData method) { + if ( methods == Collections.EMPTY_MAP ) + methods = new HashMap(); methods.put(method.getMethod().getID(), method); } *************** *** 159,162 **** --- 161,167 ---- /* * $Log$ + * Revision 1.6 2002/03/04 23:59:54 vachis + * removed/delayed allocation, use of Collections.EMPTY_MAP + * * Revision 1.5 2002/03/03 01:20:08 vachis * type of ID changed from int to Integer Index: AllocTraceData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/AllocTraceData.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** AllocTraceData.java 3 Mar 2002 01:20:08 -0000 1.14 --- AllocTraceData.java 4 Mar 2002 23:59:54 -0000 1.15 *************** *** 61,66 **** this.method=method; this.frames=frames; ! types=new HashMap(); ! threads=new HashMap(); } --- 61,66 ---- this.method=method; this.frames=frames; ! types=Collections.EMPTY_MAP; ! threads=Collections.EMPTY_MAP; } *************** *** 113,117 **** */ void addType(AllocTypeTraceData allocType) { ! //FIXMEE: types.put(allocType.getID(), allocType); } --- 113,118 ---- */ void addType(AllocTypeTraceData allocType) { ! if ( types == Collections.EMPTY_MAP ) ! types = new HashMap(); types.put(allocType.getID(), allocType); } *************** *** 144,147 **** --- 145,150 ---- */ void addThread(AllocThreadTraceData thread) { + if ( threads == Collections.EMPTY_MAP ) + threads = new HashMap(); threads.put( thread.getThreadMethod().getThread().getID(), thread); } *************** *** 163,166 **** --- 166,172 ---- /* * $Log$ + * Revision 1.15 2002/03/04 23:59:54 vachis + * removed/delayed allocation, use of Collections.EMPTY_MAP + * * Revision 1.14 2002/03/03 01:20:08 vachis * type of ID changed from int to Integer Index: AllocThreadTypeMethodData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/AllocThreadTypeMethodData.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** AllocThreadTypeMethodData.java 3 Mar 2002 01:20:08 -0000 1.3 --- AllocThreadTypeMethodData.java 4 Mar 2002 23:59:54 -0000 1.4 *************** *** 58,62 **** this.typeMethod=typeMethod; this.threadMethod=threadMethod; ! traces=new HashMap(); } --- 58,62 ---- this.typeMethod=typeMethod; this.threadMethod=threadMethod; ! traces=Collections.EMPTY_MAP; } *************** *** 123,126 **** --- 123,128 ---- */ void addTrace(AllocThreadTypeTraceData trace) { + if ( traces == Collections.EMPTY_MAP ) + traces = new HashMap(); traces.put(trace.getTypeTrace().getTrace().getID(), trace); } *************** *** 143,146 **** --- 145,151 ---- /* * $Log$ + * Revision 1.4 2002/03/04 23:59:54 vachis + * removed/delayed allocation, use of Collections.EMPTY_MAP + * * Revision 1.3 2002/03/03 01:20:08 vachis * type of ID changed from int to Integer Index: AllocThreadTypeData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/AllocThreadTypeData.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** AllocThreadTypeData.java 3 Mar 2002 01:20:08 -0000 1.3 --- AllocThreadTypeData.java 4 Mar 2002 23:59:54 -0000 1.4 *************** *** 51,55 **** this.thread=thread; this.type=type; ! methods=new HashMap(); } --- 51,55 ---- this.thread=thread; this.type=type; ! methods=Collections.EMPTY_MAP; } *************** *** 105,108 **** --- 105,110 ---- */ void addMethod(AllocThreadTypeMethodData method) { + if ( methods == Collections.EMPTY_MAP ) + methods = new HashMap(); methods.put( method.getTypeMethod().getMethod().getID(), method); } *************** *** 125,128 **** --- 127,133 ---- /* * $Log$ + * Revision 1.4 2002/03/04 23:59:54 vachis + * removed/delayed allocation, use of Collections.EMPTY_MAP + * * Revision 1.3 2002/03/03 01:20:08 vachis * type of ID changed from int to Integer Index: AllocThreadTraceData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/AllocThreadTraceData.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** AllocThreadTraceData.java 3 Mar 2002 01:20:08 -0000 1.12 --- AllocThreadTraceData.java 4 Mar 2002 23:59:54 -0000 1.13 *************** *** 53,57 **** this.threadMethod=threadMethod; this.trace=trace; ! types=new HashMap(); } --- 53,57 ---- this.threadMethod=threadMethod; this.trace=trace; ! types=Collections.EMPTY_MAP; } *************** *** 106,110 **** */ void addType(AllocThreadTypeTraceData allocType) { ! // FIXME: types.put( allocType.getID(), allocType); } --- 106,111 ---- */ void addType(AllocThreadTypeTraceData allocType) { ! if ( types == Collections.EMPTY_MAP ) ! types = new HashMap(); types.put( allocType.getID(), allocType); } *************** *** 127,130 **** --- 128,134 ---- /* * $Log$ + * Revision 1.13 2002/03/04 23:59:54 vachis + * removed/delayed allocation, use of Collections.EMPTY_MAP + * * Revision 1.12 2002/03/03 01:20:08 vachis * type of ID changed from int to Integer Index: AllocThreadMethodData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/AllocThreadMethodData.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** AllocThreadMethodData.java 3 Mar 2002 01:20:08 -0000 1.12 --- AllocThreadMethodData.java 4 Mar 2002 23:59:54 -0000 1.13 *************** *** 57,62 **** this.thread=thread; this.method=method; ! types=new HashMap(); ! traces=new HashMap(); } --- 57,62 ---- this.thread=thread; this.method=method; ! types=Collections.EMPTY_MAP; ! traces=Collections.EMPTY_MAP; } *************** *** 110,114 **** */ void addType(AllocThreadTypeMethodData allocType) { ! //FIXME types.put( allocType.getID(), allocType); } --- 110,115 ---- */ void addType(AllocThreadTypeMethodData allocType) { ! if ( types == Collections.EMPTY_MAP ) ! types = new HashMap(); types.put( allocType.getID(), allocType); } *************** *** 142,145 **** --- 143,148 ---- */ void addTrace(AllocThreadTraceData trace) { + if ( traces == Collections.EMPTY_MAP ) + traces = new HashMap(); traces.put( trace.getTrace().getID(), trace); } *************** *** 160,163 **** --- 163,169 ---- /* * $Log$ + * Revision 1.13 2002/03/04 23:59:54 vachis + * removed/delayed allocation, use of Collections.EMPTY_MAP + * * Revision 1.12 2002/03/03 01:20:08 vachis * type of ID changed from int to Integer |