From: Pavel V. <va...@us...> - 2002-01-26 20:56:06
|
Update of /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data In directory usw-pr-cvs1:/tmp/cvs-serv1880 Modified Files: SnapshotImpl.java Log Message: methods gcs(), arenas() added Index: SnapshotImpl.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/SnapshotImpl.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** SnapshotImpl.java 2002/01/11 22:24:02 1.8 --- SnapshotImpl.java 2002/01/26 20:56:02 1.9 *************** *** 19,23 **** * Lukas Petru and Marek Przeczek. */ ! package net.sourceforge.javaprofiler.jpiimpl.data; --- 19,23 ---- * Lukas Petru and Marek Przeczek. */ ! package net.sourceforge.javaprofiler.jpiimpl.data; *************** *** 47,51 **** private LinkedList threads = new LinkedList(); private LinkedList allocObjects = new LinkedList(); ! //private LinkedList arenas = new LinkedList(); private LinkedList gcs = new LinkedList(); --- 47,51 ---- private LinkedList threads = new LinkedList(); private LinkedList allocObjects = new LinkedList(); ! private LinkedList arenas = new LinkedList(); private LinkedList gcs = new LinkedList(); *************** *** 54,61 **** private boolean withAlloc = true; private boolean withMon = true; - //boolean withArenas = true; - private boolean withGC = true; private boolean withTraces = true; private boolean withThreads = true; //only traces with more hits than this will be extracted private int CPUTraces_MinVal = IProf.NO_OPTIONAL_ARG; //2; --- 54,61 ---- private boolean withAlloc = true; private boolean withMon = true; private boolean withTraces = true; private boolean withThreads = true; + private boolean withArenas = true; + private boolean withGC = true; //only traces with more hits than this will be extracted private int CPUTraces_MinVal = IProf.NO_OPTIONAL_ARG; //2; *************** *** 87,90 **** --- 87,91 ---- *@param withAlloc Whether include snapshot of allocations. *@param withMon Whether include snapshot of monitors. + *@param withArenas Whether inlucde snapshot of arenas. *@param withGC Whether inlucde snapshot of garbage collector. * *************** *** 101,106 **** //maybe use some configuration object public SnapshotImpl( IProf iprof, boolean withCPU, boolean withAlloc, ! boolean withMon, boolean withGC, boolean withTraces, ! boolean withThreads, int CPUTraces_MinVal, int AllocTraces_MinVal, --- 102,107 ---- //maybe use some configuration object public SnapshotImpl( IProf iprof, boolean withCPU, boolean withAlloc, ! boolean withMon, boolean withTraces, ! boolean withThreads, boolean withArenas, boolean withGC, int CPUTraces_MinVal, int AllocTraces_MinVal, *************** *** 109,115 **** this.withAlloc = withAlloc; this.withMon = withMon; - this.withGC = withGC; this.withTraces = withTraces; this.withThreads = withThreads; this.CPUTraces_MinVal = CPUTraces_MinVal; this.AllocTraces_MinVal = AllocTraces_MinVal; --- 110,117 ---- this.withAlloc = withAlloc; this.withMon = withMon; this.withTraces = withTraces; this.withThreads = withThreads; + this.withGC = withGC; + this.withArenas = withArenas; this.CPUTraces_MinVal = CPUTraces_MinVal; this.AllocTraces_MinVal = AllocTraces_MinVal; *************** *** 260,265 **** //some public classes, that are not in interface yet ! /** Returns list of objects, that can be allocated, e.g. class, array of class, ! * array of int, etc. * * @return list of allocatable objects. --- 262,267 ---- //some public classes, that are not in interface yet ! /** Returns list of objects, that can be allocated. ! * These are class, array of class array of int, etc. * * @return list of allocatable objects. *************** *** 277,280 **** --- 279,298 ---- } + /** Returns list of objects with garbage collector information. + * + *@return list of objects with garbage collector information. + */ + public List gcs() { + return gcs; + } + + /**Return list of arenas. + * + *@return list of arenas. + */ + public List arenas() { + return arenas; + } + ////////////////////////////////////////////////////////////////////////////// // Private classes *************** *** 297,301 **** // It usually uses libIDs field. ! /** Makes snapshot (mirror of library structures), it reads configuration * from private fields of <code>SnapshotImpl</code>. * This method is called from contructor, that sets configuration. --- 315,320 ---- // It usually uses libIDs field. ! /** Makes snapshot (mirror of library structures). ! * It reads configuration * from private fields of <code>SnapshotImpl</code>. * This method is called from contructor, that sets configuration. *************** *** 407,415 **** } } } - //?//PENDING - //if ( withArenas ) { - // extract( null, arenas, IProf.NO_OPTIONAL_ARG, IProf.ARENAS ); - //} if ( withGC ) { extract( null, gcs, IProf.GCS, IProf.NO_OPTIONAL_ARG, iprof ); --- 426,434 ---- } } + } + + if ( withArenas ) { + extract( null, arenas, IProf.ARENAS, IProf.NO_OPTIONAL_ARG, iprof ); } if ( withGC ) { extract( null, gcs, IProf.GCS, IProf.NO_OPTIONAL_ARG, iprof ); *************** *** 444,448 **** *@param optArg Optional argument passed to IProf.getAll(), depends on <code>whatType</code> * operation. In many cases it's just <code>IProf.NO_OPTIONAL_ARG</code>. ! * {@link net.sourceforge.javaprofiler.jpiimpl.commun.IProf.getAll} *@param iprof Communacation object (you have to be connected to profiled VM). * --- 463,467 ---- *@param optArg Optional argument passed to IProf.getAll(), depends on <code>whatType</code> * operation. In many cases it's just <code>IProf.NO_OPTIONAL_ARG</code>. ! * {@link net.sourceforge.javaprofiler.jpiimpl.commun.IProf#getAll()} *@param iprof Communacation object (you have to be connected to profiled VM). * *************** *** 544,549 **** if ( postOpIterLst == null ) return new LinkedList(); ! if ( refObj != null ) ! return postOpIterLst; switch( whatType ) { --- 563,568 ---- if ( postOpIterLst == null ) return new LinkedList(); ! // if ( refObj == null ) ! // return postOpIterLst; switch( whatType ) { *************** *** 594,605 **** }; ! /** Creates and returns new object, its type depends on <code>whatType</code> operation, ! * this object carries information from <code>sid</code>. Finally this new * object is conected to mirror structure, optionaly connected to <code> * postOpLst</code> or <code> postOpIterLst </code> lists for furter manipulation. * ! *@returns object, which type depends on <code>whatType</code> operation ! *param whatType constant of operation (constant from IProf) used in extract() method ! *param sid contains statistic and sometimes also info data *@see SnapshotImpl#extract() */ --- 613,624 ---- }; ! /** Creates and returns new object, its type depends on <code>whatType</code> operation. ! * This object carries information from <code>sid</code>. Finally this new * object is conected to mirror structure, optionaly connected to <code> * postOpLst</code> or <code> postOpIterLst </code> lists for furter manipulation. * ! *@return object, which type depends on <code>whatType</code> operation ! *@param whatType constant of operation (constant from IProf) used in extract() method ! *@param sid contains statistic and sometimes also info data *@see SnapshotImpl#extract() */ *************** *** 1009,1020 **** //TODO: // write exception handling code properly ! // solve problems with AllocClassData, rename to AllocObjectData ! // ! //shloud I read default configuration somewhere? /* * $Log$ * Revision 1.8 2002/01/11 22:24:02 vachis * added allocObjects list, methods for getting allocObjects and groupOfThreads --- 1028,1042 ---- //TODO: // write exception handling code properly ! // solve inconsitences with AllocClassData names, ?expansion from classes ! // serialize, ! // shloud I read default configuration somewhere? /* * $Log$ + * Revision 1.9 2002/01/26 20:56:02 vachis + * methods gcs(), arenas() added + * * Revision 1.8 2002/01/11 22:24:02 vachis * added allocObjects list, methods for getting allocObjects and groupOfThreads |