Update of /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime In directory usw-pr-cvs1:/tmp/cvs-serv17585 Modified Files: AllocThreadMethodR.java AllocThreadTraceR.java AllocTraceR.java AllocTypeMethodR.java AllocTypeThreadMethodR.java AllocTypeThreadR.java AllocTypeThreadTraceR.java AllocTypeTraceR.java ClassR.java CPUThreadMethodR.java CPUThreadTraceR.java CPUTraceR.java DataR.java ImageR.java MethodR.java MonThreadMethodR.java MonThreadTraceR.java MonTraceR.java ThreadGroupR.java ThreadR.java TypeR.java Log Message: implements new interfaces for getting roots and info Index: AllocThreadMethodR.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime/AllocThreadMethodR.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** AllocThreadMethodR.java 22 Jul 2002 21:51:59 -0000 1.11 --- AllocThreadMethodR.java 24 Jul 2002 22:29:03 -0000 1.12 *************** *** 133,138 **** } ! // ---------- return parents ! public ThreadRef getThread() { needConstructed(); --- 133,139 ---- } ! // ---------- return parents, roots ! /** Returns TypeRef root of this object. ! */ public ThreadRef getThread() { needConstructed(); *************** *** 140,148 **** } public MethodRef getMethod() { needConstructed(); return location; } ! // ---------- return roots of this object --- 141,156 ---- } + public MethodRef getMethod() { needConstructed(); return location; } ! ! /** Returns LocationRef root of this object. ! */ ! public LocationRef getLocation() { ! return getMethod(); ! } ! // ---------- return roots of this object *************** *** 165,169 **** * </code> if this root is N / A. */ ! public DataR getLocation() { needConstructed(); return location; --- 173,177 ---- * </code> if this root is N / A. */ ! public DataR getLocationR() { needConstructed(); return location; *************** *** 313,317 **** thread.refreshCPUThreadMethods(); List o=thread.getCPUThreadMethods(); ! return (CPUThreadMethodRef) image.filterByLocation(o, getLocation()); } --- 321,325 ---- thread.refreshCPUThreadMethods(); List o=thread.getCPUThreadMethods(); ! return (CPUThreadMethodRef) image.filterByLocation(o, getLocationR()); } *************** *** 322,326 **** thread.refreshMonThreadMethods(); List o=thread.getMonThreadMethods(); ! return (MonThreadMethodRef) image.filterByLocation(o, getLocation()); } --- 330,334 ---- thread.refreshMonThreadMethods(); List o=thread.getMonThreadMethods(); ! return (MonThreadMethodRef) image.filterByLocation(o, getLocationR()); } Index: AllocThreadTraceR.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime/AllocThreadTraceR.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** AllocThreadTraceR.java 22 Jul 2002 21:51:59 -0000 1.9 --- AllocThreadTraceR.java 24 Jul 2002 22:29:03 -0000 1.10 *************** *** 120,124 **** } ! // ---------- return parents public AllocThreadMethodRef getAllocThreadMethod() { --- 120,124 ---- } ! // ---------- return parents, roots public AllocThreadMethodRef getAllocThreadMethod() { *************** *** 127,130 **** --- 127,132 ---- } + /** Returns ThreadRef root of this object. + */ public ThreadRef getThread() { needConstructed(); *************** *** 136,140 **** return location; } ! // ---------- return roots of this object --- 138,147 ---- return location; } ! ! /** Returns LocationRef root of this object. ! */ ! public LocationRef getLocation() { ! return getAllocTrace(); ! } // ---------- return roots of this object *************** *** 157,161 **** * </code> if this root is N / A. */ ! public DataR getLocation() { needConstructed(); return location; --- 164,168 ---- * </code> if this root is N / A. */ ! public DataR getLocationR() { needConstructed(); return location; Index: AllocTraceR.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime/AllocTraceR.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** AllocTraceR.java 22 Jul 2002 21:51:59 -0000 1.10 --- AllocTraceR.java 24 Jul 2002 22:29:03 -0000 1.11 *************** *** 200,203 **** --- 200,210 ---- allocThreadTraces.size()-1}), listenersMap); } + + //-------------- roots + /** Returns LocationRef root of this object. + */ + public LocationRef getLocation() { + return this; + } // roots *************** *** 220,224 **** * </code> if this root is N / A. */ ! public DataR getLocation() { return this; } --- 227,231 ---- * </code> if this root is N / A. */ ! public DataR getLocationR() { return this; } Index: AllocTypeMethodR.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime/AllocTypeMethodR.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** AllocTypeMethodR.java 22 Jul 2002 21:51:59 -0000 1.10 --- AllocTypeMethodR.java 24 Jul 2002 22:29:03 -0000 1.11 *************** *** 107,112 **** } ! // ---------- return parents public TypeRef getType() { needConstructed(); --- 107,114 ---- } ! // ---------- return parents, roots + /** Returns TypeRef root of this object. + */ public TypeRef getType() { needConstructed(); *************** *** 118,121 **** --- 120,129 ---- return location; } + + /** Returns LocationRef root of this object. + */ + public LocationRef getLocation() { + return getMethod(); + } // ---------- return roots of this object *************** *** 139,143 **** * </code> if this root is N / A. */ ! public DataR getLocation() { needConstructed(); return location; --- 147,151 ---- * </code> if this root is N / A. */ ! public DataR getLocationR() { needConstructed(); return location; Index: AllocTypeThreadMethodR.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime/AllocTypeThreadMethodR.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** AllocTypeThreadMethodR.java 22 Jul 2002 21:51:59 -0000 1.10 --- AllocTypeThreadMethodR.java 24 Jul 2002 22:29:03 -0000 1.11 *************** *** 139,143 **** --- 139,162 ---- return typeThread; } + + // ---------- roots + /** Returns TypeRef root of this object. + */ + public TypeRef getType() { + return getTypeR(); + } + + /** Returns ThreadRef root of this object. + */ + public ThreadRef getThread() { + return getThreadR(); + } + /** Returns LocationRef root of this object. + */ + public LocationRef getLocation() { + needConstructed(); + return location; + } // ---------- return roots of this object *************** *** 161,165 **** * </code> if this root is N / A. */ ! public DataR getLocation() { needConstructed(); return location; --- 180,184 ---- * </code> if this root is N / A. */ ! public DataR getLocationR() { needConstructed(); return location; Index: AllocTypeThreadR.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime/AllocTypeThreadR.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** AllocTypeThreadR.java 22 Jul 2002 21:51:59 -0000 1.11 --- AllocTypeThreadR.java 24 Jul 2002 22:29:03 -0000 1.12 *************** *** 140,144 **** * </code> if this root is N / A. */ ! public DataR getLocation() { needConstructed(); return null; --- 140,144 ---- * </code> if this root is N / A. */ ! public DataR getLocationR() { needConstructed(); return null; Index: AllocTypeThreadTraceR.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime/AllocTypeThreadTraceR.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** AllocTypeThreadTraceR.java 22 Jul 2002 21:51:59 -0000 1.8 --- AllocTypeThreadTraceR.java 24 Jul 2002 22:29:03 -0000 1.9 *************** *** 127,130 **** --- 127,152 ---- } + // ---------- roots + /** Returns TypeRef root of this object. + */ + public TypeRef getType() { + needConstructed(); + return type; + } + + /** Returns ThreadRef root of this object. + */ + public ThreadRef getThread() { + needConstructed(); + return thread; + } + + /** Returns Location root of this object. + */ + public LocationRef getLocation() { + needConstructed(); + return location; + } + // ---------- return roots of this object *************** *** 148,152 **** * </code> if this root is N / A. */ ! public DataR getLocation() { needConstructed(); return location; --- 170,174 ---- * </code> if this root is N / A. */ ! public DataR getLocationR() { needConstructed(); return location; Index: AllocTypeTraceR.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime/AllocTypeTraceR.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** AllocTypeTraceR.java 22 Jul 2002 21:51:59 -0000 1.10 --- AllocTypeTraceR.java 24 Jul 2002 22:29:03 -0000 1.11 *************** *** 119,123 **** } ! // ---------- return parents public AllocTypeMethodRef getAllocTypeMethod() { --- 119,123 ---- } ! // ---------- return parents, roots public AllocTypeMethodRef getAllocTypeMethod() { *************** *** 126,129 **** --- 126,131 ---- } + /** ReturnsTypeRef root of this object. + */ public TypeRef getType() { needConstructed(); *************** *** 136,139 **** --- 138,146 ---- } + /** Returns LocationRef root of this object. + */ + public LocationRef getLocation() { + return getAllocTrace(); + } // ---------- return roots of this object *************** *** 156,160 **** * </code> if this root is N / A. */ ! public DataR getLocation() { needConstructed(); return location; --- 163,167 ---- * </code> if this root is N / A. */ ! public DataR getLocationR() { needConstructed(); return location; Index: ClassR.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime/ClassR.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** ClassR.java 22 Jul 2002 21:51:59 -0000 1.7 --- ClassR.java 24 Jul 2002 22:29:03 -0000 1.8 *************** *** 180,184 **** * </code> if this root is N / A. */ ! public DataR getLocation() { return null; } --- 180,184 ---- * </code> if this root is N / A. */ ! public DataR getLocationR() { return null; } Index: CPUThreadMethodR.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime/CPUThreadMethodR.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** CPUThreadMethodR.java 22 Jul 2002 21:51:59 -0000 1.8 --- CPUThreadMethodR.java 24 Jul 2002 22:29:03 -0000 1.9 *************** *** 117,122 **** } ! // ---------- return parents public ThreadRef getThread() { needConstructed(); --- 117,124 ---- } ! // ---------- return parents, roots + /** Returns ThreadRef root of this object. + */ public ThreadRef getThread() { needConstructed(); *************** *** 129,132 **** --- 131,139 ---- } + /** Returns LocationRef root of this object. + */ + public LocationRef getLocation() { + return getMethod(); + } // ---------- return roots of this object *************** *** 149,153 **** * </code> if this root is N / A. */ ! public DataR getLocation() { needConstructed(); return location; --- 156,160 ---- * </code> if this root is N / A. */ ! public DataR getLocationR() { needConstructed(); return location; *************** *** 277,281 **** thread.refreshAllocThreadMethods(); List o=thread.getAllocThreadMethods(); ! return (AllocThreadMethodRef) image.filterByLocation(o, getLocation()); } --- 284,288 ---- thread.refreshAllocThreadMethods(); List o=thread.getAllocThreadMethods(); ! return (AllocThreadMethodRef) image.filterByLocation(o, getLocationR()); } *************** *** 286,290 **** thread.refreshMonThreadMethods(); List o=thread.getMonThreadMethods(); ! return (MonThreadMethodRef) image.filterByLocation(o, getLocation()); } --- 293,297 ---- thread.refreshMonThreadMethods(); List o=thread.getMonThreadMethods(); ! return (MonThreadMethodRef) image.filterByLocation(o, getLocationR()); } Index: CPUThreadTraceR.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime/CPUThreadTraceR.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** CPUThreadTraceR.java 22 Jul 2002 21:51:59 -0000 1.7 --- CPUThreadTraceR.java 24 Jul 2002 22:29:03 -0000 1.8 *************** *** 106,109 **** --- 106,111 ---- } + /** Returns TypeRef root of this object. + */ public ThreadRef getThread() { needConstructed(); *************** *** 116,119 **** --- 118,126 ---- } + /** Returns LocationRef root of this object. + */ + public LocationRef getLocation() { + return getCPUTrace(); + } // ---------- return roots of this object *************** *** 136,140 **** * </code> if this root is N / A. */ ! public DataR getLocation() { needConstructed(); return location; --- 143,147 ---- * </code> if this root is N / A. */ ! public DataR getLocationR() { needConstructed(); return location; Index: CPUTraceR.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime/CPUTraceR.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** CPUTraceR.java 22 Jul 2002 21:51:59 -0000 1.9 --- CPUTraceR.java 24 Jul 2002 22:29:03 -0000 1.10 *************** *** 158,161 **** --- 158,169 ---- } + //----------roots + /** Returns LocationRef root of this object. + */ + public LocationRef getLocation() { + return this; + } + + // roots *************** *** 177,183 **** * </code> if this root is N / A. */ ! public DataR getLocation() { return this; } // package / private --- 185,192 ---- * </code> if this root is N / A. */ ! public DataR getLocationR() { return this; } + // package / private Index: DataR.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime/DataR.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** DataR.java 22 Jul 2002 21:51:59 -0000 1.5 --- DataR.java 24 Jul 2002 22:29:03 -0000 1.6 *************** *** 68,71 **** * </code> if this root is N / A. */ ! public abstract DataR getLocation(); } --- 68,71 ---- * </code> if this root is N / A. */ ! public abstract DataR getLocationR(); } Index: ImageR.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime/ImageR.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** ImageR.java 22 Jul 2002 21:51:59 -0000 1.12 --- ImageR.java 24 Jul 2002 22:29:03 -0000 1.13 *************** *** 408,412 **** if (parentRoot != null) parentMap.put(THREAD_KEY, parentRoot.getId()); ! parentRoot=parent.getLocation(); if (parentRoot != null) parentMap.put(LOCATION_KEY, parentRoot.getId()); --- 408,412 ---- if (parentRoot != null) parentMap.put(THREAD_KEY, parentRoot.getId()); ! parentRoot=parent.getLocationR(); if (parentRoot != null) parentMap.put(LOCATION_KEY, parentRoot.getId()); *************** *** 1150,1154 **** while (it.hasNext()) { DataR el=(DataR) it.next(); ! if (el.getLocation()==keyLocation) return el; } --- 1150,1154 ---- while (it.hasNext()) { DataR el=(DataR) it.next(); ! if (el.getLocationR()==keyLocation) return el; } *************** *** 1193,1197 **** while (it.hasNext()) { DataR data=(DataR) it.next(); ! DataR location=data.getLocation(); System.out.println(location); if (location instanceof AllocTraceR) { --- 1193,1197 ---- while (it.hasNext()) { DataR data=(DataR) it.next(); ! DataR location=data.getLocationR(); System.out.println(location); if (location instanceof AllocTraceR) { Index: MethodR.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime/MethodR.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** MethodR.java 22 Jul 2002 21:51:59 -0000 1.11 --- MethodR.java 24 Jul 2002 22:29:03 -0000 1.12 *************** *** 244,247 **** --- 244,251 ---- return image; } + + public MethodRef getMethod() { + return this; + } // statistics getter methods *************** *** 297,300 **** --- 301,311 ---- } + //-----------roots + /** Returns LocationRef root of this object. + */ + public LocationRef getLocation() { + return this; + } + // roots *************** *** 316,320 **** * </code> if this root is N / A. */ ! public DataR getLocation() { return this; } --- 327,331 ---- * </code> if this root is N / A. */ ! public DataR getLocationR() { return this; } *************** *** 675,677 **** --- 686,693 ---- } } + + /** Returns Location root of multi-rooted object. Returns <code>null + * </code> if this root is N / A. + */ + } Index: MonThreadMethodR.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime/MonThreadMethodR.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** MonThreadMethodR.java 22 Jul 2002 21:51:59 -0000 1.8 --- MonThreadMethodR.java 24 Jul 2002 22:29:03 -0000 1.9 *************** *** 117,122 **** } ! // ---------- return parents ! public ThreadRef getThread() { needConstructed(); --- 117,123 ---- } ! // ---------- return parents, roots ! /** Returns ThreadRef root of this object. ! */ public ThreadRef getThread() { needConstructed(); *************** *** 128,131 **** --- 129,138 ---- return location; } + + /** Returns LocationRef root of this object. + */ + public LocationRef getLocation() { + return getMethod(); + } // ---------- return roots of this object *************** *** 149,153 **** * </code> if this root is N / A. */ ! public DataR getLocation() { needConstructed(); return location; --- 156,160 ---- * </code> if this root is N / A. */ ! public DataR getLocationR() { needConstructed(); return location; *************** *** 277,281 **** thread.refreshCPUThreadMethods(); List o=thread.getCPUThreadMethods(); ! return (CPUThreadMethodRef) image.filterByLocation(o, getLocation()); } --- 284,288 ---- thread.refreshCPUThreadMethods(); List o=thread.getCPUThreadMethods(); ! return (CPUThreadMethodRef) image.filterByLocation(o, getLocationR()); } *************** *** 286,290 **** thread.refreshAllocThreadMethods(); List o=thread.getAllocThreadMethods(); ! return (AllocThreadMethodRef) image.filterByLocation(o, getLocation()); } --- 293,297 ---- thread.refreshAllocThreadMethods(); List o=thread.getAllocThreadMethods(); ! return (AllocThreadMethodRef) image.filterByLocation(o, getLocationR()); } Index: MonThreadTraceR.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime/MonThreadTraceR.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** MonThreadTraceR.java 22 Jul 2002 21:51:59 -0000 1.7 --- MonThreadTraceR.java 24 Jul 2002 22:29:03 -0000 1.8 *************** *** 99,103 **** // ---------- return child Lists ! // ---------- return parents public MonThreadMethodRef getMonThreadMethod() { --- 99,103 ---- // ---------- return child Lists ! // ---------- return parents, roots public MonThreadMethodRef getMonThreadMethod() { *************** *** 106,109 **** --- 106,111 ---- } + /** Returns ThreadRef root of this object. + */ public ThreadRef getThread() { needConstructed(); *************** *** 115,119 **** return location; } ! // ---------- return roots of this object --- 117,126 ---- return location; } ! ! /** Returns LocationRef root of this object. ! */ ! public LocationRef getLocation() { ! return getMonTrace(); ! } // ---------- return roots of this object *************** *** 136,140 **** * </code> if this root is N / A. */ ! public DataR getLocation() { needConstructed(); return location; --- 143,147 ---- * </code> if this root is N / A. */ ! public DataR getLocationR() { needConstructed(); return location; Index: MonTraceR.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime/MonTraceR.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** MonTraceR.java 22 Jul 2002 21:51:59 -0000 1.9 --- MonTraceR.java 24 Jul 2002 22:29:03 -0000 1.10 *************** *** 141,145 **** --- 141,153 ---- return time; } + + //------------roots + /** Returns LocationRef root of this object. + */ + public LocationRef getLocation() { + return this; + } + // refresh *************** *** 175,179 **** } ! public DataR getLocation() { return this; } --- 183,187 ---- } ! public DataR getLocationR() { return this; } Index: ThreadGroupR.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime/ThreadGroupR.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** ThreadGroupR.java 22 Jul 2002 21:51:59 -0000 1.8 --- ThreadGroupR.java 24 Jul 2002 22:29:03 -0000 1.9 *************** *** 131,135 **** * </code> if this root is N / A. */ ! public DataR getLocation() { return null; } --- 131,135 ---- * </code> if this root is N / A. */ ! public DataR getLocationR() { return null; } Index: ThreadR.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime/ThreadR.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** ThreadR.java 22 Jul 2002 21:51:59 -0000 1.11 --- ThreadR.java 24 Jul 2002 22:29:03 -0000 1.12 *************** *** 331,335 **** * </code> if this root is N / A. */ ! public DataR getLocation() { return null; } --- 331,335 ---- * </code> if this root is N / A. */ ! public DataR getLocationR() { return null; } Index: TypeR.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/realtime/TypeR.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** TypeR.java 22 Jul 2002 21:51:59 -0000 1.1 --- TypeR.java 24 Jul 2002 22:29:03 -0000 1.2 *************** *** 215,218 **** --- 215,226 ---- setData((IProf.sAllocStatData) data.statData); } + + //------------- roots + + /** Returns TypeRef root of this object. + */ + public TypeRef getType() { + return this; + } // roots *************** *** 226,230 **** } ! public DataR getLocation() { return null; } --- 234,238 ---- } ! public DataR getLocationR() { return null; } |