Update of /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data In directory usw-pr-cvs1:/tmp/cvs-serv24562 Modified Files: AllocThreadMethodData.java AllocThreadTraceData.java AllocTraceData.java MethodData.java SnapshotImpl.java ThreadData.java Added Files: AllocThreadTypeData.java AllocThreadTypeMethodData.java AllocThreadTypeTraceData.java AllocTypeData.java AllocTypeMethodData.java AllocTypeTraceData.java Log Message: code refactorization Class..Data renamed to Type..Data --- NEW FILE: AllocThreadTypeData.java --- /* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License Version * 1.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is available at http://www.sun.com/ * * The Original Code is the Java Profiler module. * The Initial Developers of the Original Code are Jan Stola, Pavel Vacha, * Michal Pise, Petr Luner, Lukas Petru and Marek Przeczek. * Portions created by Jan Stola are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Pavel Vacha are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Michal Pise are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Petr Luner are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Lukas Petru are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Marek Przeczek are Copyright (C) 2000-2001. All Rights Reserved. * * Contributors: Jan Stola, Pavel Vacha, Michal Pise, Petr Luner, * Lukas Petru and Marek Przeczek. */ package net.sourceforge.javaprofiler.jpiimpl.data; import java.util.*; import net.sourceforge.javaprofiler.jpiimpl.commun.*; /** * Allocation data for one thread and class. * * @author Jan Stola */ public class AllocThreadTypeData extends AllocAbstractStatThreadClassData { /** Allocation data for this thread. */ private ThreadData thread; /** Allocation data for this class. */ private AllocTypeData type; /** * Map of methods where an instance of this class was allocated (in given thread). * Mapping of {@link AllocThreadClassMethodData} objects and method IDs. */ private Map methods; /** * Creates new AllocThreadClassData. * * @param ID unique ID of this object. * @param thread allocation data for this thread. * @param clazz allocation data for this class. */ AllocThreadTypeData(int ID, ThreadData thread, AllocTypeData clazz) { super(ID); this.thread=thread; this.type=clazz; methods=new HashMap(); } /** * Creates new AllocThreadClassdData. * * @param sid data returned by communication layer * @param thread allocation data for this thread. * @param clazz allocation data for this class. */ AllocThreadTypeData( IProf.sID sid, ThreadData thread, AllocTypeData clazz ) { this( sid.objId, thread, clazz ); //if (sid.alloc!=null) //do not test this, its an error setStatistics(sid.alloc); } /** * Returns allocation data for this thread. * * @return allocation data for this thread. */ public ThreadData getThread() { return thread; } /** * Return allocation data for this class. * * @return allocation data for this class. */ public AllocTypeData getType() { return type; } /** * Returns map of methods where an instance of this class was allocated * (in given thread). * * @return mapping of {@link AllocThreadClassMethodData} objects nad method IDs. */ public Map getMethods() { return methods; } /** * Adds method where an instance of this class was allocated * (in given thread). * * @param method method where an instance of this class was allocated * (in given thread). */ void addMethod(AllocThreadTypeMethodData method) { methods.put(new Integer(method.getTypeMethod().getMethod().getID()), method); } /** * Returns method (with given ID) where an instances of this class were * allocated (in given thread). * * @param ID ID of the method. * @return method (with given ID) where an instances of this class were * allocated (in given thread) or <code>null</code> if such thread does * not exist. */ public AllocThreadTypeMethodData getMethod(int ID) { return (AllocThreadTypeMethodData)methods.get(new Integer(ID)); } } /* * $Log: AllocThreadTypeData.java,v $ * Revision 1.1 2002/02/15 22:37:30 vachis * code refactorization Class..Data renamed to Type..Data * * Revision 1.7 2002/01/11 22:22:16 vachis * unnecessary test removed * * Revision 1.6 2001/12/01 20:03:27 petrul * changed constructor code * * Revision 1.5 2001/11/20 22:23:37 vachis * Contructors from IProf.sID and monitors statistic info * * Revision 1.4 2001/09/29 21:01:33 stolis * Plural added in licenses. * * Revision 1.3 2001/07/19 21:59:22 stolis * Keys of maps changed. * * Revision 1.2 2001/07/18 22:20:39 stolis * Mirrors for CPU profiling added; * references to obejct IDs removed; * Lists changed to Maps. * * Revision 1.1.1.1 2001/07/11 22:27:40 stolis * no message * */ --- NEW FILE: AllocThreadTypeMethodData.java --- /* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License Version * 1.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is available at http://www.sun.com/ * * The Original Code is the Java Profiler module. * The Initial Developers of the Original Code are Jan Stola, Pavel Vacha, * Michal Pise, Petr Luner, Lukas Petru and Marek Przeczek. * Portions created by Jan Stola are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Pavel Vacha are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Michal Pise are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Petr Luner are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Lukas Petru are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Marek Przeczek are Copyright (C) 2000-2001. All Rights Reserved. * * Contributors: Jan Stola, Pavel Vacha, Michal Pise, Petr Luner, * Lukas Petru and Marek Przeczek. */ package net.sourceforge.javaprofiler.jpiimpl.data; import java.util.*; import net.sourceforge.javaprofiler.jpiimpl.commun.*; /** * Allocation data for one class, method and thread. * * @author Jan Stola */ public class AllocThreadTypeMethodData extends AllocAbstractStatThreadClassData { /** Allocation data for this class and thread. */ private AllocThreadTypeData threadType; /** Allocation data for this class and method. */ private AllocTypeMethodData typeMethod; /** Allocation data for this method and thread. */ private AllocThreadMethodData threadMethod; /** * MAp of traces of this method in this thread where instances of this class * were allocated. Mapping of {@link AllocThreadClassMethodTraceData} objects * and trace IDs. */ private Map traces; /** * Creates new AllocThreadClassMethodData. * * @param ID unique ID of this object. * @param threadClass allocation data for this class and thread. * @param classMethod allocation data for this class and method. * @param threadMethod allocation data for this thread and method. */ AllocThreadTypeMethodData(int ID, AllocThreadTypeData threadClass, AllocTypeMethodData classMethod, AllocThreadMethodData threadMethod) { super(ID); this.threadType=threadClass; this.typeMethod=classMethod; this.threadMethod=threadMethod; traces=new HashMap(); } /** * Creates new AllocThreadClassMethodData. * * @param sid data returned by communication layer * @param threadClass allocation data for this class and thread. * @param classMethod allocation data for this class and method. * @param threadMethod allocation data for this thread and method. */ AllocThreadTypeMethodData( IProf.sID sid, AllocThreadTypeData threadClass, AllocTypeMethodData classMethod, AllocThreadMethodData threadMethod ) { this( sid.objId, threadClass, classMethod, threadMethod ); //if (sid.alloc!=null) //do not test this, its an error setStatistics(sid.alloc); } /** * Returns allocation data for this class and thread. * * @return allocation data for this class and thread. */ public AllocThreadTypeData getThreadType() { return threadType; } /** * Returns allocation data for this class and method. * * @return allocation data for this class and method. */ public AllocTypeMethodData getTypeMethod() { return typeMethod; } /** * Returns allocation data for this thread and method. * * @return allocation data for this thread and method. */ public AllocThreadMethodData getThreadMethod() { return threadMethod; } /** * Returns map of traces of this method in this thread where instances of this * class were allocated. * * @return mapping of {@link AllocThreadClassTraceData} objects and trace IDs. */ public Map getTraces() { return traces; } /** * Adds trace of this method in this thread where instances of this * class were allocated. * * @param trace trace of this method in this thread where instances of this * class were allocated. */ void addTrace(AllocThreadTypeTraceData trace) { traces.put(new Integer(trace.getTypeTrace().getTrace().getID()), trace); } /** * Returns trace (with given ID) of this method in this thread where * instances of this class were allocated. * * @param ID ID of the trace. * @return trace (with given ID) of this method in this thread where * instances of this class were allocated or <code>null</code> if such * trace does not exist. */ public AllocThreadTypeTraceData getTrace(int ID) { return (AllocThreadTypeTraceData)traces.get(new Integer(ID)); } } /* * $Log: AllocThreadTypeMethodData.java,v $ * Revision 1.1 2002/02/15 22:37:30 vachis * code refactorization Class..Data renamed to Type..Data * * Revision 1.7 2002/01/11 22:22:16 vachis * unnecessary test removed * * Revision 1.6 2001/12/01 20:06:49 petrul * changed constructor code * * Revision 1.5 2001/11/20 22:23:37 vachis * Contructors from IProf.sID and monitors statistic info * * Revision 1.4 2001/09/29 21:01:33 stolis * Plural added in licenses. * * Revision 1.3 2001/07/19 21:59:22 stolis * Keys of maps changed. * * Revision 1.2 2001/07/18 22:20:39 stolis * Mirrors for CPU profiling added; * references to obejct IDs removed; * Lists changed to Maps. * * Revision 1.1.1.1 2001/07/11 22:27:42 stolis * no message * */ --- NEW FILE: AllocThreadTypeTraceData.java --- /* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License Version * 1.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is available at http://www.sun.com/ * * The Original Code is the Java Profiler module. * The Initial Developers of the Original Code are Jan Stola, Pavel Vacha, * Michal Pise, Petr Luner, Lukas Petru and Marek Przeczek. * Portions created by Jan Stola are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Pavel Vacha are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Michal Pise are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Petr Luner are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Lukas Petru are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Marek Przeczek are Copyright (C) 2000-2001. All Rights Reserved. * * Contributors: Jan Stola, Pavel Vacha, Michal Pise, Petr Luner, * Lukas Petru and Marek Przeczek. */ package net.sourceforge.javaprofiler.jpiimpl.data; import net.sourceforge.javaprofiler.jpiimpl.commun.*; /** * Allocation data for one class, thread and trace. * * @author Jan Stola */ public class AllocThreadTypeTraceData extends AllocAbstractStatThreadClassData { /** Allocation data for this class and trace. */ private AllocTypeTraceData typeTrace; /** Allocation data for this class, thread and method. */ private AllocThreadTypeMethodData threadTypeMethod; /** Allocation data for this thread and trace. */ private AllocThreadTraceData threadTrace; /** * Creates new AllocThreadClassTraceData. * * @param ID unique ID of this object. * @param classTrace allocation data for this class and trace. * @param threadClassMethod allocation data for this class, thread and method. * @param threadTrace allocation data for this thread and trace. */ AllocThreadTypeTraceData(int ID, AllocTypeTraceData classTrace, AllocThreadTypeMethodData threadClassMethod, AllocThreadTraceData threadTrace) { super(ID); this.typeTrace=classTrace; this.threadTypeMethod=threadClassMethod; this.threadTrace=threadTrace; } /** * Creates new AllocThreadClassTraceData. * * @param sid data returned by communication layer * @param classTrace allocation data for this class and trace. * @param threadClassMethod allocation data for this class, thread and method. * @param threadTrace allocation data for this thread and trace. */ AllocThreadTypeTraceData( IProf.sID sid, AllocTypeTraceData classTrace, AllocThreadTypeMethodData threadClassMethod, AllocThreadTraceData threadTrace ) { this( sid.objId, classTrace, threadClassMethod, threadTrace ); //if (sid.alloc!=null) //do not test this, its an error setStatistics(sid.alloc); } /** * Returns allocation data for this class and trace. * * @return allocation data for this class and trace. */ public AllocTypeTraceData getTypeTrace() { return typeTrace; } /** * Returns allocation data for this class, thread and method. * * @return allocation data for this class, thread and method. */ public AllocThreadTypeMethodData getThreadTypeMethod() { return threadTypeMethod; } /** * Returns allocation data for this thread and trace. * * @return allocation data for this thread and trace. */ public AllocThreadTraceData getThreadTrace() { return threadTrace; } } /* * $Log: AllocThreadTypeTraceData.java,v $ * Revision 1.1 2002/02/15 22:37:30 vachis * code refactorization Class..Data renamed to Type..Data * * Revision 1.5 2002/01/11 22:22:16 vachis * unnecessary test removed * * Revision 1.4 2001/12/01 20:11:38 petrul * changed constructor code * * Revision 1.3 2001/11/20 22:23:37 vachis * Contructors from IProf.sID and monitors statistic info * * Revision 1.2 2001/09/29 21:01:33 stolis * Plural added in licenses. * * Revision 1.1.1.1 2001/07/11 22:27:48 stolis * no message * */ --- NEW FILE: AllocTypeData.java --- /* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License Version * 1.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is available at http://www.sun.com/ * * The Original Code is the Java Profiler module. * The Initial Developers of the Original Code are Jan Stola, Pavel Vacha, * Michal Pise, Petr Luner, Lukas Petru and Marek Przeczek. * Portions created by Jan Stola are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Pavel Vacha are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Michal Pise are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Petr Luner are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Lukas Petru are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Marek Przeczek are Copyright (C) 2000-2001. All Rights Reserved. * * Contributors: Jan Stola, Pavel Vacha, Michal Pise, Petr Luner, * Lukas Petru and Marek Przeczek. */ package net.sourceforge.javaprofiler.jpiimpl.data; import java.util.*; import net.sourceforge.javaprofiler.jpiimpl.commun.*; /** * Allocation data for one class. * * @author Jan Stola */ 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, * JVMPI_BOOLEAN etc.) */ private int arrayType; //PENDING /** * Map of methods where instance of this class were allocated. * Mapping between {@link AllocClassMethodData} objects and method IDs. */ private Map methods; /** * Map of threads in which instances of this class were allocated. * Mapping between {@link AllocThreadClassData} objects and thread IDs. */ private Map threads; /** * Creates new AllocClassData. * * @param ID unique ID of this object. * @param classData class to which this allocation data belongs. * @param classID object ID of the Class object of this class. * @param type type of this class. */ AllocTypeData(int ID, ClassData classData, int type) { super(ID); this.classData=classData; this.arrayType=type; methods=new HashMap(); threads=new HashMap(); } /** * Creates new AllocClassData. * @param sid data returned by communication layer * @param clazz class to which this allocation data belongs. */ AllocTypeData(IProf.sID sid, ClassData clazz) { this( sid.objId, clazz, ((IProf.sObjectInfo) sid.info).isArray ); //if (sid.alloc != null) //do not test this, its an error setStatistics(sid.alloc); } /** * Returns class to which this allocation data belongs. * * @return class to which this allocation data belongs. */ public ClassData getClassData() { return classData; } /** * Returns type of the class. * * @return type of the class. */ public int getArrayType() { return arrayType; } /** * Returns map of methods where instance of this class were allocated. * * @return mapping between {@link AllocClassMethodData} objects and method IDs. */ public Map getMethods() { return methods; } /** * Adds method where instance of this class was allocated. * * @param method method where instance of this class were allocated. */ void addMethod(AllocTypeMethodData method) { methods.put(new Integer(method.getMethod().getID()), method); } /** * Returns method (with given ID) where instance of this class was allocated. * * @param ID ID of the method. * @return method (with given ID) where instance of this class was allocated * or <code>null</code> if such method does not exist. */ public AllocTypeMethodData getMethod(int ID) { return (AllocTypeMethodData)methods.get(new Integer(ID)); } /** * Return map of threads in which instances of this class were allocated. * * @return mapping between {@link AllocThreadClassData} objects and thread IDs. */ public Map getThreads() { return threads; } /** * Adds thread where instances of this class were allocated. * * @param thread where instances of this class were allocated. */ void addThread(AllocThreadTypeData thread) { threads.put(new Integer(thread.getThread().getID()), thread); } /** * Returns thread (with given ID) where instances of this class * were allocated. * * @param ID ID of the thread. * @return thread (with given ID) where instances of this class * were allocated or <code>null</code> if such thread does not exist. */ public AllocThreadTypeData getThread(int ID) { return (AllocThreadTypeData)methods.get(new Integer(ID)); } } /* * $Log: AllocTypeData.java,v $ * Revision 1.1 2002/02/15 22:37:30 vachis * code refactorization Class..Data renamed to Type..Data * * Revision 1.8 2002/01/11 22:22:16 vachis * unnecessary test removed * * Revision 1.7 2001/12/06 20:27:22 vachis * use isArray atribute * * Revision 1.6 2001/12/01 17:42:54 petrul * changed constructor code * * Revision 1.5 2001/11/20 22:23:37 vachis * Contructors from IProf.sID and monitors statistic info * * Revision 1.4 2001/09/29 21:01:33 stolis * Plural added in licenses. * * Revision 1.3 2001/07/19 21:59:22 stolis * Keys of maps changed. * * Revision 1.2 2001/07/18 22:20:39 stolis * Mirrors for CPU profiling added; * references to obejct IDs removed; * Lists changed to Maps. * * Revision 1.1.1.1 2001/07/11 22:27:31 stolis * no message * */ --- NEW FILE: AllocTypeMethodData.java --- /* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License Version * 1.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is available at http://www.sun.com/ * * The Original Code is the Java Profiler module. * The Initial Developers of the Original Code are Jan Stola, Pavel Vacha, * Michal Pise, Petr Luner, Lukas Petru and Marek Przeczek. * Portions created by Jan Stola are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Pavel Vacha are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Michal Pise are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Petr Luner are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Lukas Petru are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Marek Przeczek are Copyright (C) 2000-2001. All Rights Reserved. * * Contributors: Jan Stola, Pavel Vacha, Michal Pise, Petr Luner, * Lukas Petru and Marek Przeczek. */ package net.sourceforge.javaprofiler.jpiimpl.data; import java.util.*; import net.sourceforge.javaprofiler.jpiimpl.commun.*; /** * Allocation data for one class and method. * * @author Jan Stola */ public class AllocTypeMethodData extends AllocAbstractStatThreadClassData { /** Allocation data for this class. */ private AllocTypeData clazz; /** Allocation data for this method. */ private MethodData method; /** * Map of traces of the method in which instances of this class were * allocated. Mapping between {@link AllocClassTraceData} objects and * trace IDs. */ private Map traces; /** * Map of threads where the method was called and instances of this class * allocated. Mapping between {@link AllocThreadClassMethodData} objects * and thread IDs. */ private Map threads; /** * Creates new AllocClassMethodData. * * @param ID unique ID of this object. * @param clazz allocation data for this class. * @param method allocation data for this method. */ AllocTypeMethodData(int ID, AllocTypeData clazz, MethodData method) { super(ID); this.clazz=clazz; this.method=method; traces=new HashMap(); threads=new HashMap(); } /** * Creates new AllocClassMethodData. * * @param sid data returned by communication layer * @param method allocation data for this method. * @param clazz allocation data for this class. */ AllocTypeMethodData( IProf.sID sid, AllocTypeData clazz, MethodData method ) { this( sid.objId, clazz, method ); //if (sid.alloc!=null) //do not test this, its an error setStatistics(sid.alloc); } /** * Returns allocation data for this class. * * @return allocation data for this class. */ public AllocTypeData getClazz() { return clazz; } /** * Returns allocation data for this method. * * @return allocation data for this method. */ public MethodData getMethod() { return method; } /** * Returns map of traces of the method in which instances of this class were * allocated. * * @return mapping between {@link AllocClassTraceData} objects and trace IDs. */ public Map getTraces() { return traces; } /** * Adds trace of the method in which instances of this class were allocated. * * @param trace trace of the method in which instances of this class were * allocated. */ void addTrace(AllocTypeTraceData trace) { traces.put(new Integer(trace.getTrace().getID()), trace); } /** * Returns trace (with given ID) of the method in which instances of this * class were allocated. * * @param ID ID of the trace. * @return trace (with given ID) of the method in which instances of this * class were allocated or <code>null</code> if such trace does not exist. */ public AllocTypeTraceData getTrace(int ID) { return (AllocTypeTraceData)traces.get(new Integer(ID)); } /** * Returns map of threads where the method was called and instances of this * class allocated. * * @return mapping of {@link AllocThreadClassMethodData} objects and thread IDs. */ public Map getThreads() { return threads; } /** * Adds thread where the method was called and instances of this class * allocated. * * @param thread thread where the method was called and instances of this * class allocated. */ void addThread(AllocThreadTypeMethodData thread) { threads.put(new Integer(thread.getThreadType().getThread().getID()), thread); } /** * Returns thread (with given ID) where the method was called and instances * of this class allocated. * * @param ID ID of the thread. * @return thread (with given ID) where the method was called and instances * of this class allocated or <code>null</code> if such thread does not exist. */ public AllocThreadTypeMethodData getThread(int ID) { return (AllocThreadTypeMethodData)threads.get(new Integer(ID)); } } /* * $Log: AllocTypeMethodData.java,v $ * Revision 1.1 2002/02/15 22:37:30 vachis * code refactorization Class..Data renamed to Type..Data * * Revision 1.7 2002/01/11 22:22:16 vachis * unnecessary test removed * * Revision 1.6 2001/12/01 19:51:44 petrul * changed constructor code * * Revision 1.5 2001/11/20 22:23:37 vachis * Contructors from IProf.sID and monitors statistic info * * Revision 1.4 2001/09/29 21:01:33 stolis * Plural added in licenses. * * Revision 1.3 2001/07/19 21:59:22 stolis * Keys of maps changed. * * Revision 1.2 2001/07/18 22:20:39 stolis * Mirrors for CPU profiling added; * references to obejct IDs removed; * Lists changed to Maps. * * Revision 1.1.1.1 2001/07/11 22:27:31 stolis * no message * */ --- NEW FILE: AllocTypeTraceData.java --- /* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License Version * 1.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is available at http://www.sun.com/ * * The Original Code is the Java Profiler module. * The Initial Developers of the Original Code are Jan Stola, Pavel Vacha, * Michal Pise, Petr Luner, Lukas Petru and Marek Przeczek. * Portions created by Jan Stola are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Pavel Vacha are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Michal Pise are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Petr Luner are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Lukas Petru are Copyright (C) 2000-2001. All Rights Reserved. * Portions created by Marek Przeczek are Copyright (C) 2000-2001. All Rights Reserved. * * Contributors: Jan Stola, Pavel Vacha, Michal Pise, Petr Luner, * Lukas Petru and Marek Przeczek. */ package net.sourceforge.javaprofiler.jpiimpl.data; import java.util.*; import net.sourceforge.javaprofiler.jpiimpl.commun.*; /** * Allocation data for one class and trace. * * @author Jan Stola */ public class AllocTypeTraceData extends AllocAbstractStatThreadClassData { /** Allocation data for this class and method. */ private AllocTypeMethodData classMethod; /** Allocation data for this trace. */ private AllocTraceData trace; /** * Map of threads where instances of this class were allocated in given trace. * Mapping of {@link AllocThreadClassTraceData} objects and thread IDs. */ private Map threads; /** * Creates new AllocClassTraceData. * * @param ID unique ID of this object. * @param classMethod allocation data for this class and method. * @param trace allocation data for this trace. */ AllocTypeTraceData(int ID, AllocTypeMethodData classMethod, AllocTraceData trace) { super(ID); this.classMethod=classMethod; this.trace=trace; threads=new HashMap(); } /** * Creates new AllocClassTraceData. * @param sid data returned by communication layer * @param trace allocation data for this trace. * @param classMethod allocation data for this class and method. */ AllocTypeTraceData( IProf.sID sid, AllocTypeMethodData classMethod, AllocTraceData trace) { this( sid.objId, classMethod, trace ); //if (sid.alloc!=null) //do not test this, its an error setStatistics(sid.alloc); } /** * Returns allocation data for this class and method. * * @return allocation data for this class and method. */ public AllocTypeMethodData getClassMethod() { return classMethod; } /** * Returns allocation data for this trace. * * @return allocation data for this trace. */ public AllocTraceData getTrace() { return trace; } /** * Returns map of threads where instances of this class were allocated * in given trace. * * @return mapping of {@link AllocThreadClassTraceData} objects and thread IDs. */ public Map getThreads() { return threads; } /** * Adds thread where instances of this class were allocated in given trace. * * @param thread thread where instances of this class were allocated * in given trace. */ void addThread(AllocThreadTypeTraceData thread) { threads.put(new Integer(thread.getThreadTrace().getThreadMethod().getThread().getID()), thread); } /** * Returns thread (with given ID) where instances of this class were * allocated in given trace. * * @param ID ID of the thread. * @return thread (with given ID) where instances of this class were * allocated in given trace or <code>null</code> if such thread does * not exist. */ public AllocThreadTypeTraceData getThread(int ID) { return (AllocThreadTypeTraceData)threads.get(new Integer(ID)); } } /* * $Log: AllocTypeTraceData.java,v $ * Revision 1.1 2002/02/15 22:37:30 vachis * code refactorization Class..Data renamed to Type..Data * * Revision 1.7 2002/01/11 22:22:16 vachis * unnecessary test removed * * Revision 1.6 2001/12/01 19:56:03 petrul * changed constructor code * * Revision 1.5 2001/11/20 22:23:37 vachis * Contructors from IProf.sID and monitors statistic info * * Revision 1.4 2001/09/29 21:01:33 stolis * Plural added in licenses. * * Revision 1.3 2001/07/19 21:59:22 stolis * Keys of maps changed. * * Revision 1.2 2001/07/18 22:20:39 stolis * Mirrors for CPU profiling added; * references to obejct IDs removed; * Lists changed to Maps. * * Revision 1.1.1.1 2001/07/11 22:27:37 stolis * no message * */ Index: AllocThreadMethodData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/AllocThreadMethodData.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** AllocThreadMethodData.java 15 Jan 2002 22:05:57 -0000 1.9 --- AllocThreadMethodData.java 15 Feb 2002 22:37:30 -0000 1.10 *************** *** 39,43 **** * Mapping of {@link AllocThreadClassMethodData} objects and class IDs. */ ! private Map classes; /** * Map of traces of this method in this thread. --- 39,43 ---- * Mapping of {@link AllocThreadClassMethodData} objects and class IDs. */ ! private Map types; /** * Map of traces of this method in this thread. *************** *** 57,61 **** this.thread=thread; this.method=method; ! classes=new HashMap(); traces=new HashMap(); } --- 57,61 ---- this.thread=thread; this.method=method; ! types=new HashMap(); traces=new HashMap(); } *************** *** 99,104 **** * @return mapping of {@link AllocThreadClassMethodData} objects and class IDs. */ ! public Map getClasses() { ! return classes; } --- 99,104 ---- * @return mapping of {@link AllocThreadClassMethodData} objects and class IDs. */ ! public Map getTypes() { ! return types; } *************** *** 109,115 **** * @param allocClass allocClass that were allocated in this method and thread. */ ! void addClass(AllocThreadClassMethodData allocClass) { //FIXME ! classes.put(new Integer(allocClass.getID()), allocClass); } --- 109,115 ---- * @param allocClass allocClass that were allocated in this method and thread. */ ! void addType(AllocThreadTypeMethodData allocClass) { //FIXME ! types.put(new Integer(allocClass.getID()), allocClass); } *************** *** 123,128 **** * not exist. */ ! public AllocThreadClassMethodData getClass(int ID) { ! return (AllocThreadClassMethodData)classes.get(new Integer(ID)); } --- 123,128 ---- * not exist. */ ! public AllocThreadTypeMethodData getType(int ID) { ! return (AllocThreadTypeMethodData)types.get(new Integer(ID)); } *************** *** 160,163 **** --- 160,166 ---- /* * $Log$ + * Revision 1.10 2002/02/15 22:37:30 vachis + * code refactorization Class..Data renamed to Type..Data + * * Revision 1.9 2002/01/15 22:05:57 vachis * addClass() modified *************** *** 190,192 **** * no message * ! */ \ No newline at end of file --- 193,195 ---- * no message * ! */ Index: AllocThreadTraceData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/AllocThreadTraceData.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** AllocThreadTraceData.java 15 Jan 2002 22:05:57 -0000 1.9 --- AllocThreadTraceData.java 15 Feb 2002 22:37:30 -0000 1.10 *************** *** 39,43 **** * Mapping of {@link AllocThreadClassTraceData} objects and class IDs. */ ! private Map classes; /** --- 39,43 ---- * Mapping of {@link AllocThreadClassTraceData} objects and class IDs. */ ! private Map types; /** *************** *** 52,56 **** this.threadMethod=threadMethod; this.trace=trace; ! classes=new HashMap(); } --- 52,56 ---- this.threadMethod=threadMethod; this.trace=trace; ! types=new HashMap(); } *************** *** 93,98 **** * @return mapping of {@link AllocThreadClassTraceData} objects and class IDs. */ ! public Map getClasses() { ! return classes; } --- 93,98 ---- * @return mapping of {@link AllocThreadClassTraceData} objects and class IDs. */ ! public Map getTypes() { ! return types; } *************** *** 104,110 **** * and thread. */ ! void addClass(AllocThreadClassTraceData allocClass) { // FIXME: ! classes.put(new Integer(allocClass.getID()), allocClass); } --- 104,110 ---- * and thread. */ ! void addType(AllocThreadTypeTraceData allocClass) { // FIXME: ! types.put(new Integer(allocClass.getID()), allocClass); } *************** *** 118,123 **** * not exist. */ ! public AllocThreadClassTraceData getClass(int ID) { ! return (AllocThreadClassTraceData)classes.get(new Integer(ID)); } --- 118,123 ---- * not exist. */ ! public AllocThreadTypeTraceData getType(int ID) { ! return (AllocThreadTypeTraceData)types.get(new Integer(ID)); } *************** *** 126,129 **** --- 126,132 ---- /* * $Log$ + * Revision 1.10 2002/02/15 22:37:30 vachis + * code refactorization Class..Data renamed to Type..Data + * * Revision 1.9 2002/01/15 22:05:57 vachis * addClass() modified *************** *** 156,158 **** * no message * ! */ \ No newline at end of file --- 159,161 ---- * no message * ! */ Index: AllocTraceData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/AllocTraceData.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** AllocTraceData.java 15 Jan 2002 22:05:56 -0000 1.10 --- AllocTraceData.java 15 Feb 2002 22:37:30 -0000 1.11 *************** *** 42,46 **** * Mapping of {@link AllocClassTraceData} objects and class IDs. */ ! private Map classes; /** * Map of threads in which this trace appeared. --- 42,46 ---- * Mapping of {@link AllocClassTraceData} objects and class IDs. */ ! private Map types; /** * Map of threads in which this trace appeared. *************** *** 61,65 **** this.method=method; this.frames=frames; ! classes=new HashMap(); threads=new HashMap(); } --- 61,65 ---- this.method=method; this.frames=frames; ! types=new HashMap(); threads=new HashMap(); } *************** *** 102,107 **** * @return mapping of {@link AllocClassTraceData} objects and class IDs. */ ! public Map getClasses() { ! return classes; } --- 102,107 ---- * @return mapping of {@link AllocClassTraceData} objects and class IDs. */ ! public Map getTypes() { ! return types; } *************** *** 112,118 **** * @param allocClass allocClass that were allocated in this trace. */ ! void addClass(AllocClassTraceData allocClass) { //FIXMEE: ! classes.put(new Integer(allocClass.getID()), allocClass); } --- 112,118 ---- * @param allocClass allocClass that were allocated in this trace. */ ! void addType(AllocTypeTraceData allocClass) { //FIXMEE: ! types.put(new Integer(allocClass.getID()), allocClass); } *************** *** 125,130 **** * in this trace or <code>null</code> if such class does not exist. */ ! public AllocClassTraceData getClass(int ID) { ! return (AllocClassTraceData)classes.get(new Integer(ID)); } --- 125,130 ---- * in this trace or <code>null</code> if such class does not exist. */ ! public AllocTypeTraceData getType(int ID) { ! return (AllocTypeTraceData)types.get(new Integer(ID)); } *************** *** 163,166 **** --- 163,169 ---- /* * $Log$ + * Revision 1.11 2002/02/15 22:37:30 vachis + * code refactorization Class..Data renamed to Type..Data + * * Revision 1.10 2002/01/15 22:05:56 vachis * addClass() modified *************** *** 196,198 **** * no message * ! */ \ No newline at end of file --- 199,201 ---- * no message * ! */ Index: MethodData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/MethodData.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** MethodData.java 15 Jan 2002 22:05:56 -0000 1.10 --- MethodData.java 15 Feb 2002 22:37:30 -0000 1.11 *************** *** 298,302 **** * @param allocClass allocClass that were allocated in this method. */ ! void addClass(AllocClassMethodData allocClass) { classes.put(new Integer(allocClass.getID()), allocClass); } --- 298,302 ---- * @param allocClass allocClass that were allocated in this method. */ ! void addClass(AllocTypeMethodData allocClass) { classes.put(new Integer(allocClass.getID()), allocClass); } *************** *** 310,315 **** * in this method or <code>null</code> if such class does not exist. */ ! public AllocClassMethodData getClass(int ID) { ! return (AllocClassMethodData)classes.get(new Integer(ID)); } --- 310,315 ---- * 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)); } *************** *** 531,534 **** --- 531,537 ---- /* * $Log$ + * Revision 1.11 2002/02/15 22:37:30 vachis + * code refactorization Class..Data renamed to Type..Data + * * Revision 1.10 2002/01/15 22:05:56 vachis * addClass() modified *************** *** 565,567 **** * no message * ! */ \ No newline at end of file --- 568,570 ---- * no message * ! */ Index: SnapshotImpl.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/SnapshotImpl.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** SnapshotImpl.java 26 Jan 2002 20:56:02 -0000 1.9 --- SnapshotImpl.java 15 Feb 2002 22:37:30 -0000 1.10 *************** *** 46,50 **** private LinkedList groupThreads = new LinkedList(); private LinkedList threads = new LinkedList(); ! private LinkedList allocObjects = new LinkedList(); private LinkedList arenas = new LinkedList(); private LinkedList gcs = new LinkedList(); --- 46,50 ---- private LinkedList groupThreads = new LinkedList(); private LinkedList threads = new LinkedList(); ! private LinkedList allocTypes = new LinkedList(); private LinkedList arenas = new LinkedList(); private LinkedList gcs = new LinkedList(); *************** *** 267,272 **** * @return list of allocatable objects. */ ! public List allocObjects() { ! return allocObjects; } --- 267,272 ---- * @return list of allocatable objects. */ ! public List allocTypes() { ! return allocTypes; } *************** *** 375,381 **** actLst2.clear(); actLst.clear(); ! extract( null, allocObjects, IProf.OBJECT_TYPES, IProf.NO_OPTIONAL_ARG, iprof ); ! extract( allocObjects, (withTraces)? actLst : null, IProf.ALLOC_OBJECT_METHODS, IProf.NO_OPTIONAL_ARG, iprof ); --- 375,381 ---- actLst2.clear(); actLst.clear(); ! extract( null, allocTypes, IProf.OBJECT_TYPES, IProf.NO_OPTIONAL_ARG, iprof ); ! extract( allocTypes, (withTraces)? actLst : null, IProf.ALLOC_OBJECT_METHODS, IProf.NO_OPTIONAL_ARG, iprof ); *************** *** 636,640 **** ((IProf.sObjectInfo) sid.info).classObjId)); //ClassData clz = null; ! return new AllocClassData( sid, clz ); //have to look at sid.info.isArray, probably in object //before calling getClazz() --- 636,640 ---- ((IProf.sObjectInfo) sid.info).classObjId)); //ClassData clz = null; ! return new AllocTypeData( sid, clz ); //have to look at sid.info.isArray, probably in object //before calling getClazz() *************** *** 725,731 **** case IProf.ALLOC_METHOD_OBJECTS: { MethodData lf = (MethodData) refObj; ! AllocClassData up = (AllocClassData) libIDs.get( new Integer( sid.parentUpObjId )); ! AllocClassMethodData newObj = new AllocClassMethodData( sid, up, lf ); lf.addClass( newObj ); up.addMethod( newObj ); --- 725,731 ---- case IProf.ALLOC_METHOD_OBJECTS: { MethodData lf = (MethodData) refObj; ! AllocTypeData up = (AllocTypeData) libIDs.get( new Integer( sid.parentUpObjId )); ! AllocTypeMethodData newObj = new AllocTypeMethodData( sid, up, lf ); lf.addClass( newObj ); up.addMethod( newObj ); *************** *** 735,740 **** MethodData lf = (MethodData) libIDs.get( new Integer( sid.parentLeftObjId )); ! AllocClassData up = (AllocClassData) refObj; ! AllocClassMethodData newObj = new AllocClassMethodData( sid, up, lf ); lf.addClass( newObj ); up.addMethod( newObj ); --- 735,740 ---- MethodData lf = (MethodData) libIDs.get( new Integer( sid.parentLeftObjId )); ! AllocTypeData up = (AllocTypeData) refObj; ! AllocTypeMethodData newObj = new AllocTypeMethodData( sid, up, lf ); lf.addClass( newObj ); up.addMethod( newObj ); *************** *** 743,760 **** //// case IProf.ALLOC_TRACE_OBJECTS: { ! AllocClassMethodData up = (AllocClassMethodData) libIDs.get( new Integer( sid.parentUpObjId )); AllocTraceData lf = (AllocTraceData) refObj; ! AllocClassTraceData newObj = new AllocClassTraceData( sid, up, lf ); ! lf.addClass( newObj ); up.addTrace( newObj ); return newObj; } case IProf.ALLOC_OBJECT_METHOD_TRACES:{ ! AllocClassMethodData up = (AllocClassMethodData) refObj; AllocTraceData lf = (AllocTraceData) libIDs.get( new Integer( sid.parentLeftObjId )); ! AllocClassTraceData newObj = new AllocClassTraceData( sid, up, lf ); ! lf.addClass( newObj ); up.addTrace( newObj ); return newObj; --- 743,760 ---- //// case IProf.ALLOC_TRACE_OBJECTS: { ! AllocTypeMethodData up = (AllocTypeMethodData) libIDs.get( new Integer( sid.parentUpObjId )); AllocTraceData lf = (AllocTraceData) refObj; ! AllocTypeTraceData newObj = new AllocTypeTraceData( sid, up, lf ); ! lf.addType( newObj ); up.addTrace( newObj ); return newObj; } case IProf.ALLOC_OBJECT_METHOD_TRACES:{ ! AllocTypeMethodData up = (AllocTypeMethodData) refObj; AllocTraceData lf = (AllocTraceData) libIDs.get( new Integer( sid.parentLeftObjId )); ! AllocTypeTraceData newObj = new AllocTypeTraceData( sid, up, lf ); ! lf.addType( newObj ); up.addTrace( newObj ); return newObj; *************** *** 762,768 **** //// case IProf.ALLOC_OBJECT_THREADS: { ! AllocClassData lf = (AllocClassData) refObj; ThreadData up = (ThreadData) libIDs.get( new Integer( sid.parentUpObjId)); ! AllocThreadClassData newObj = new AllocThreadClassData( sid, up, lf ); up.addClass( newObj ); lf.addThread( newObj ); --- 762,768 ---- //// case IProf.ALLOC_OBJECT_THREADS: { ! AllocTypeData lf = (AllocTypeData) refObj; ThreadData up = (ThreadData) libIDs.get( new Integer( sid.parentUpObjId)); ! AllocThreadTypeData newObj = new AllocThreadTypeData( sid, up, lf ); up.addClass( newObj ); lf.addThread( newObj ); *************** *** 770,777 **** } case IProf.ALLOC_THREAD_OBJECTS: { ! AllocClassData lf = (AllocClassData) libIDs.get( new Integer( sid.parentLeftObjId )); ThreadData up = (ThreadData) refObj; ! AllocThreadClassData newObj = new AllocThreadClassData( sid, up, lf ); lf.addThread( newObj ); up.addClass( newObj ); --- 770,777 ---- } case IProf.ALLOC_THREAD_OBJECTS: { ! AllocTypeData lf = (AllocTypeData) libIDs.get( new Integer( sid.parentLeftObjId )); ThreadData up = (ThreadData) refObj; ! AllocThreadTypeData newObj = new AllocThreadTypeData( sid, up, lf ); lf.addThread( newObj ); up.addClass( newObj ); *************** *** 780,859 **** //// case IProf.ALLOC_OBJECT_METHOD_THREADS:{ ! AllocClassMethodData lf =(AllocClassMethodData) refObj; ! AllocThreadClassData up = (AllocThreadClassData) libIDs.get( new Integer( sid.parentUpObjId )); AllocThreadMethodData rg = (AllocThreadMethodData) libIDs.get( new Integer( sid.parentRightObjId )); ! AllocThreadClassMethodData newObj = new AllocThreadClassMethodData( sid, up, lf, rg ); lf.addThread( newObj ); up.addMethod( newObj ); ! rg.addClass( newObj ); return newObj; } case IProf.ALLOC_THREAD_OBJECT_METHODS:{ ! AllocClassMethodData lf =(AllocClassMethodData) libIDs.get( new Integer( sid.parentLeftObjId )); ! AllocThreadClassData up = (AllocThreadClassData) refObj; AllocThreadMethodData rg = (AllocThreadMethodData) libIDs.get( new Integer( sid.parentRightObjId )); ! AllocThreadClassMethodData newObj = new AllocThreadClassMethodData( sid, up, lf, rg ); lf.addThread( newObj ); up.addMethod( newObj ); ! rg.addClass( newObj ); return newObj; } case IProf.ALLOC_THREAD_METHOD_OBJECTS:{ ! AllocClassMethodData lf =(AllocClassMethodData) libIDs.get( new Integer( sid.parentLeftObjId )); ! AllocThreadClassData up = (AllocThreadClassData) libIDs.get( new Integer( sid.parentUpObjId )); AllocThreadMethodData rg = (AllocThreadMethodData) refObj; ! AllocThreadClassMethodData newObj = new AllocThreadClassMethodData( sid, up, lf, rg ); lf.addThread( newObj ); up.addMethod( newObj ); ! rg.addClass( newObj ); return newObj; } //// case IProf.ALLOC_OBJECT_METHOD_TRACE_THREADS:{ ! AllocClassTraceData lf = (AllocClassTraceData) refObj; ! AllocThreadClassMethodData up = (AllocThreadClassMethodData) libIDs.get( new Integer( sid.parentUpObjId )); AllocThreadTraceData rg = (AllocThreadTraceData) libIDs.get( new Integer( sid.parentRightObjId )); ! AllocThreadClassTraceData newObj = new AllocThreadClassTraceData( sid, lf, up, rg ); lf.addThread( newObj ); up.addTrace( newObj ); ! rg.addClass( newObj ); return newObj; } case IProf.ALLOC_THREAD_METHOD_TRACE_OBJECTS:{ ! AllocClassTraceData lf = (AllocClassTraceData) libIDs.get( new Integer( sid.parentLeftObjId )); ! AllocThreadClassMethodData up = (AllocThreadClassMethodData) libIDs.get( new Integer( sid.parentUpObjId )); AllocThreadTraceData rg = (AllocThreadTraceData) refObj; ! AllocThreadClassTraceData newObj = new AllocThreadClassTraceData( sid, lf, up, rg ); lf.addThread( newObj ); up.addTrace( newObj ); ! rg.addClass( newObj ); return newObj; } case IProf.ALLOC_THREAD_OBJECT_METHOD_TRACES:{ ! AllocClassTraceData lf = (AllocClassTraceData) libIDs.get( new Integer( sid.parentLeftObjId )); ! AllocThreadClassMethodData up = (AllocThreadClassMethodData) refObj; AllocThreadTraceData rg = (AllocThreadTraceData) libIDs.get( new Integer( sid.parentRightObjId )); ! AllocThreadClassTraceData newObj = new AllocThreadClassTraceData( sid, lf, up, rg ); lf.addThread( newObj ); up.addTrace( newObj ); ! rg.addClass( newObj ); return newObj; } --- 780,859 ---- //// case IProf.ALLOC_OBJECT_METHOD_THREADS:{ ! AllocTypeMethodData lf =(AllocTypeMethodData) refObj; ! AllocThreadTypeData up = (AllocThreadTypeData) libIDs.get( new Integer( sid.parentUpObjId )); AllocThreadMethodData rg = (AllocThreadMethodData) libIDs.get( new Integer( sid.parentRightObjId )); ! AllocThreadTypeMethodData newObj = new AllocThreadTypeMethodData( sid, up, lf, rg ); lf.addThread( newObj ); up.addMethod( newObj ); ! rg.addType( newObj ); return newObj; } case IProf.ALLOC_THREAD_OBJECT_METHODS:{ ! AllocTypeMethodData lf =(AllocTypeMethodData) libIDs.get( new Integer( sid.parentLeftObjId )); ! AllocThreadTypeData up = (AllocThreadTypeData) refObj; AllocThreadMethodData rg = (AllocThreadMethodData) libIDs.get( new Integer( sid.parentRightObjId )); ! AllocThreadTypeMethodData newObj = new AllocThreadTypeMethodData( sid, up, lf, rg ); lf.addThread( newObj ); up.addMethod( newObj ); ! rg.addType( newObj ); return newObj; } case IProf.ALLOC_THREAD_METHOD_OBJECTS:{ ! AllocTypeMethodData lf =(AllocTypeMethodData) libIDs.get( new Integer( sid.parentLeftObjId )); ! AllocThreadTypeData up = (AllocThreadTypeData) libIDs.get( new Integer( sid.parentUpObjId )); AllocThreadMethodData rg = (AllocThreadMethodData) refObj; ! AllocThreadTypeMethodData newObj = new AllocThreadTypeMethodData( sid, up, lf, rg ); lf.addThread( newObj ); up.addMethod( newObj ); ! rg.addType( newObj ); return newObj; } //// case IProf.ALLOC_OBJECT_METHOD_TRACE_THREADS:{ ! AllocTypeTraceData lf = (AllocTypeTraceData) refObj; ! AllocThreadTypeMethodData up = (AllocThreadTypeMethodData) libIDs.get( new Integer( sid.parentUpObjId )); AllocThreadTraceData rg = (AllocThreadTraceData) libIDs.get( new Integer( sid.parentRightObjId )); ! AllocThreadTypeTraceData newObj = new AllocThreadTypeTraceData( sid, lf, up, rg ); lf.addThread( newObj ); up.addTrace( newObj ); ! rg.addType( newObj ); return newObj; } case IProf.ALLOC_THREAD_METHOD_TRACE_OBJECTS:{ ! AllocTypeTraceData lf = (AllocTypeTraceData) libIDs.get( new Integer( sid.parentLeftObjId )); ! AllocThreadTypeMethodData up = (AllocThreadTypeMethodData) libIDs.get( new Integer( sid.parentUpObjId )); AllocThreadTraceData rg = (AllocThreadTraceData) refObj; ! AllocThreadTypeTraceData newObj = new AllocThreadTypeTraceData( sid, lf, up, rg ); lf.addThread( newObj ); up.addTrace( newObj ); ! rg.addType( newObj ); return newObj; } case IProf.ALLOC_THREAD_OBJECT_METHOD_TRACES:{ ! AllocTypeTraceData lf = (AllocTypeTraceData) libIDs.get( new Integer( sid.parentLeftObjId )); ! AllocThreadTypeMethodData up = (AllocThreadTypeMethodData) refObj; AllocThreadTraceData rg = (AllocThreadTraceData) libIDs.get( new Integer( sid.parentRightObjId )); ! AllocThreadTypeTraceData newObj = new AllocThreadTypeTraceData( sid, lf, up, rg ); lf.addThread( newObj ); up.addTrace( newObj ); ! rg.addType( newObj ); ... [truncated message content] |