Update of /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime In directory usw-pr-cvs1:/tmp/cvs-serv25681 Modified Files: AllocThreadMethodR.java AllocThreadTraceR.java AllocTraceR.java AllocTypeMethodR.java AllocTypeR.java AllocTypeThreadMethodR.java AllocTypeThreadR.java AllocTypeThreadTraceR.java AllocTypeTraceR.java CPUThreadMethodR.java CPUThreadTraceR.java CPUTraceR.java ClassR.java DataR.java FieldR.java FrameR.java ImageR.java MethodR.java MonThreadMethodR.java MonThreadTraceR.java MonTraceR.java ThreadGroupR.java ThreadR.java Log Message: changed method names Index: AllocThreadMethodR.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime/AllocThreadMethodR.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** AllocThreadMethodR.java 23 Apr 2002 14:33:34 -0000 1.3 --- AllocThreadMethodR.java 15 May 2002 08:26:36 -0000 1.4 *************** *** 37,43 **** import java.util.*; import net.sourceforge.javaprofiler.api.*; - import net.sourceforge.javaprofiler.api.Class; - import net.sourceforge.javaprofiler.api.Thread; - import net.sourceforge.javaprofiler.api.ThreadGroup; import net.sourceforge.javaprofiler.jpiimpl.commun.IProf; import net.sourceforge.javaprofiler.jpiimpl.commun.IProfException; --- 37,40 ---- *************** *** 46,51 **** * @author Lukas Petru */ ! public class AllocThreadMethodR extends MultiRootDataR implements ! AllocThreadMethod { /** Tells if any data was loaded from profiled VM about this Type. */ private boolean isReady; --- 43,48 ---- * @author Lukas Petru */ ! public class AllocThreadMethodR extends MultiRootDataR implements ! AllocThreadMethodRef { /** Tells if any data was loaded from profiled VM about this Type. */ private boolean isReady; *************** *** 86,95 **** * Should be null if N/A. * @param sid Object with data from communication layer. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ ! AllocThreadMethodR(Integer typeId, Integer threadId, Integer locationId, IProf.sID sid, ImageR RtImage) { ! image=RtImage; objId=new Integer(sid.objId); construct(typeId, threadId, locationId, sid); --- 83,92 ---- * Should be null if N/A. * @param sid Object with data from communication layer. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ ! AllocThreadMethodR(Integer typeId, Integer threadId, Integer locationId, IProf.sID sid, ImageR RtImage) { ! image=RtImage; objId=new Integer(sid.objId); construct(typeId, threadId, locationId, sid); *************** *** 98,106 **** /** Constructs object with only <code>ID</code>. * @param oId Object identification. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ AllocThreadMethodR(Integer oId, ImageR RtImage) { ! image=RtImage; objId=oId; } --- 95,103 ---- /** Constructs object with only <code>ID</code>. * @param oId Object identification. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ AllocThreadMethodR(Integer oId, ImageR RtImage) { ! image=RtImage; objId=oId; } *************** *** 128,141 **** refreshAllocTypeThreadMethods(); return roAllocTypeThreadMethods; ! } // ---------- return parents ! public Thread getParentThread() { needConstructed(); return thread; } ! ! public Method getParentMethod() { needConstructed(); return location; --- 125,138 ---- refreshAllocTypeThreadMethods(); return roAllocTypeThreadMethods; ! } // ---------- return parents ! public ThreadRef getThread() { needConstructed(); return thread; } ! ! public MethodRef getMethod() { needConstructed(); return location; *************** *** 143,164 **** // ---------- return roots of this object ! ! /** Returns AllocType root of multi-rooted object. Returns <code>null ! * </code> if this root is N / A. */ ! public AllocTypeR getAllocType() { return null; } ! /** Returns Thread root of multi-rooted object. Returns <code>null * </code> if this root is N / A. */ ! public ThreadR getThread() { needConstructed(); return thread; } ! /** Returns Location root of multi-rooted object. Returns <code>null ! * </code> if this root is N / A. */ public Location getLocation() { --- 140,161 ---- // ---------- return roots of this object ! ! /** Returns TypeRef root of multi-rooted object. Returns <code>null ! * </code> if this root is N / A. */ ! public AllocTypeR getTypeR() { return null; } ! /** Returns ThreadRef root of multi-rooted object. Returns <code>null * </code> if this root is N / A. */ ! public ThreadR getThreadR() { needConstructed(); return thread; } ! /** Returns Location root of multi-rooted object. Returns <code>null ! * </code> if this root is N / A. */ public Location getLocation() { *************** *** 169,194 **** // ---------- profiler statistic ! public long getNumOfLiveInstances() { conditionalRefresh(); return numLiveInstances; } ! public long getTotalNumOfInstances() { conditionalRefresh(); return numTotalInstances; } ! public long getSizeOfLiveInstances() { conditionalRefresh(); return sizeLiveInstances; } ! public long getTotalSizeOfInstances() { conditionalRefresh(); return sizeTotalInstances; ! } // ---------- refresh ! /** Refreshes statistics. */ --- 166,191 ---- // ---------- profiler statistic ! public long getLiveInstancesCount() { conditionalRefresh(); return numLiveInstances; } ! public long getTotalInstancesCount() { conditionalRefresh(); return numTotalInstances; } ! public long getLiveInstancesSize() { conditionalRefresh(); return sizeLiveInstances; } ! public long getTotalInstancesSize() { conditionalRefresh(); return sizeTotalInstances; ! } // ---------- refresh ! /** Refreshes statistics. */ *************** *** 196,214 **** IProf.sData data; try { ! data = image.getIProf().getData(objId.intValue(), IProf.ALLOC_DATA); } catch (IProfException e) { throw new RuntimeException(e); ! } ! setData((IProf.sAllocStatData) data.statData); } // ---------- private / package ! ! void addAllocTypeThreadMethod(AllocTypeThreadMethod o) { allocTypeThreadMethods.add(o); } ! void addAllocThreadTrace(AllocThreadTrace o) { allocThreadTraces.add(o); } --- 193,211 ---- IProf.sData data; try { ! data = image.getIProf().getData(objId.intValue(), IProf.ALLOC_DATA); } catch (IProfException e) { throw new RuntimeException(e); ! } ! setData((IProf.sAllocStatData) data.statData); } // ---------- private / package ! ! void addAllocTypeThreadMethod(AllocTypeThreadMethodRef o) { allocTypeThreadMethods.add(o); } ! void addAllocThreadTrace(AllocThreadTraceRef o) { allocThreadTraces.add(o); } *************** *** 278,282 **** } ! /** Fills object with data gained from profiled VM. * @param sid Object info and data. */ --- 275,279 ---- } ! /** Fills object with data gained from profiled VM. * @param sid Object info and data. */ *************** *** 291,295 **** public String toString() { ! return getThread() + "-" + getLocation(); } } --- 288,292 ---- public String toString() { ! return getThreadR() + "-" + getLocation(); } } Index: AllocThreadTraceR.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime/AllocThreadTraceR.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** AllocThreadTraceR.java 23 Apr 2002 14:33:34 -0000 1.2 --- AllocThreadTraceR.java 15 May 2002 08:26:36 -0000 1.3 *************** *** 37,43 **** import java.util.*; import net.sourceforge.javaprofiler.api.*; - import net.sourceforge.javaprofiler.api.Class; - import net.sourceforge.javaprofiler.api.Thread; - import net.sourceforge.javaprofiler.api.ThreadGroup; import net.sourceforge.javaprofiler.jpiimpl.commun.IProf; import net.sourceforge.javaprofiler.jpiimpl.commun.IProfException; --- 37,40 ---- *************** *** 46,51 **** * @author Lukas Petru */ ! public class AllocThreadTraceR extends MultiRootDataR implements ! AllocThreadTrace { /** Tells if any data was loaded from profiled VM about this Type. */ private boolean isReady; --- 43,48 ---- * @author Lukas Petru */ ! public class AllocThreadTraceR extends MultiRootDataR implements ! AllocThreadTraceRef { /** Tells if any data was loaded from profiled VM about this Type. */ private boolean isReady; *************** *** 84,93 **** * Should be null if N/A. * @param sid Object with data from communication layer. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ ! AllocThreadTraceR(Integer typeId, Integer threadId, Integer locationId, IProf.sID sid, ImageR RtImage) { ! image=RtImage; objId=new Integer(sid.objId); construct(typeId, threadId, locationId, sid); --- 81,90 ---- * Should be null if N/A. * @param sid Object with data from communication layer. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ ! AllocThreadTraceR(Integer typeId, Integer threadId, Integer locationId, IProf.sID sid, ImageR RtImage) { ! image=RtImage; objId=new Integer(sid.objId); construct(typeId, threadId, locationId, sid); *************** *** 96,104 **** /** Constructs object with only <code>ID</code>. * @param oId Object identification. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ AllocThreadTraceR(Integer oId, ImageR RtImage) { ! image=RtImage; objId=oId; } --- 93,101 ---- /** Constructs object with only <code>ID</code>. * @param oId Object identification. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ AllocThreadTraceR(Integer oId, ImageR RtImage) { ! image=RtImage; objId=oId; } *************** *** 116,133 **** return roAllocTypeThreadTraces; } ! // ---------- return parents ! public AllocThreadMethod getParentAllocThreadMethod() { needConstructed(); return method; } ! ! public Thread getParentThread() { needConstructed(); return thread; } ! ! public AllocTrace getParentAllocTrace() { needConstructed(); return location; --- 113,130 ---- return roAllocTypeThreadTraces; } ! // ---------- return parents ! public AllocThreadMethodRef getAllocThreadMethod() { needConstructed(); return method; } ! ! public ThreadRef getThread() { needConstructed(); return thread; } ! ! public AllocTraceRef getAllocTrace() { needConstructed(); return location; *************** *** 135,156 **** // ---------- return roots of this object ! ! /** Returns AllocType root of multi-rooted object. Returns <code>null ! * </code> if this root is N / A. */ ! public AllocTypeR getAllocType() { return null; } ! /** Returns Thread root of multi-rooted object. Returns <code>null * </code> if this root is N / A. */ ! public ThreadR getThread() { needConstructed(); return thread; } ! /** Returns Location root of multi-rooted object. Returns <code>null ! * </code> if this root is N / A. */ public Location getLocation() { --- 132,153 ---- // ---------- return roots of this object ! ! /** Returns TypeRef root of multi-rooted object. Returns <code>null ! * </code> if this root is N / A. */ ! public AllocTypeR getTypeR() { return null; } ! /** Returns ThreadRef root of multi-rooted object. Returns <code>null * </code> if this root is N / A. */ ! public ThreadR getThreadR() { needConstructed(); return thread; } ! /** Returns Location root of multi-rooted object. Returns <code>null ! * </code> if this root is N / A. */ public Location getLocation() { *************** *** 161,186 **** // ---------- profiler statistic ! public long getNumOfLiveInstances() { conditionalRefresh(); return numLiveInstances; } ! public long getTotalNumOfInstances() { conditionalRefresh(); return numTotalInstances; } ! public long getSizeOfLiveInstances() { conditionalRefresh(); return sizeLiveInstances; } ! public long getTotalSizeOfInstances() { conditionalRefresh(); return sizeTotalInstances; ! } // ---------- refresh ! /** Refreshes statistics. */ --- 158,183 ---- // ---------- profiler statistic ! public long getLiveInstancesCount() { conditionalRefresh(); return numLiveInstances; } ! public long getTotalInstancesCount() { conditionalRefresh(); return numTotalInstances; } ! public long getLiveInstancesSize() { conditionalRefresh(); return sizeLiveInstances; } ! public long getTotalInstancesSize() { conditionalRefresh(); return sizeTotalInstances; ! } // ---------- refresh ! /** Refreshes statistics. */ *************** *** 188,202 **** IProf.sData data; try { ! data = image.getIProf().getData(objId.intValue(), IProf.ALLOC_DATA); } catch (IProfException e) { throw new RuntimeException(e); ! } ! setData((IProf.sAllocStatData) data.statData); } // ---------- private / package ! ! void addAllocTypeThreadTrace(AllocTypeThreadTrace o) { allocTypeThreadTraces.add(o); } --- 185,199 ---- IProf.sData data; try { ! data = image.getIProf().getData(objId.intValue(), IProf.ALLOC_DATA); } catch (IProfException e) { throw new RuntimeException(e); ! } ! setData((IProf.sAllocStatData) data.statData); } // ---------- private / package ! ! void addAllocTypeThreadTrace(AllocTypeThreadTraceRef o) { allocTypeThreadTraces.add(o); } *************** *** 216,220 **** method=new AllocThreadMethodR(methodId, image); image.putObject(methodId, method); ! } isReady=true; // add to parents' lists --- 213,217 ---- method=new AllocThreadMethodR(methodId, image); image.putObject(methodId, method); ! } isReady=true; // add to parents' lists *************** *** 247,256 **** method=new AllocThreadMethodR(methodId, image); image.putObject(methodId, method); ! } // link to roots location=image.resolveAllocTrace(new Integer(parents. parentLeftObjId)); ! thread=method.getThread(); ! isReady=true; // add to parents' and root lists --- 244,253 ---- method=new AllocThreadMethodR(methodId, image); image.putObject(methodId, method); ! } // link to roots location=image.resolveAllocTrace(new Integer(parents. parentLeftObjId)); ! thread=method.getThreadR(); ! isReady=true; // add to parents' and root lists *************** *** 278,282 **** } ! /** Fills object with data gained from profiled VM. * @param sid Object info and data. */ --- 275,279 ---- } ! /** Fills object with data gained from profiled VM. * @param sid Object info and data. */ *************** *** 291,295 **** public String toString() { ! return getThread() + "-" + getLocation(); } } --- 288,292 ---- public String toString() { ! return getThreadR() + "-" + getLocation(); } } Index: AllocTraceR.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime/AllocTraceR.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** AllocTraceR.java 14 May 2002 14:47:37 -0000 1.3 --- AllocTraceR.java 15 May 2002 08:26:36 -0000 1.4 *************** *** 37,42 **** import java.util.*; import net.sourceforge.javaprofiler.api.*; - import net.sourceforge.javaprofiler.api.Class; - import net.sourceforge.javaprofiler.api.ThreadGroup; import net.sourceforge.javaprofiler.jpiimpl.commun.IProf; import net.sourceforge.javaprofiler.jpiimpl.commun.IProfException; --- 37,40 ---- *************** *** 45,49 **** * @author Lukas Petru */ ! public class AllocTraceR extends Location implements AllocTrace { /** Tells if any data was loaded from profiled VM about this Type. */ private boolean isReady; --- 43,47 ---- * @author Lukas Petru */ ! public class AllocTraceR extends Location implements AllocTraceRef { /** Tells if any data was loaded from profiled VM about this Type. */ private boolean isReady; *************** *** 59,63 **** private final List frames=new ArrayList(0); private final List roFrames=Collections.unmodifiableList(frames); ! // parents private MethodR method; --- 57,61 ---- private final List frames=new ArrayList(0); private final List roFrames=Collections.unmodifiableList(frames); ! // parents private MethodR method; *************** *** 81,89 **** /** Constructs new object with info. * @param sid Object with data from communication layer. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ AllocTraceR(IProf.sID sid, ImageR RtImage) { ! image = RtImage; objId = new Integer(sid.objId); construct((IProf.sTraceInfo) sid.info); --- 79,87 ---- /** Constructs new object with info. * @param sid Object with data from communication layer. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ AllocTraceR(IProf.sID sid, ImageR RtImage) { ! image = RtImage; objId = new Integer(sid.objId); construct((IProf.sTraceInfo) sid.info); *************** *** 92,96 **** /** Creates object with only Id and no info / data. * @param oId Identification of object as assigned by communication layer. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ --- 90,94 ---- /** Creates object with only Id and no info / data. * @param oId Identification of object as assigned by communication layer. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ *************** *** 105,111 **** needConstructed(); return roFrames; ! } ! public Method getParentMethod() { needConstructed(); return method; --- 103,109 ---- needConstructed(); return roFrames; ! } ! public MethodRef getMethod() { needConstructed(); return method; *************** *** 117,121 **** image.extractMultiRoot(this, IProf.ALLOC_METHOD_TRACE_THREADS, image.allocThreadTraceFactory); ! } public List getAllocThreadTraces() { --- 115,119 ---- image.extractMultiRoot(this, IProf.ALLOC_METHOD_TRACE_THREADS, image.allocThreadTraceFactory); ! } public List getAllocThreadTraces() { *************** *** 128,132 **** image.extractMultiRoot(this, IProf.ALLOC_TRACE_OBJECTS, image.allocTypeTraceFactory); ! } public List getAllocTypeTraces() { --- 126,130 ---- image.extractMultiRoot(this, IProf.ALLOC_TRACE_OBJECTS, image.allocTypeTraceFactory); ! } public List getAllocTypeTraces() { *************** *** 138,170 **** // image getter method ! public VirtualMachineImage getVirtualMachineImage() { return image; } ! ! public VirtualMachineImage getParentVirtualMachineImage() { ! return image; ! } ! // statistics getter methods ! public long getNumOfLiveInstances() { conditionalRefresh(); return numLiveInstances; } ! public long getTotalNumOfInstances() { conditionalRefresh(); return numTotalInstances; } ! public long getSizeOfLiveInstances() { conditionalRefresh(); return sizeLiveInstances; } ! public long getTotalSizeOfInstances() { conditionalRefresh(); return sizeTotalInstances; ! } // refresh --- 136,164 ---- // image getter method ! public VirtualMachineImageRef getVirtualMachineImage() { return image; } ! // statistics getter methods ! public long getLiveInstancesCount() { conditionalRefresh(); return numLiveInstances; } ! public long getTotalInstancesCount() { conditionalRefresh(); return numTotalInstances; } ! public long getLiveInstancesSize() { conditionalRefresh(); return sizeLiveInstances; } ! public long getTotalInstancesSize() { conditionalRefresh(); return sizeTotalInstances; ! } // refresh *************** *** 176,215 **** IProf.sData data; try { ! data = image.getIProf().getData(objId.intValue(), IProf.ALLOC_DATA); } catch (IProfException e) { throw new RuntimeException(e); ! } ! setData((IProf.sAllocStatData) data.statData); } ! // package / private ! void addAllocTypeTrace(AllocTypeTrace o) { allocTypeTraces.add(o); } ! void addAllocThreadTrace(AllocThreadTrace o) { allocThreadTraces.add(o); } // roots ! ! /** Returns AllocType root of multi-rooted object. Returns <code>null ! * </code> if this root is N / A. */ ! public AllocTypeR getAllocType() { return null; } ! ! /** Returns Thread root of multi-rooted object. Returns <code>null * </code> if this root is N / A. */ ! public ThreadR getThread() { return null; } ! /** Returns Location root of multi-rooted object. Returns <code>null ! * </code> if this root is N / A. */ public Location getLocation() { --- 170,209 ---- IProf.sData data; try { ! data = image.getIProf().getData(objId.intValue(), IProf.ALLOC_DATA); } catch (IProfException e) { throw new RuntimeException(e); ! } ! setData((IProf.sAllocStatData) data.statData); } ! // package / private ! void addAllocTypeTrace(AllocTypeTraceRef o) { allocTypeTraces.add(o); } ! void addAllocThreadTrace(AllocThreadTraceRef o) { allocThreadTraces.add(o); } // roots ! ! /** Returns TypeRef root of multi-rooted object. Returns <code>null ! * </code> if this root is N / A. */ ! public AllocTypeR getTypeR() { return null; } ! ! /** Returns ThreadRef root of multi-rooted object. Returns <code>null * </code> if this root is N / A. */ ! public ThreadR getThreadR() { return null; } ! /** Returns Location root of multi-rooted object. Returns <code>null ! * </code> if this root is N / A. */ public Location getLocation() { *************** *** 229,242 **** /** Finishes object construction. * @param info <code>sTraceInfo</code> object with data from ! * communication layer. */ private void construct (IProf.sTraceInfo info) { ! Frame caller=null; int i; for (i=info.numFrames-1; i>=0; i--) { caller=new FrameR(info.frames[i], caller, image); frames.add(caller); ! } method=(MethodR) ((FrameR) frames.get(frames.size()-1)).getMethod(); isReady = true; --- 223,236 ---- /** Finishes object construction. * @param info <code>sTraceInfo</code> object with data from ! * communication layer. */ private void construct (IProf.sTraceInfo info) { ! FrameRef caller=null; int i; for (i=info.numFrames-1; i>=0; i--) { caller=new FrameR(info.frames[i], caller, image); frames.add(caller); ! } method=(MethodR) ((FrameR) frames.get(frames.size()-1)).getMethod(); isReady = true; *************** *** 255,260 **** } catch (IProfException e) { throw new RuntimeException(e); ! } ! construct(info); } } --- 249,254 ---- } catch (IProfException e) { throw new RuntimeException(e); ! } ! construct(info); } } *************** *** 277,281 **** } ! /** Fills object with data gained from profiled VM. * @param sid Object info and data. */ --- 271,275 ---- } ! /** Fills object with data gained from profiled VM. * @param sid Object info and data. */ *************** *** 283,287 **** setData(sid.alloc); } ! /** Returns number that identifies object for profiler library. */ Integer getId() { --- 277,281 ---- setData(sid.alloc); } ! /** Returns number that identifies object for profiler library. */ Integer getId() { *************** *** 290,294 **** public String toString() { ! return "trace of " + getParentMethod(); } } --- 284,288 ---- public String toString() { ! return "trace of " + getMethod(); } } Index: AllocTypeMethodR.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime/AllocTypeMethodR.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** AllocTypeMethodR.java 23 Apr 2002 14:33:34 -0000 1.3 --- AllocTypeMethodR.java 15 May 2002 08:26:36 -0000 1.4 *************** *** 37,41 **** import java.util.*; import net.sourceforge.javaprofiler.api.*; - import net.sourceforge.javaprofiler.api.Class; import net.sourceforge.javaprofiler.jpiimpl.commun.IProf; import net.sourceforge.javaprofiler.jpiimpl.commun.IProfException; --- 37,40 ---- *************** *** 44,48 **** * @author Lukas Petru */ ! public class AllocTypeMethodR extends MultiRootDataR implements AllocTypeMethod { /** Tells if any data was loaded from profiled VM about this Type. */ --- 43,47 ---- * @author Lukas Petru */ ! public class AllocTypeMethodR extends MultiRootDataR implements AllocTypeMethodRef { /** Tells if any data was loaded from profiled VM about this Type. */ *************** *** 82,91 **** * Should be null if N/A. * @param sid Object with data from communication layer. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ ! AllocTypeMethodR(Integer typeId, Integer threadId, Integer locationId, IProf.sID sid, ImageR RtImage) { ! image=RtImage; objId=new Integer(sid.objId); construct(typeId, threadId, locationId, sid); --- 81,90 ---- * Should be null if N/A. * @param sid Object with data from communication layer. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ ! AllocTypeMethodR(Integer typeId, Integer threadId, Integer locationId, IProf.sID sid, ImageR RtImage) { ! image=RtImage; objId=new Integer(sid.objId); construct(typeId, threadId, locationId, sid); *************** *** 94,102 **** /** Constructs object with only <code>ID</code>. * @param oId Object identification. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ AllocTypeMethodR(Integer oId, ImageR RtImage) { ! image=RtImage; objId=oId; } --- 93,101 ---- /** Constructs object with only <code>ID</code>. * @param oId Object identification. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ AllocTypeMethodR(Integer oId, ImageR RtImage) { ! image=RtImage; objId=oId; } *************** *** 104,118 **** // ---------- return parents ! public AllocType getParentAllocType() { needConstructed(); return type; } ! ! public Method getParentMethod() { ! needConstructed(); ! return location; ! } ! ! public Method getMethod() { needConstructed(); return location; --- 103,112 ---- // ---------- return parents ! public TypeRef getType() { needConstructed(); return type; } ! ! public MethodRef getMethod() { needConstructed(); return location; *************** *** 120,141 **** // ---------- return roots of this object ! ! /** Returns AllocType root of multi-rooted object. Returns <code>null ! * </code> if this root is N / A. */ ! public AllocTypeR getAllocType() { needConstructed(); return type; } ! /** Returns Thread root of multi-rooted object. Returns <code>null * </code> if this root is N / A. */ ! public ThreadR getThread() { return null; } ! /** Returns Location root of multi-rooted object. Returns <code>null ! * </code> if this root is N / A. */ public Location getLocation() { --- 114,135 ---- // ---------- return roots of this object ! ! /** Returns TypeRef root of multi-rooted object. Returns <code>null ! * </code> if this root is N / A. */ ! public AllocTypeR getTypeR() { needConstructed(); return type; } ! /** Returns ThreadRef root of multi-rooted object. Returns <code>null * </code> if this root is N / A. */ ! public ThreadR getThreadR() { return null; } ! /** Returns Location root of multi-rooted object. Returns <code>null ! * </code> if this root is N / A. */ public Location getLocation() { *************** *** 149,153 **** image.extractMultiRoot(this, IProf.ALLOC_OBJECT_METHOD_TRACES, image.allocTypeTraceFactory); ! } public List getAllocTypeTraces() { --- 143,147 ---- image.extractMultiRoot(this, IProf.ALLOC_OBJECT_METHOD_TRACES, image.allocTypeTraceFactory); ! } public List getAllocTypeTraces() { *************** *** 160,164 **** image.extractMultiRoot(this, IProf.ALLOC_OBJECT_METHOD_THREADS, image.allocTypeThreadMethodFactory); ! } public List getAllocTypeThreadMethods() { --- 154,158 ---- image.extractMultiRoot(this, IProf.ALLOC_OBJECT_METHOD_THREADS, image.allocTypeThreadMethodFactory); ! } public List getAllocTypeThreadMethods() { *************** *** 170,192 **** // ---------- profiler statistic ! public long getNumOfLiveInstances() { conditionalRefresh(); return numLiveInstances; } ! public long getTotalNumOfInstances() { conditionalRefresh(); return numTotalInstances; } ! public long getSizeOfLiveInstances() { conditionalRefresh(); return sizeLiveInstances; } ! public long getTotalSizeOfInstances() { conditionalRefresh(); return sizeTotalInstances; ! } // ---------- refresh --- 164,186 ---- // ---------- profiler statistic ! public long getLiveInstancesCount() { conditionalRefresh(); return numLiveInstances; } ! public long getTotalInstancesCount() { conditionalRefresh(); return numTotalInstances; } ! public long getLiveInstancesSize() { conditionalRefresh(); return sizeLiveInstances; } ! public long getTotalInstancesSize() { conditionalRefresh(); return sizeTotalInstances; ! } // ---------- refresh *************** *** 197,215 **** IProf.sData data; try { ! data = image.getIProf().getData(objId.intValue(), IProf.ALLOC_DATA); } catch (IProfException e) { throw new RuntimeException(e); ! } ! setData((IProf.sAllocStatData) data.statData); } // ---------- private / package ! void addAllocTypeTrace(AllocTypeTrace o) { allocTypeTraces.add(o); } ! void addAllocTypeThreadMethod(AllocTypeThreadMethod o) { allocTypeThreadMethods.add(o); } --- 191,209 ---- IProf.sData data; try { ! data = image.getIProf().getData(objId.intValue(), IProf.ALLOC_DATA); } catch (IProfException e) { throw new RuntimeException(e); ! } ! setData((IProf.sAllocStatData) data.statData); } // ---------- private / package ! void addAllocTypeTrace(AllocTypeTraceRef o) { allocTypeTraces.add(o); } ! void addAllocTypeThreadMethod(AllocTypeThreadMethodRef o) { allocTypeThreadMethods.add(o); } *************** *** 243,247 **** } catch (IProfException e) { throw new RuntimeException(e); ! } // resolve roots type=image.resolveAllocType(new Integer(parents.parentUpObjId)); --- 237,241 ---- } catch (IProfException e) { throw new RuntimeException(e); ! } // resolve roots type=image.resolveAllocType(new Integer(parents.parentUpObjId)); *************** *** 271,275 **** } ! /** Fills object with data gained from profiled VM. * @param sid Object info and data. */ --- 265,269 ---- } ! /** Fills object with data gained from profiled VM. * @param sid Object info and data. */ *************** *** 282,288 **** return objId; } ! public String toString() { ! return getAllocType() + "-" + getLocation(); } } --- 276,282 ---- return objId; } ! public String toString() { ! return getTypeR() + "-" + getLocation(); } } Index: AllocTypeR.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime/AllocTypeR.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** AllocTypeR.java 10 Apr 2002 16:01:15 -0000 1.1 --- AllocTypeR.java 15 May 2002 08:26:36 -0000 1.2 *************** *** 37,42 **** import java.util.*; import net.sourceforge.javaprofiler.api.*; - import net.sourceforge.javaprofiler.api.Class; - import net.sourceforge.javaprofiler.api.ThreadGroup; import net.sourceforge.javaprofiler.jpiimpl.commun.IProf; import net.sourceforge.javaprofiler.jpiimpl.commun.IProfException; --- 37,40 ---- *************** *** 45,49 **** * @author Lukas Petru */ ! public class AllocTypeR extends DataR implements AllocType { /** Tells if any data was loaded from profiled VM about this Type. */ private boolean isReady; --- 43,47 ---- * @author Lukas Petru */ ! public class AllocTypeR extends DataR implements TypeRef { /** Tells if any data was loaded from profiled VM about this Type. */ private boolean isReady; *************** *** 79,90 **** allocTypeThreads); ! /** This constructor will find it's component class on its own through * RtImage. * @param sid Object with data from communication layer. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ AllocTypeR(IProf.sID sid, ImageR RtImage) { ! image = RtImage; objId = new Integer(sid.objId); construct((IProf.sObjectInfo) sid.info); --- 77,88 ---- allocTypeThreads); ! /** This constructor will find it's component class on its own through * RtImage. * @param sid Object with data from communication layer. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ AllocTypeR(IProf.sID sid, ImageR RtImage) { ! image = RtImage; objId = new Integer(sid.objId); construct((IProf.sObjectInfo) sid.info); *************** *** 93,97 **** /** Creates object with only Id and no data. * @param oId Identification of object as assigned by communication layer. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ --- 91,95 ---- /** Creates object with only Id and no data. * @param oId Identification of object as assigned by communication layer. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ *************** *** 108,118 **** return name; } ! /** Returns component class of this type. */ ! public Class getComponentClass() { needConstructed(); return componentClass; } ! /** Returns true, if this type is an array. */ public boolean isArray() { --- 106,116 ---- return name; } ! /** Returns component class of this type. */ ! public ClassRef getComponentClass() { needConstructed(); return componentClass; } ! /** Returns true, if this type is an array. */ public boolean isArray() { *************** *** 120,124 **** return isArray; } ! /** Returns true, if this type is an array of primitive component type. */ public boolean isArrayOfPrimitives() { --- 118,122 ---- return isArray; } ! /** Returns true, if this type is an array of primitive component type. */ public boolean isArrayOfPrimitives() { *************** *** 137,141 **** o.refreshAllocTypeTraces(); } ! } public List getAllocTypeTraces() { --- 135,139 ---- o.refreshAllocTypeTraces(); } ! } public List getAllocTypeTraces() { *************** *** 148,152 **** image.extractMultiRoot(this, IProf.ALLOC_OBJECT_METHODS, image.allocTypeMethodFactory); ! } public List getAllocTypeMethods() { --- 146,150 ---- image.extractMultiRoot(this, IProf.ALLOC_OBJECT_METHODS, image.allocTypeMethodFactory); ! } public List getAllocTypeMethods() { *************** *** 159,163 **** image.extractMultiRoot(this, IProf.ALLOC_OBJECT_THREADS, image.allocTypeThreadFactory); ! } public List getAllocTypeThreads() { --- 157,161 ---- image.extractMultiRoot(this, IProf.ALLOC_OBJECT_THREADS, image.allocTypeThreadFactory); ! } public List getAllocTypeThreads() { *************** *** 169,201 **** // image getter method ! public VirtualMachineImage getVirtualMachineImage () { ! return image; ! } ! ! public VirtualMachineImage getParentVirtualMachineImage () { return image; } ! // statistics getter methods ! public long getNumOfLiveInstances() { conditionalRefresh(); return numLiveInstances; } ! public long getTotalNumOfInstances() { conditionalRefresh(); return numTotalInstances; } ! public long getSizeOfLiveInstances() { conditionalRefresh(); return sizeLiveInstances; } ! public long getTotalSizeOfInstances() { conditionalRefresh(); return sizeTotalInstances; ! } // refresh --- 167,195 ---- // image getter method ! public VirtualMachineImageRef getVirtualMachineImage () { return image; } ! // statistics getter methods ! public long getLiveInstancesCount() { conditionalRefresh(); return numLiveInstances; } ! public long getTotalInstancesCount() { conditionalRefresh(); return numTotalInstances; } ! public long getLiveInstancesSize() { conditionalRefresh(); return sizeLiveInstances; } ! public long getTotalInstancesSize() { conditionalRefresh(); return sizeTotalInstances; ! } // refresh *************** *** 207,228 **** IProf.sData data; try { ! data = image.getIProf().getData(objId.intValue(), IProf.ALLOC_DATA); } catch (IProfException e) { throw new RuntimeException(e); ! } ! setData((IProf.sAllocStatData) data.statData); } // roots ! public AllocTypeR getAllocType() { return this; } ! ! public ThreadR getThread() { return null; } ! public Location getLocation() { return null; --- 201,222 ---- IProf.sData data; try { ! data = image.getIProf().getData(objId.intValue(), IProf.ALLOC_DATA); } catch (IProfException e) { throw new RuntimeException(e); ! } ! setData((IProf.sAllocStatData) data.statData); } // roots ! public AllocTypeR getTypeR() { return this; } ! ! public ThreadR getThreadR() { return null; } ! public Location getLocation() { return null; *************** *** 231,243 **** // private / package ! void addAllocTypeMethod(AllocTypeMethod o) { allocTypeMethods.add(o); } ! void addAllocTypeTrace(AllocTypeTrace o) { allocTypeTraces.add(o); } ! void addAllocTypeThread(AllocTypeThread o) { allocTypeThreads.add(o); } --- 225,237 ---- // private / package ! void addAllocTypeMethod(AllocTypeMethodRef o) { allocTypeMethods.add(o); } ! void addAllocTypeTrace(AllocTypeTraceRef o) { allocTypeTraces.add(o); } ! void addAllocTypeThread(AllocTypeThreadRef o) { allocTypeThreads.add(o); } *************** *** 295,306 **** break; default: ! name = ""; } isReady = true; } ! /** Finishes Type object construction. This method will find component * class of object on its own through image. ! * @param info <code>sObjectInfo</code> object with data from * communication layer. */ --- 289,300 ---- break; default: ! name = ""; } isReady = true; } ! /** Finishes Type object construction. This method will find component * class of object on its own through image. ! * @param info <code>sObjectInfo</code> object with data from * communication layer. */ *************** *** 328,333 **** } catch (IProfException e) { throw new RuntimeException(e); ! } ! construct(info); } } --- 322,327 ---- } catch (IProfException e) { throw new RuntimeException(e); ! } ! construct(info); } } *************** *** 350,354 **** } ! /** Fills object with data gained from profiled VM. * @param sid Object info and data. */ --- 344,348 ---- } ! /** Fills object with data gained from profiled VM. * @param sid Object info and data. */ *************** *** 361,365 **** return objId; } ! public String toString () { return getName(); --- 355,359 ---- return objId; } ! public String toString () { return getName(); Index: AllocTypeThreadMethodR.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime/AllocTypeThreadMethodR.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** AllocTypeThreadMethodR.java 23 Apr 2002 14:33:34 -0000 1.3 --- AllocTypeThreadMethodR.java 15 May 2002 08:26:36 -0000 1.4 *************** *** 37,43 **** import java.util.*; import net.sourceforge.javaprofiler.api.*; - import net.sourceforge.javaprofiler.api.Class; - import net.sourceforge.javaprofiler.api.Thread; - import net.sourceforge.javaprofiler.api.ThreadGroup; import net.sourceforge.javaprofiler.jpiimpl.commun.IProf; import net.sourceforge.javaprofiler.jpiimpl.commun.IProfException; --- 37,40 ---- *************** *** 46,51 **** * @author Lukas Petru */ ! public class AllocTypeThreadMethodR extends MultiRootDataR implements ! AllocTypeThreadMethod { /** Tells if any data was loaded from profiled VM about this Type. */ private boolean isReady; --- 43,48 ---- * @author Lukas Petru */ ! public class AllocTypeThreadMethodR extends MultiRootDataR implements ! AllocTypeThreadMethodRef { /** Tells if any data was loaded from profiled VM about this Type. */ private boolean isReady; *************** *** 87,96 **** * Should be null if N/A. * @param sid Object with data from communication layer. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ ! AllocTypeThreadMethodR(Integer typeId, Integer threadId, Integer locationId, IProf.sID sid, ImageR RtImage) { ! image=RtImage; objId=new Integer(sid.objId); construct(typeId, threadId, locationId, sid); --- 84,93 ---- * Should be null if N/A. * @param sid Object with data from communication layer. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ ! AllocTypeThreadMethodR(Integer typeId, Integer threadId, Integer locationId, IProf.sID sid, ImageR RtImage) { ! image=RtImage; objId=new Integer(sid.objId); construct(typeId, threadId, locationId, sid); *************** *** 99,107 **** /** Constructs object with only <code>ID</code>. * @param oId Object identification. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ AllocTypeThreadMethodR(Integer oId, ImageR RtImage) { ! image=RtImage; objId=oId; } --- 96,104 ---- /** Constructs object with only <code>ID</code>. * @param oId Object identification. ! * @param RtImage <code>VirtualMachineImage</code> object to which this * object shall belong */ AllocTypeThreadMethodR(Integer oId, ImageR RtImage) { ! image=RtImage; objId=oId; } *************** *** 119,136 **** return roAllocTypeThreadTraces; } ! // ---------- return parents ! public AllocTypeMethod getParentAllocTypeMethod() { needConstructed(); return typeMethod; } ! public AllocThreadMethod getParentAllocThreadMethod() { needConstructed(); return threadMethod; } ! ! public AllocTypeThread getParentAllocTypeThread() { needConstructed(); return typeThread; --- 116,133 ---- return roAllocTypeThreadTraces; } ! // ---------- return parents ! public AllocTypeMethodRef getAllocTypeMethod() { needConstructed(); return typeMethod; } ! public AllocThreadMethodRef getAllocThreadMethod() { needConstructed(); return threadMethod; } ! ! public AllocTypeThreadRef getAllocTypeThread() { needConstructed(); return typeThread; *************** *** 138,160 **** // ---------- return roots of this object ! ! /** Returns AllocType root of multi-rooted object. Returns <code>null ! * </code> if this root is N / A. */ ! public AllocTypeR getAllocType() { needConstructed(); return type; } ! /** Returns Thread root of multi-rooted object. Returns <code>null * </code> if this root is N / A. */ ! public ThreadR getThread() { needConstructed(); return thread; } ! /** Returns Location root of multi-rooted object. Returns <code>null ! * </code> if this root is N / A. */ public Location getLocation() { --- 135,157 ---- // ---------- return roots of this object ! ! /** Returns TypeRef root of multi-rooted object. Returns <code>null ! * </code> if this root is N / A. */ ! public AllocTypeR getTypeR() { needConstructed(); return type; } ! /** Returns ThreadRef root of multi-rooted object. Returns <code>null * </code> if this root is N / A. */ ! public ThreadR getThreadR() { needConstructed(); return thread; } ! /** Returns Location root of multi-rooted object. Returns <code>null ! * </code> if this root is N / A. */ public Location getLocation() { *************** *** 165,190 **** // ---------- profiler statistic ! public long getNumOfLiveInstances() { conditionalRefresh(); return numLiveInstances; } ! public long getTotalNumOfInstances() { conditionalRefresh(); return numTotalInstances; } ! public long getSizeOfLiveInstances() { conditionalRefresh(); return sizeLiveInstances; } ! public long getTotalSizeOfInstances() { conditionalRefresh(); return sizeTotalInstances; ! } // ---------- refresh ! /** Refreshes statistics. */ --- 162,187 ---- // ---------- profiler statistic ! public long getLiveInstancesCount() { conditionalRefresh(); return numLiveInstances; } ! public long getTotalInstancesCount() { conditionalRefresh(); return numTotalInstances; } ! public long getLiveInstancesSize() { conditionalRefresh(); return sizeLiveInstances; } ! public long getTotalInstancesSize() { conditionalRefresh(); return sizeTotalInstances; ! } // ---------- refresh ! /** Refreshes statistics. */ *************** *** 192,206 **** IProf.sData data; try { ! data = image.getIProf().getData(objId.intValue(), IProf.ALLOC_DATA); } catch (IProfException e) { throw new RuntimeException(e); ! } ! setData((IProf.sAllocStatData) data.statData); } // ---------- private / package ! ! void addAllocTypeThreadTrace(AllocTypeThreadTrace o) { allocTypeThreadTraces.add(o); } --- 189,203 ---- IProf.sData data; try { ! data = image.getIProf().getData(objId.intValue(), IProf.ALLOC_DATA); } catch (IProfException e) { throw new RuntimeException(e); ! } ! setData((IProf.sAllocStatData) data.statData); } // ---------- private / package ! ! void addAllocTypeThreadTrace(AllocTypeThreadTraceRef o) { allocTypeThreadTraces.add(o); } *************** *** 221,225 **** typeMethod=new AllocTypeMethodR(typeMethodId, image); image.putObject(typeMethodId, typeMethod); ! } Integer typeThreadId=new Integer(sid.parentUpObjId); if (image.containsId(typeThreadId)) --- 218,222 ---- typeMethod=new AllocTypeMethodR(typeMethodId, image); image.putObject(typeMethodId, typeMethod); ! } Integer typeThreadId=new Integer(sid.parentUpObjId); if (image.containsId(typeThreadId)) *************** *** 228,232 **** typeThread=new AllocTypeThreadR(typeThreadId, image); image.putObject(typeThreadId, typeThread); ! } Integer threadMethodId=new Integer(sid.parentRightObjId); if (image.containsId(threadMethodId)) --- 225,229 ---- typeThread=new AllocTypeThreadR(typeThreadId, image); image.putObject(typeThreadId, typeThread); ! } Integer threadMethodId=new Integer(sid.parentRightObjId); if (image.containsId(threadMethodId)) *************** *** 235,239 **** threadMethod=new AllocThreadMethodR(threadMethodId, image); image.putObject(threadMethodId, threadMethod); ! } isReady=true; // add to parents' lists --- 232,236 ---- threadMethod=new AllocThreadMethodR(threadMethodId, image); image.putObject(threadMethodId, threadMethod); ! } isReady=true; // add to parents' lists *************** *** 267,271 **** typeMethod=new AllocTypeMethodR(typeMethodId, image); image.putObject(typeMethodId, typeMethod); ! } Integer typeThreadId=new Integer(parents.parentUpObjId); if (image.containsId(typeThreadId)) --- 264,268 ---- typeMethod=new AllocTypeMethodR(typeMethodId, image); image.putObject(typeMethodId, typeMethod); ! } Integer typeThreadId=new Integer(parents.parentUpObjId); if (image.containsId(typeThreadId)) *************** *** 274,278 **** typeThread=new AllocTypeThreadR(typeThreadId, image); image.putObject(typeThreadId, typeThread); ! } Integer threadMethodId=new Integer(parents.parentRightObjId); if (image.containsId(threadMethodId)) --- 271,275 ---- typeThread=new AllocTypeThreadR(typeThreadId, image); image.putObject(typeThreadId, typeThread); ! } Integer threadMethodId=new Integer(parents.parentRightObjId); if (image.containsId(threadMethodId)) *************** *** 281,289 **** threadMethod=new AllocThreadMethodR(threadMethodId, image); image.putObject(threadMethodId, threadMethod); ! } // link to roots ! type=typeThread.getAllocType(); ! thread=typeThread.getThread(); location=(MethodR) typeMethod.getLocation(); --- 278,286 ---- threadMethod=new AllocThreadMethodR(threadMethodId, image); image.putObject(threadMethodId, threadMethod); ! } // link to roots ! type=typeThread.getTypeR(); ! thread=typeThread.getThreadR(); location=(MethodR) typeMethod.getLocation(); *************** *** 313,317 **** } ! /** Fills object with data gained from profiled VM. * @param sid Object info and data. */ --- 310,314 ---- } ! /** Fills object with data gained from profiled VM. * @param sid Object info and data. */ *************** *** 326,330 **** public String toString() { ! return getAllocType() + "-" + getThread() + "-" + getLocation(); } } --- 323,327 ---- public String toString() { ! return getTypeR() + "-" + getThreadR() + "-" + getLocation(); } } Index: AllocTypeThreadR.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime/AllocTypeThreadR.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** AllocTypeThreadR.java 23 Apr 2002 14:33:34 -0000 1.4 --- AllocTypeThreadR.java 15 May 2002 08:26:36 -0000 1.5 *************** *** 37,43 **** import java.util.*; import net.sourceforge.javaprofiler.api.*; - import net.sourceforge.javaprofiler.api.Class; - import net.sourceforge.javaprofiler.api.Thread; - import net.sourceforge.javaprofiler.api.ThreadGroup; import net.sourceforge.javaprofiler.jpiimpl.commun.IProf; import net.sourceforge.javaprofiler.jpiimpl.commun.IProfException; --- 37,40 ---- *************** *** 46,50 **** * @author Lukas Petru */ ! public class AllocTypeThreadR extends MultiRootDataR implements AllocTypeThread { /** Tells if any data was loaded from profiled VM about this Type. */ --- 43,47 ---- * @author Lukas Petru */ ! public class AllocTypeThreadR extends MultiRootDataR implements AllocTypeThreadRef { /** Tells if any data was loaded from profiled VM about this Type. */ *************** *** 84,93 **** * Should be null if N/A. * @param sid Object with data from communication layer. !... [truncated message content] |