From: Pavel V. <va...@us...> - 2002-02-16 16:21:57
|
Update of /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data In directory usw-pr-cvs1:/tmp/cvs-serv18356 Modified Files: ThreadData.java SnapshotImpl.java MethodData.java AllocTypeData.java Log Message: code refacorization Class.. to Type... (forgotten methods) Index: ThreadData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/ThreadData.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** ThreadData.java 15 Feb 2002 22:37:30 -0000 1.13 --- ThreadData.java 16 Feb 2002 16:21:52 -0000 1.14 *************** *** 48,52 **** * Mapping of {@link AllocThreadClassData} objects and class IDs. */ ! private Map classes; /** * Map of methods invoked in this thread. --- 48,52 ---- * Mapping of {@link AllocThreadClassData} objects and class IDs. */ ! private Map types; /** * Map of methods invoked in this thread. *************** *** 83,87 **** this.active=active; children=new LinkedList(); ! classes=new HashMap(); allocMethods=new HashMap(); CPUMethods=new HashMap(); --- 83,87 ---- this.active=active; children=new LinkedList(); ! types=new HashMap(); allocMethods=new HashMap(); CPUMethods=new HashMap(); *************** *** 183,188 **** * @return mapping of {@link AllocThreadClassData} objects and class IDs. */ ! public Map getClasses() { ! return classes; } --- 183,188 ---- * @return mapping of {@link AllocThreadClassData} objects and class IDs. */ ! public Map getTypes() { ! return types; } *************** *** 193,199 **** * @param allocClass allocClass that were allocated in this thread. */ ! void addClass(AllocThreadTypeData allocClass) { //FIXME: ! classes.put(new Integer(allocClass.getID()), allocClass); } --- 193,199 ---- * @param allocClass allocClass that were allocated in this thread. */ ! void addType(AllocThreadTypeData allocClass) { //FIXME: ! types.put(new Integer(allocClass.getID()), allocClass); } *************** *** 206,211 **** * in this thread or <code>null</code> if such class does not exist. */ ! public AllocThreadTypeData getClass(int ID) { ! return (AllocThreadTypeData)classes.get(new Integer(ID)); } --- 206,211 ---- * in this thread or <code>null</code> if such class does not exist. */ ! public AllocThreadTypeData getType(int ID) { ! return (AllocThreadTypeData)types.get(new Integer(ID)); } *************** *** 300,303 **** --- 300,306 ---- /* * $Log$ + * Revision 1.14 2002/02/16 16:21:52 vachis + * code refacorization Class.. to Type... (forgotten methods) + * * Revision 1.13 2002/02/15 22:37:30 vachis * code refactorization Class..Data renamed to Type..Data Index: SnapshotImpl.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/SnapshotImpl.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** SnapshotImpl.java 15 Feb 2002 22:37:30 -0000 1.10 --- SnapshotImpl.java 16 Feb 2002 16:21:52 -0000 1.11 *************** *** 728,732 **** libIDs.get( new Integer( sid.parentUpObjId )); AllocTypeMethodData newObj = new AllocTypeMethodData( sid, up, lf ); ! lf.addClass( newObj ); up.addMethod( newObj ); return newObj; --- 728,732 ---- libIDs.get( new Integer( sid.parentUpObjId )); AllocTypeMethodData newObj = new AllocTypeMethodData( sid, up, lf ); ! lf.addType( newObj ); up.addMethod( newObj ); return newObj; *************** *** 737,741 **** AllocTypeData up = (AllocTypeData) refObj; AllocTypeMethodData newObj = new AllocTypeMethodData( sid, up, lf ); ! lf.addClass( newObj ); up.addMethod( newObj ); return newObj; --- 737,741 ---- AllocTypeData up = (AllocTypeData) refObj; AllocTypeMethodData newObj = new AllocTypeMethodData( sid, up, lf ); ! lf.addType( newObj ); up.addMethod( newObj ); return newObj; *************** *** 765,769 **** ThreadData up = (ThreadData) libIDs.get( new Integer( sid.parentUpObjId)); AllocThreadTypeData newObj = new AllocThreadTypeData( sid, up, lf ); ! up.addClass( newObj ); lf.addThread( newObj ); return newObj; --- 765,769 ---- ThreadData up = (ThreadData) libIDs.get( new Integer( sid.parentUpObjId)); AllocThreadTypeData newObj = new AllocThreadTypeData( sid, up, lf ); ! up.addType( newObj ); lf.addThread( newObj ); return newObj; *************** *** 775,779 **** AllocThreadTypeData newObj = new AllocThreadTypeData( sid, up, lf ); lf.addThread( newObj ); ! up.addClass( newObj ); return newObj; } --- 775,779 ---- AllocThreadTypeData newObj = new AllocThreadTypeData( sid, up, lf ); lf.addThread( newObj ); ! up.addType( newObj ); return newObj; } *************** *** 1036,1039 **** --- 1036,1042 ---- /* * $Log$ + * Revision 1.11 2002/02/16 16:21:52 vachis + * code refacorization Class.. to Type... (forgotten methods) + * * Revision 1.10 2002/02/15 22:37:30 vachis * code refactorization Class..Data renamed to Type..Data Index: MethodData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/MethodData.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** MethodData.java 16 Feb 2002 14:05:31 -0000 1.12 --- MethodData.java 16 Feb 2002 16:21:53 -0000 1.13 *************** *** 76,80 **** * Mapping of {@link AllocClassMethodData} objects and class IDs. */ ! private Map classes; /** * Map of traces of this method. --- 76,80 ---- * Mapping of {@link AllocClassMethodData} objects and class IDs. */ ! private Map types; /** * Map of traces of this method. *************** *** 122,126 **** allocThreads = Collections.EMPTY_MAP; CPUTraces= Collections.EMPTY_MAP; ! classes = Collections.EMPTY_MAP; CPUThreads = Collections.EMPTY_MAP; MonTraces = Collections.EMPTY_MAP; --- 122,126 ---- allocThreads = Collections.EMPTY_MAP; CPUTraces= Collections.EMPTY_MAP; ! types = Collections.EMPTY_MAP; CPUThreads = Collections.EMPTY_MAP; MonTraces = Collections.EMPTY_MAP; *************** *** 297,302 **** * @return mapping of {@link AllocClassMethodData} objects and class IDs. */ ! public Map getClasses() { ! return classes; } --- 297,302 ---- * @return mapping of {@link AllocClassMethodData} objects and class IDs. */ ! public Map getTypes() { ! return types; } *************** *** 307,314 **** * @param allocClass allocClass that were allocated in this method. */ ! void addClass(AllocTypeMethodData allocClass) { ! if ( classes == Collections.EMPTY_MAP ) ! classes = new HashMap(); ! classes.put(new Integer(allocClass.getID()), allocClass); } --- 307,314 ---- * @param allocClass allocClass that were allocated in this method. */ ! void addType(AllocTypeMethodData allocClass) { ! if ( types == Collections.EMPTY_MAP ) ! types = new HashMap(); ! types.put(new Integer(allocClass.getID()), allocClass); } *************** *** 321,326 **** * in this method or <code>null</code> if such class does not exist. */ ! public AllocTypeMethodData getClass(int ID) { ! return (AllocTypeMethodData)classes.get(new Integer(ID)); } --- 321,326 ---- * in this method or <code>null</code> if such class does not exist. */ ! public AllocTypeMethodData getType(int ID) { ! return (AllocTypeMethodData)types.get(new Integer(ID)); } *************** *** 548,551 **** --- 548,554 ---- /* * $Log$ + * Revision 1.13 2002/02/16 16:21:53 vachis + * code refacorization Class.. to Type... (forgotten methods) + * * Revision 1.12 2002/02/16 14:05:31 vachis * perfomance fix, use EMPY_MAP Index: AllocTypeData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/AllocTypeData.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** AllocTypeData.java 16 Feb 2002 14:05:31 -0000 1.2 --- AllocTypeData.java 16 Feb 2002 16:21:53 -0000 1.3 *************** *** 31,35 **** public class AllocTypeData extends AllocAbstractStatThreadClassData { /** Class to which this allocation data belongs. */ ! private ClassData classData; /** * Type of the class (for example JVMPI_NORMAL_OBJECT, JVMPI_CLASS, --- 31,35 ---- public class AllocTypeData extends AllocAbstractStatThreadClassData { /** Class to which this allocation data belongs. */ ! private ClassData clazz; /** * Type of the class (for example JVMPI_NORMAL_OBJECT, JVMPI_CLASS, *************** *** 58,62 **** AllocTypeData(int ID, ClassData classData, int type) { super(ID); ! this.classData=classData; this.arrayType=type; methods=new HashMap(); //??use EMPTY_MAP --- 58,62 ---- AllocTypeData(int ID, ClassData classData, int type) { super(ID); ! this.clazz=classData; this.arrayType=type; methods=new HashMap(); //??use EMPTY_MAP *************** *** 81,86 **** * @return class to which this allocation data belongs. */ ! public ClassData getClassData() { ! return classData; } --- 81,86 ---- * @return class to which this allocation data belongs. */ ! public ClassData getClazz() { ! return clazz; } *************** *** 159,162 **** --- 159,165 ---- /* * $Log$ + * Revision 1.3 2002/02/16 16:21:53 vachis + * code refacorization Class.. to Type... (forgotten methods) + * * Revision 1.2 2002/02/16 14:05:31 vachis * perfomance fix, use EMPY_MAP |