You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(73) |
Sep
(92) |
Oct
(9) |
Nov
(80) |
Dec
(60) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(92) |
Feb
(52) |
Mar
(71) |
Apr
(64) |
May
(53) |
Jun
(10) |
Jul
(111) |
Aug
(93) |
Sep
(134) |
Oct
|
Nov
|
Dec
|
From: Pavel V. <va...@us...> - 2002-04-09 08:20:20
|
Update of /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data In directory usw-pr-cvs1:/tmp/cvs-serv12002 Modified Files: SnapshotImpl.java Log Message: don't clear chaged flag Index: SnapshotImpl.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/SnapshotImpl.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** SnapshotImpl.java 13 Mar 2002 21:08:34 -0000 1.18 --- SnapshotImpl.java 9 Apr 2002 08:20:16 -0000 1.19 *************** *** 580,584 **** if ( iter == null ) { iterInner = iprof.getAllThruIterator( 0, whatType, true, ! IProf.isObjWithInfo( whatType), optArg ); pass = false; obj = null; --- 580,585 ---- if ( iter == null ) { iterInner = iprof.getAllThruIterator( 0, whatType, true, ! IProf.isObjWithInfo(whatType), optArg, ! false ); //don't clean changed flag pass = false; obj = null; *************** *** 587,591 **** obj = (IDObjectData) iter.next(); iterInner = iprof.getAllThruIterator( obj.getID().intValue(), whatType, ! true, IProf.isObjWithInfo( whatType), optArg ); } --- 588,593 ---- obj = (IDObjectData) iter.next(); iterInner = iprof.getAllThruIterator( obj.getID().intValue(), whatType, ! true, IProf.isObjWithInfo(whatType), optArg, ! false ); //don't clean changed flag } *************** *** 1146,1149 **** --- 1148,1154 ---- /* * $Log$ + * Revision 1.19 2002/04/09 08:20:16 vachis + * don't clear chaged flag + * * Revision 1.18 2002/03/13 21:08:34 vachis * Confuguration.withFields, Confuguration.isValid() |
From: Pavel V. <va...@us...> - 2002-04-09 08:19:33
|
Update of /cvsroot/javaprofiler/test/snapshot In directory usw-pr-cvs1:/tmp/cvs-serv11790 Modified Files: TestSnap.java Log Message: fix Index: TestSnap.java =================================================================== RCS file: /cvsroot/javaprofiler/test/snapshot/TestSnap.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** TestSnap.java 13 Mar 2002 21:09:31 -0000 1.5 --- TestSnap.java 9 Apr 2002 08:19:29 -0000 1.6 *************** *** 97,101 **** //iprof = new IProf( new CommunSetupShMem() ); ! iprof.run(); try { --- 97,104 ---- //iprof = new IProf( new CommunSetupShMem() ); ! if ( !iprof.run() ) { ! System.err.println("Error in communication"); ! return; ! } try { |
From: Marek P. <ma...@us...> - 2002-04-08 23:30:07
|
Update of /cvsroot/javaprofiler/library/src/prof In directory usw-pr-cvs1:/tmp/cvs-serv8146/src/prof Modified Files: prof_jvm.cpp prof_method.cpp prof_monitor.cpp prof_object.cpp Log Message: fixes Index: prof_jvm.cpp =================================================================== RCS file: /cvsroot/javaprofiler/library/src/prof/prof_jvm.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -r1.27 -r1.28 *** prof_jvm.cpp 10 Feb 2002 18:36:13 -0000 1.27 --- prof_jvm.cpp 8 Apr 2002 23:30:01 -0000 1.28 *************** *** 217,220 **** --- 217,222 ---- cout << "AllocObject - ID = " << o->getProfID() << " (" << o << ")" << endl; + cout << "numInstancesTotal = " << o->allocNumInstancesTotal << endl; + cout << "numInstancesLive = " << o->allocNumInstancesLive << endl; o->objectMethods.forEach( printAllObjectMethods, NULL); cout << endl; Index: prof_method.cpp =================================================================== RCS file: /cvsroot/javaprofiler/library/src/prof/prof_method.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** prof_method.cpp 22 Mar 2002 21:23:23 -0000 1.10 --- prof_method.cpp 8 Apr 2002 23:30:01 -0000 1.11 *************** *** 242,245 **** --- 242,246 ---- stat->addCpuStat( 1, pureTime); + stat->addCpuStat( -1, 0); if( setup.cpu.callTreeEnabled) { Index: prof_monitor.cpp =================================================================== RCS file: /cvsroot/javaprofiler/library/src/prof/prof_monitor.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** prof_monitor.cpp 22 Mar 2002 21:23:23 -0000 1.5 --- prof_monitor.cpp 8 Apr 2002 23:30:01 -0000 1.6 *************** *** 143,146 **** --- 143,147 ---- int hits = (stat->wait) ? 0 : 1; stat->addMonStat(hits, curTime - t->monitorEnterTime); + stat->addMonStat( -1, 0); } *************** *** 210,212 **** --- 211,214 ---- stat->wait = 1; stat->addMonStat(1, event->u.monitor_wait.timeout); + stat->addMonStat( -1, 0); } Index: prof_object.cpp =================================================================== RCS file: /cvsroot/javaprofiler/library/src/prof/prof_object.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** prof_object.cpp 22 Mar 2002 21:23:23 -0000 1.18 --- prof_object.cpp 8 Apr 2002 23:30:01 -0000 1.19 *************** *** 175,178 **** --- 175,179 ---- stat->addMemoryStat(size); + stat->clearFlag(); } *************** *** 185,188 **** --- 186,190 ---- ins->objectMethodTraceThread->subMemoryStat( ins->size); + ins->objectMethodTraceThread->clearFlag(); instances.removeNoRehash( ins); |
From: Marek P. <ma...@us...> - 2002-04-08 23:30:06
|
Update of /cvsroot/javaprofiler/library/src/shared In directory usw-pr-cvs1:/tmp/cvs-serv8146/src/shared Modified Files: method.h Log Message: fixes Index: method.h =================================================================== RCS file: /cvsroot/javaprofiler/library/src/shared/method.h,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** method.h 21 Nov 2001 22:31:51 -0000 1.21 --- method.h 8 Apr 2002 23:30:01 -0000 1.22 *************** *** 112,115 **** --- 112,120 ---- public: + + /// a flag indicating modification of cpu/mon data + int cpumonModif; + + public: /// Default constructor. *************** *** 119,123 **** endLineno( 0), methodId( 0), ! clss( NULL) {} --- 124,130 ---- endLineno( 0), methodId( 0), ! clss( NULL), ! ! cpumonModif( 0) {} |
From: Marek P. <ma...@us...> - 2002-04-08 23:30:06
|
Update of /cvsroot/javaprofiler/library/src/cpu In directory usw-pr-cvs1:/tmp/cvs-serv8146/src/cpu Modified Files: cpuStatData.cpp cpuThreadMethod.cpp cpuTrace.cpp sampling.cpp Log Message: fixes Index: cpuStatData.cpp =================================================================== RCS file: /cvsroot/javaprofiler/library/src/cpu/cpuStatData.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** cpuStatData.cpp 21 Nov 2001 22:31:42 -0000 1.7 --- cpuStatData.cpp 8 Apr 2002 23:30:01 -0000 1.8 *************** *** 37,40 **** --- 37,42 ---- void CpuStatData::addCpuStat(jlong addHits, jlong addPureTime) { + if( addHits < 0) return; + hits += addHits; pureTime += addPureTime; Index: cpuThreadMethod.cpp =================================================================== RCS file: /cvsroot/javaprofiler/library/src/cpu/cpuThreadMethod.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** cpuThreadMethod.cpp 21 Nov 2001 22:31:42 -0000 1.8 --- cpuThreadMethod.cpp 8 Apr 2002 23:30:01 -0000 1.9 *************** *** 44,49 **** void CpuThreadMethod::addCpuStat(jlong addHits, jlong addPureTime) { CpuStatData::addCpuStat(addHits, addPureTime); ! method->addCpuStat(addHits, addPureTime); } --- 44,60 ---- void CpuThreadMethod::addCpuStat(jlong addHits, jlong addPureTime) { + if( addHits < 0) { + + method->cpumonModif = 0; + return; + } + CpuStatData::addCpuStat(addHits, addPureTime); ! ! if( !method->cpumonModif) { ! ! method->addCpuStat(addHits, addPureTime); ! method->cpumonModif = 1; ! } } Index: cpuTrace.cpp =================================================================== RCS file: /cvsroot/javaprofiler/library/src/cpu/cpuTrace.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** cpuTrace.cpp 21 Nov 2001 22:31:42 -0000 1.8 --- cpuTrace.cpp 8 Apr 2002 23:30:01 -0000 1.9 *************** *** 43,48 **** void CpuTrace::addCpuStat(jlong addHits, jlong addPureTime) { CpuStatData::addCpuStat(addHits, addPureTime); ! method->addCpuStat(addHits, addPureTime); } --- 43,59 ---- void CpuTrace::addCpuStat(jlong addHits, jlong addPureTime) { + if( addHits < 0) { + + method->cpumonModif = 0; + return; + } + CpuStatData::addCpuStat(addHits, addPureTime); ! ! if( !method->cpumonModif) { ! ! method->addCpuStat(addHits, addPureTime); ! method->cpumonModif = 1; ! } } Index: sampling.cpp =================================================================== RCS file: /cvsroot/javaprofiler/library/src/cpu/sampling.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** sampling.cpp 22 Mar 2002 21:24:16 -0000 1.12 --- sampling.cpp 8 Apr 2002 23:30:01 -0000 1.13 *************** *** 488,491 **** --- 488,492 ---- stat->addCpuStat((jlong)1, (jlong)0); + stat->addCpuStat( -1, 0); } } |
From: Marek P. <ma...@us...> - 2002-04-08 23:30:06
|
Update of /cvsroot/javaprofiler/library/demo/08 In directory usw-pr-cvs1:/tmp/cvs-serv8146/demo/08 Added Files: Makefile Makefile.mak Makefile.rules README Test.java dir.info Log Message: fixes --- NEW FILE: Makefile --- include ../../config.mk include Makefile.rules --- NEW FILE: Makefile.mak --- !include ../../config.mk !include Makefile.rules --- NEW FILE: Makefile.rules --- Test.o \ Test.obj: $(JAVAC) $(JAVACFLAGS) Test.java --- NEW FILE: README --- Test of objects. --- NEW FILE: Test.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. */ import java.lang.*; import java.util.*; import net.sourceforge.javaprofiler.jpiimpl.commun.*; public class Test { // communication interface private IProf iprof = null; public void runTest() { // initialize and start communication // we use socket communication where Java module will // stay for a server (so dynamic library must stay for a client) iprof = new IProf(); iprof.run(); try { // first of all, we need a thread ID Iterator iterator = iprof.getAllThruIterator( 0, IProf.OBJECT_TYPES, true); while( iterator.hasNext()) { IProf.sID sid = (IProf.sID)iterator.next(); System.out.println( "object: " + sid.objId); System.out.println( "totalnum: " + sid.alloc.allocNumInstancesTotal); System.out.println( "livenum: " + sid.alloc.allocNumInstancesLive); System.out.println(); } // now, i don't want anything else, // so I shutdown profiled JVM definitely iprof.shutdown(); } catch( Exception e) { System.err.println( "an error occurred, exception:"); System.err.println( e.getClass().getName()); } // communication must be stopped even if an error occurred ! iprof.stop(); iprof = null; } public static void main( String[] arg) { // let's run the test (new Test()).runTest(); } }; --- NEW FILE: dir.info --- FILES = Test CLEAN_FILES = *.class |
From: Marek P. <ma...@us...> - 2002-04-08 23:30:06
|
Update of /cvsroot/javaprofiler/library/src/mon In directory usw-pr-cvs1:/tmp/cvs-serv8146/src/mon Modified Files: monStatData.cpp monThreadMethod.cpp monTrace.cpp Log Message: fixes Index: monStatData.cpp =================================================================== RCS file: /cvsroot/javaprofiler/library/src/mon/monStatData.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** monStatData.cpp 21 Nov 2001 22:31:44 -0000 1.4 --- monStatData.cpp 8 Apr 2002 23:30:01 -0000 1.5 *************** *** 37,40 **** --- 37,42 ---- void MonStatData::addMonStat(jlong addHits, jlong addTime) { + if( addHits < 0) return; + hits += addHits; time += addTime; Index: monThreadMethod.cpp =================================================================== RCS file: /cvsroot/javaprofiler/library/src/mon/monThreadMethod.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** monThreadMethod.cpp 21 Nov 2001 22:31:44 -0000 1.4 --- monThreadMethod.cpp 8 Apr 2002 23:30:01 -0000 1.5 *************** *** 44,49 **** void MonThreadMethod::addMonStat(jlong addHits, jlong addTime) { MonStatData::addMonStat(addHits, addTime); ! method->addMonStat(addHits, addTime); } --- 44,60 ---- void MonThreadMethod::addMonStat(jlong addHits, jlong addTime) { + if( addHits < 0) { + + method->cpumonModif = 0; + return; + } + MonStatData::addMonStat(addHits, addTime); ! ! if( !method->cpumonModif) { ! ! method->addMonStat(addHits, addTime); ! method->cpumonModif = 1; ! } } Index: monTrace.cpp =================================================================== RCS file: /cvsroot/javaprofiler/library/src/mon/monTrace.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** monTrace.cpp 21 Nov 2001 22:31:44 -0000 1.4 --- monTrace.cpp 8 Apr 2002 23:30:01 -0000 1.5 *************** *** 43,48 **** void MonTrace::addMonStat(jlong addHits, jlong addTime) { MonStatData::addMonStat(addHits, addTime); ! method->addMonStat(addHits, addTime); } --- 43,59 ---- void MonTrace::addMonStat(jlong addHits, jlong addTime) { + if( addHits < 0) { + + method->cpumonModif = 0; + return; + } + MonStatData::addMonStat(addHits, addTime); ! ! if( !method->cpumonModif) { ! ! method->addMonStat(addHits, addTime); ! method->cpumonModif = 1; ! } } |
From: Marek P. <ma...@us...> - 2002-04-08 23:30:06
|
Update of /cvsroot/javaprofiler/library/demo In directory usw-pr-cvs1:/tmp/cvs-serv8146/demo Modified Files: Makefile.rules dir.info Log Message: fixes Index: Makefile.rules =================================================================== RCS file: /cvsroot/javaprofiler/library/demo/Makefile.rules,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** Makefile.rules 4 Mar 2002 23:57:08 -0000 1.7 --- Makefile.rules 8 Apr 2002 23:30:01 -0000 1.8 *************** *** 111,112 **** --- 111,128 ---- $(MAKE) $(MFLAGS) 07 clean + 08.dir: + cd 08 + $(MAKE) $(MFLAGS) + cd .. + + 08.dir.2: + $(MAKE) $(MFLAGS) 08 + + 08.clean: + cd 08 + $(MAKE) $(MFLAGS) clean + cd .. + + 08.clean.2: + $(MAKE) $(MFLAGS) 08 clean + Index: dir.info =================================================================== RCS file: /cvsroot/javaprofiler/library/demo/dir.info,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** dir.info 4 Mar 2002 23:57:08 -0000 1.7 --- dir.info 8 Apr 2002 23:30:01 -0000 1.8 *************** *** 1 **** ! DIRS = 01 02 03 04 05 06 07 --- 1 ---- ! DIRS = 01 02 03 04 05 06 07 08 |
From: Marek P. <ma...@us...> - 2002-04-08 23:29:12
|
Update of /cvsroot/javaprofiler/library/demo/08 In directory usw-pr-cvs1:/tmp/cvs-serv7902/demo/08 Log Message: Directory /cvsroot/javaprofiler/library/demo/08 added to the repository |
From: Marek P. <ma...@us...> - 2002-04-04 00:49:19
|
Update of /cvsroot/javaprofiler/library/src/commun In directory usw-pr-cvs1:/tmp/cvs-serv31762/src/commun Modified Files: iprof.cpp iprof.h Log Message: new getParents() method added to communication interface Index: iprof.cpp =================================================================== RCS file: /cvsroot/javaprofiler/library/src/commun/iprof.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** iprof.cpp 7 Mar 2002 00:27:21 -0000 1.14 --- iprof.cpp 4 Apr 2002 00:49:14 -0000 1.15 *************** *** 62,65 **** --- 62,66 ---- _func[F_RUN_GC] = &IProf::_runGC; _func[F_GET_CALLTREE] = &IProf::_getCallTree; + _func[F_GET_PARENTS] = &IProf::_getParents; if( setup.com.communType == Setup::COMMUN_SOCKET) *************** *** 288,290 **** --- 289,310 ---- getCallTree( threadObjId, b); + } + + void IProf::_getParents( Buffer& b) { + + const char* buf = b.getBuffer()+sizeof( jint); // jump the "action" field + + jint objId = ntohl( *(const jint*)buf); + + sParents parents; + jint rc = getParents( objId, parents); + + b.clear(); + b += rc; + + if( rc != RC_OK) return; + + b += parents.parentLeftObjId; + b += parents.parentUpObjId; + b += parents.parentRightObjId; } Index: iprof.h =================================================================== RCS file: /cvsroot/javaprofiler/library/src/commun/iprof.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** iprof.h 7 Mar 2002 00:27:21 -0000 1.16 --- iprof.h 4 Apr 2002 00:49:14 -0000 1.17 *************** *** 67,71 **** /// number of methods of the interface ! FUNC_COUNT = 13 }; --- 67,71 ---- /// number of methods of the interface ! FUNC_COUNT = 14 }; *************** *** 154,158 **** /// getCallTree() ! F_GET_CALLTREE = 12 }; --- 154,161 ---- /// getCallTree() ! F_GET_CALLTREE = 12, ! ! /// getParents() ! F_GET_PARENTS = 13 }; *************** *** 299,302 **** --- 302,320 ---- typedef List<sID,LI1> seqID; + /** Parent nodes of given object. This structure + ** contains object IDs of parents of given object. */ + + struct sParents { + + /// ID of parent #1 (on the left side in the structure) + objectID parentLeftObjId; + + /// ID of parent #2 (on up in the structure) + objectID parentUpObjId; + + /// ID of parent #3 (on the right side in the structure) + objectID parentRightObjId; + }; + /** Type of sequence. ** Type of objects in the sequence */ *************** *** 605,608 **** --- 623,636 ---- void _getCallTree( Buffer& b); + /** Get parents. This method processes in/out buffer, + ** gains arguments and calls getParents() method. When + ** finished, in 'b' there is binary output of called method. + ** + ** @param b in/out buffer + ** + ** @see getParents() */ + + void _getParents( Buffer& b); + private: *************** *** 719,722 **** --- 747,758 ---- virtual void getCallTree( objectID threadObjId, // in (jint) Buffer& b) = 0; // out + + /** Get parents. An abstract method implemented + ** by Prof class. + ** + ** @see Prof::getParents(), Prof */ + + virtual jint getParents( objectID objId, // in (jint) + sParents& parents) = 0; // out private: |
From: Marek P. <ma...@us...> - 2002-04-04 00:49:18
|
Update of /cvsroot/javaprofiler/library/src/commun2 In directory usw-pr-cvs1:/tmp/cvs-serv31762/src/commun2 Modified Files: prof_interface.cpp Log Message: new getParents() method added to communication interface Index: prof_interface.cpp =================================================================== RCS file: /cvsroot/javaprofiler/library/src/commun2/prof_interface.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** prof_interface.cpp 7 Mar 2002 00:27:21 -0000 1.18 --- prof_interface.cpp 4 Apr 2002 00:49:15 -0000 1.19 *************** *** 1187,1188 **** --- 1187,1208 ---- (static_cast<Thread*>( p))->callTree.getBinaryData( b); } + + jint Prof::getParents( objectID objId, // in (jint) + sParents& parents) { // out + + Synchronized sync( dataLock, 0); + if( !shuttingDown && !threadsSuspended) sync.enter(); + + ObjectTable* o = Counter::getCounter()->table.get( objId); + if( !o) return RC_BAD_OBJ_ID; + + IdObject* p = o->obj; + sID sid; + + copy( &sid, p, 0, 0); + parents.parentLeftObjId = sid.parentLeftObjId; + parents.parentUpObjId = sid.parentUpObjId; + parents.parentRightObjId = sid.parentRightObjId; + + return RC_OK; + } |
From: Marek P. <ma...@us...> - 2002-04-04 00:49:18
|
Update of /cvsroot/javaprofiler/library/src/prof In directory usw-pr-cvs1:/tmp/cvs-serv31762/src/prof Modified Files: prof.h Log Message: new getParents() method added to communication interface Index: prof.h =================================================================== RCS file: /cvsroot/javaprofiler/library/src/prof/prof.h,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -r1.42 -r1.43 *** prof.h 12 Mar 2002 22:17:56 -0000 1.42 --- prof.h 4 Apr 2002 00:49:15 -0000 1.43 *************** *** 957,960 **** --- 957,974 ---- Buffer& b); // out + /** Get parents. This method returns object IDs of parents + ** of given object identified by 'objId'. Result is stored + ** to 'parents' structure (in case a return value is RC_OK, + ** else undefined). + ** + ** @param objId object ID + ** @param parents output buffer + ** + ** @return RC_OK (okay); + ** RC_BAD_OBJ_ID (bad ID) */ + + virtual jint getParents( objectID objId, // in (jint) + sParents& parents); // out + private: |
From: Marek P. <ma...@us...> - 2002-04-04 00:49:18
|
Update of /cvsroot/javaprofiler/library/demo/04 In directory usw-pr-cvs1:/tmp/cvs-serv31762/demo/04 Modified Files: README Test.java Log Message: new getParents() method added to communication interface Index: README =================================================================== RCS file: /cvsroot/javaprofiler/library/demo/04/README,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** README 3 Dec 2001 16:26:25 -0000 1.1 --- README 4 Apr 2002 00:49:14 -0000 1.2 *************** *** 2,3 **** --- 2,7 ---- getChangedThruIterator() methods). It does the same as example 01 (very slow) and 02 (fast). Read comments in the file. + + There is some checking added so it looks a program is slow, but it is not true. + It is just because of additional checking of all parents of each method thru + IProf.getParents() method. Remove this checking and see how fast it is. Index: Test.java =================================================================== RCS file: /cvsroot/javaprofiler/library/demo/04/Test.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** Test.java 26 Jan 2002 23:52:44 -0000 1.4 --- Test.java 4 Apr 2002 00:49:14 -0000 1.5 *************** *** 62,65 **** --- 62,71 ---- System.out.println( " METHOD: " + mi.methodName); + // check parents if everything is okay (not necessary) + IProf.sParents parents = iprof.getParents( sid.objId); + + if( objId != sid.parentUpObjId || + objId != parents.parentUpObjId) System.exit( 1); + numMethods++; } |
From: Marek P. <ma...@us...> - 2002-04-04 00:49:18
|
Update of /cvsroot/javaprofiler/library In directory usw-pr-cvs1:/tmp/cvs-serv31762 Modified Files: README Log Message: new getParents() method added to communication interface Index: README =================================================================== RCS file: /cvsroot/javaprofiler/library/README,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -r1.37 -r1.38 *** README 22 Mar 2002 21:21:23 -0000 1.37 --- README 4 Apr 2002 00:49:14 -0000 1.38 *************** *** 85,89 **** written in Java. Because of stability and standard Sun's JVM is used. ! * JDK 1.4.0 release candidate Nowadays, client's code is in separate CVS module called "jpiimpl". --- 85,89 ---- written in Java. Because of stability and standard Sun's JVM is used. ! * JDK 1.4.0 Nowadays, client's code is in separate CVS module called "jpiimpl". |
From: Marek P. <ma...@us...> - 2002-04-04 00:48:06
|
Update of /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/commun In directory usw-pr-cvs1:/tmp/cvs-serv31505/net/sourceforge/javaprofiler/jpiimpl/commun Modified Files: IProf.java Log Message: new getParents() method added to communication interface Index: IProf.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/commun/IProf.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** IProf.java 12 Mar 2002 22:57:57 -0000 1.16 --- IProf.java 4 Apr 2002 00:48:01 -0000 1.17 *************** *** 154,157 **** --- 154,160 ---- private static final int F_GET_CALLTREE = 12; + /// remote getParents() method identifier + private static final int F_GET_PARENTS = 13; + /// internal I/O buffer private Buffer _buf = new Buffer(); *************** *** 2538,2541 **** --- 2541,2627 ---- return iterator; + } + + /** Parent objects of an object. This structure contains object IDs + ** of parents of given object. */ + + public class sParents { + + /// ID of parent #1 (on the left side in the structure) + public int parentLeftObjId; + + /// ID of parent #2 (on up in the structure) + public int parentUpObjId; + + /// ID of parent #3 (on the right side in the structure) + public int parentRightObjId; + }; + + /** Get parent nodes of the object. This method returns + ** object IDs of parents of given object identified by 'objId'. + ** The result is stored to output 'parents' buffer, old value + ** of this buffer will be overwritten by new one. + ** + ** @param objId object ID + ** @param parents output buffer (preallocated) */ + + public synchronized void getParents( int objId, sParents parents) + + throws COMMUN_Exception, + BAD_OBJ_ID_Exception, + UNKNOWN_Exception { + + _buf.clear(); + _buf.putInt( F_GET_PARENTS); + _buf.putInt( objId); + + _commun.write( _buf); + if( _commun.hasFailed()) throw new COMMUN_Exception(); + + _commun.read( _buf); + if( _commun.hasFailed()) throw new COMMUN_Exception(); + + int pos = 0; + + int rc = _buf.getInt( pos); + pos += 4; + + if( rc != RC_OK) { + + if( rc == RC_BAD_OBJ_ID) + throw new BAD_OBJ_ID_Exception(); + + throw new UNKNOWN_Exception(); + } + + parents.parentLeftObjId = _buf.getInt( pos); + pos += 4; + + parents.parentUpObjId = _buf.getInt( pos); + pos += 4; + + parents.parentRightObjId = _buf.getInt( pos); + } + + /** Get parent nodes of the object. This method returns + ** object IDs of parents of given object identified by 'objId'. + ** The result is returned as a return value, so each time this + ** method is called, new #sParents structure is allocated and + ** filled by received data. + ** + ** @param objId object ID + ** + ** @return #sParent structure */ + + public synchronized sParents getParents( int objId) + + throws COMMUN_Exception, + BAD_OBJ_ID_Exception, + UNKNOWN_Exception { + + sParents parents = new sParents(); + getParents( objId, parents); + + return parents; } }; |
From: Petr L. <lu...@us...> - 2002-03-22 21:24:18
|
Update of /cvsroot/javaprofiler/library/src/cpu In directory usw-pr-cvs1:/tmp/cvs-serv20100 Modified Files: sampling.cpp Log Message: no message Index: sampling.cpp =================================================================== RCS file: /cvsroot/javaprofiler/library/src/cpu/sampling.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** sampling.cpp 18 Feb 2002 20:17:59 -0000 1.11 --- sampling.cpp 22 Mar 2002 21:24:16 -0000 1.12 *************** *** 276,279 **** --- 276,280 ---- Prof* _prof = &Prof::prof(); jmethodID methodId; + jint lineno; Method *method; CallTreeItem *p, *parent; *************** *** 286,289 **** --- 287,295 ---- methodId = frames[numFrames - 1].method_id; + + if (_prof->setup.cpu.callTreeLinenoEnabled) + lineno = frames[numFrames - 1].lineno; + else + lineno = 0; if (!(method = _prof->getMethod(methodId))) *************** *** 293,296 **** --- 299,303 ---- p->method = method; + p->lineno = lineno; p->parent = NULL; p->hits = 1; *************** *** 305,311 **** methodId = frames[i].method_id; p = parent->children.first(); while (p) { ! if (p->method && p->method->isActive() && (*p->method == methodId)) break; p = parent->children.next(p); --- 312,323 ---- methodId = frames[i].method_id; + if (_prof->setup.cpu.callTreeLinenoEnabled) + lineno = frames[i].lineno; + else + lineno = 0; + p = parent->children.first(); while (p) { ! if (p->method && p->method->isActive() && (*p->method == methodId) && (p->lineno == lineno)) break; p = parent->children.next(p); *************** *** 325,328 **** --- 337,341 ---- p->method = method; + p->lineno = lineno; p->parent = parent; p->hits = 1; *************** *** 432,435 **** --- 445,452 ---- numFrames = thread->callTrace.num_frames; frames = thread->callTrace.frames; + + if (!_prof->setup.cpu.linenoEnabled) + for (int i = 0; i < numFrames; i++) + frames[i].lineno = 0; if (numFrames > 0) { |
From: Petr L. <lu...@us...> - 2002-03-22 21:23:54
|
Update of /cvsroot/javaprofiler/library/src/calltree In directory usw-pr-cvs1:/tmp/cvs-serv19975 Modified Files: callTree.cpp Log Message: no message Index: callTree.cpp =================================================================== RCS file: /cvsroot/javaprofiler/library/src/calltree/callTree.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** callTree.cpp 28 Feb 2002 10:20:31 -0000 1.3 --- callTree.cpp 22 Mar 2002 21:23:51 -0000 1.4 *************** *** 58,62 **** while( p) { ! long t = p->cumulativeTime-p->oldCumulativeTime; p->oldCumulativeTime = p->cumulativeTime; --- 58,62 ---- while( p) { ! jlong t = p->cumulativeTime-p->oldCumulativeTime; p->oldCumulativeTime = p->cumulativeTime; |
From: Petr L. <lu...@us...> - 2002-03-22 21:23:26
|
Update of /cvsroot/javaprofiler/library/src/prof In directory usw-pr-cvs1:/tmp/cvs-serv19839 Modified Files: prof_object.cpp prof_monitor.cpp prof_method.cpp Log Message: no message Index: prof_object.cpp =================================================================== RCS file: /cvsroot/javaprofiler/library/src/prof/prof_object.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** prof_object.cpp 10 Feb 2002 18:36:13 -0000 1.17 --- prof_object.cpp 22 Mar 2002 21:23:23 -0000 1.18 *************** *** 126,129 **** --- 126,133 ---- int numFrames = trace.num_frames; + if (!setup.alloc.linenoEnabled) + for (int i = 0; i < numFrames; i++) + frames[i].lineno = 0; + if (setup.alloc.threadsEnabled) { Index: prof_monitor.cpp =================================================================== RCS file: /cvsroot/javaprofiler/library/src/prof/prof_monitor.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** prof_monitor.cpp 21 Nov 2001 22:31:44 -0000 1.4 --- prof_monitor.cpp 22 Mar 2002 21:23:23 -0000 1.5 *************** *** 101,104 **** --- 101,108 ---- } + if (!setup.mon.linenoEnabled) + for (int i = 0; i < numFrames; i++) + callFrames[i].lineno = 0; + MonStatData* stat; Index: prof_method.cpp =================================================================== RCS file: /cvsroot/javaprofiler/library/src/prof/prof_method.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** prof_method.cpp 28 Feb 2002 11:47:19 -0000 1.9 --- prof_method.cpp 22 Mar 2002 21:23:23 -0000 1.10 *************** *** 43,65 **** Synchronized sync( dataLock); ! JVMPI_CallFrame callFrame; ! JVMPI_CallTrace callTrace; ! callTrace.env_id = event->env_id; ! callTrace.num_frames = 1; ! callTrace.frames = &callFrame; ! jvmpiInterface->GetCallTrace( &callTrace, 1); ! if( callTrace.num_frames != 1) { ! PROF_ERROR( "METHOD ENTRY", "GetCallTrace failed"); ! return; ! } ! if( callFrame.method_id != event->u.method.method_id) { ! PROF_ERROR( "METHOD ENTRY", "callFrame.method_id != event->method.method_id"); ! return; } --- 43,73 ---- Synchronized sync( dataLock); ! jmethodID methodID = event->u.method.method_id; ! jint lineno = 0; ! if (setup.cpu.linenoEnabled || setup.cpu.callTreeLinenoEnabled) ! { ! JVMPI_CallFrame callFrame; ! JVMPI_CallTrace callTrace; ! callTrace.env_id = event->env_id; ! callTrace.num_frames = 1; ! callTrace.frames = &callFrame; ! jvmpiInterface->GetCallTrace( &callTrace, 1); ! if( callTrace.num_frames != 1) { ! ! PROF_ERROR( "METHOD ENTRY", "GetCallTrace failed"); ! return; ! } ! if( callFrame.method_id != methodID) { ! PROF_ERROR( "METHOD ENTRY", "callFrame.method_id != event->method.method_id"); ! return; ! } ! ! lineno = callFrame.lineno; } *************** *** 72,80 **** } jlong entryTime = jvmpiInterface->GetCurrentThreadCpuTime(); ! thread->stack.push( callFrame, entryTime); if( setup.cpu.callTreeEnabled) { CallTreeItem* current = thread->callTree.current; CallTreeItem* p = current; --- 80,102 ---- } + JVMPI_CallFrame tempFrame; + + tempFrame.method_id = methodID; + + if (setup.cpu.linenoEnabled) + tempFrame.lineno = lineno; + else + tempFrame.lineno = 0; + jlong entryTime = jvmpiInterface->GetCurrentThreadCpuTime(); ! thread->stack.push( tempFrame, entryTime); if( setup.cpu.callTreeEnabled) { + jint ctLineno = 0; + + if (setup.cpu.callTreeLinenoEnabled) + ctLineno = lineno; + CallTreeItem* current = thread->callTree.current; CallTreeItem* p = current; *************** *** 85,89 **** while( q) { ! if( q->method && q->method->isActive() && *q->method == event->u.method.method_id) break; q = p->children.next( q); } --- 107,111 ---- while( q) { ! if( q->method && q->method->isActive() && *q->method == methodID && q->lineno == ctLineno) break; q = p->children.next( q); } *************** *** 96,100 **** if( !p) { ! Method* m = getMethod( event->u.method.method_id); if( m) { --- 118,122 ---- if( !p) { ! Method* m = getMethod( methodID); if( m) { *************** *** 102,105 **** --- 124,128 ---- p->method = m; + p->lineno = ctLineno; p->parent = current; *************** *** 142,145 **** --- 165,169 ---- Synchronized sync( dataLock); + jmethodID methodID = event->u.method.method_id; Thread* thread = getThread( event->env_id); *************** *** 163,167 **** } ! if( callFrames[0].method_id != event->u.method.method_id) { PROF_ERROR("METHOD EXIT", "top method != event->method.method_id"); --- 187,191 ---- } ! if( callFrames[0].method_id != methodID) { PROF_ERROR("METHOD EXIT", "top method != event->method.method_id"); *************** *** 182,186 **** if( setup.cpu.level == Setup::LEVEL_METHOD) { ! if( !(stat = getCpuThreadMethod( event->env_id, callFrames[0].method_id))) { PROF_ERROR("METHOD EXIT", "Cannot get CpuThreadMethod"); --- 206,210 ---- if( setup.cpu.level == Setup::LEVEL_METHOD) { ! if( !(stat = getCpuThreadMethod( event->env_id, methodID))) { PROF_ERROR("METHOD EXIT", "Cannot get CpuThreadMethod"); *************** *** 201,205 **** if( setup.cpu.level == Setup::LEVEL_METHOD) { ! if( !(stat = getMethod( callFrames[0].method_id))) { PROF_ERROR("METHOD EXIT", "Method not found"); --- 225,229 ---- if( setup.cpu.level == Setup::LEVEL_METHOD) { ! if( !(stat = getMethod( methodID))) { PROF_ERROR("METHOD EXIT", "Method not found"); *************** *** 225,229 **** if( current->method && current->method->isActive() && ! *current->method == callFrames[0].method_id) { jlong t = exitTime-current->startTime; --- 249,253 ---- if( current->method && current->method->isActive() && ! *current->method == methodID) { jlong t = exitTime-current->startTime; |
From: Petr L. <lu...@us...> - 2002-03-22 21:22:45
|
Update of /cvsroot/javaprofiler/library/src/setup In directory usw-pr-cvs1:/tmp/cvs-serv19670 Modified Files: setup.h setup.cpp Log Message: no message Index: setup.h =================================================================== RCS file: /cvsroot/javaprofiler/library/src/setup/setup.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** setup.h 10 Feb 2002 18:36:14 -0000 1.11 --- setup.h 22 Mar 2002 21:22:42 -0000 1.12 *************** *** 93,96 **** --- 93,99 ---- /// whether resolution to threads is enabled int threadsEnabled; + + /// whether resolution to line numbers is enabled + int linenoEnabled; }; *************** *** 115,120 **** --- 118,129 ---- int threadsEnabled; + /// whether resolution to line numbers is enabled + int linenoEnabled; + /// whether calltree is enabled int callTreeEnabled; + + /// whether resolution to line numbers for calltree is enabled + int callTreeLinenoEnabled; }; *************** *** 135,138 **** --- 144,150 ---- /// whether resolution to threads is enabled int threadsEnabled; + + /// whether resolution to line numbers is enabled + int linenoEnabled; }; Index: setup.cpp =================================================================== RCS file: /cvsroot/javaprofiler/library/src/setup/setup.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** setup.cpp 10 Feb 2002 18:36:14 -0000 1.9 --- setup.cpp 22 Mar 2002 21:22:42 -0000 1.10 *************** *** 42,45 **** --- 42,46 ---- alloc.traceDepth = 2; alloc.threadsEnabled = 1; + alloc.linenoEnabled = 1; cpu.turnedOn = 1; *************** *** 48,52 **** --- 49,55 ---- cpu.traceDepth = 2; cpu.threadsEnabled = 1; + cpu.linenoEnabled = 1; cpu.callTreeEnabled = 1; + cpu.callTreeLinenoEnabled = 0; mon.turnedOn = 1; *************** *** 54,57 **** --- 57,61 ---- mon.traceDepth = 2; mon.threadsEnabled = 1; + mon.linenoEnabled = 1; if( options) processOptions( options); *************** *** 149,152 **** --- 153,164 ---- } + if( !strcmp( name, "alloc_line")) { + + if( !strcmp( value, "on")) alloc.linenoEnabled = 1; + else if( !strcmp( value, "off")) alloc.linenoEnabled = 0; + + return; + } + if( !strcmp( name, "cpu")) { *************** *** 194,197 **** --- 206,217 ---- } + if( !strcmp( name, "cpu_line")) { + + if( !strcmp( value, "on")) cpu.linenoEnabled = 1; + else if( !strcmp( value, "off")) cpu.linenoEnabled = 0; + + return; + } + if( !strcmp( name, "cpu_calltree")) { *************** *** 202,205 **** --- 222,233 ---- } + if( !strcmp( name, "cpu_calltree_line")) { + + if( !strcmp( value, "on")) cpu.callTreeLinenoEnabled = 1; + else if( !strcmp( value, "off")) cpu.callTreeLinenoEnabled = 0; + + return; + } + if( !strcmp( name, "mon")) { *************** *** 235,238 **** --- 263,274 ---- if( !strcmp( value, "on")) mon.threadsEnabled = 1; else if( !strcmp( value, "off")) mon.threadsEnabled = 0; + + return; + } + + if( !strcmp( name, "mon_line")) { + + if( !strcmp( value, "on")) mon.linenoEnabled = 1; + else if( !strcmp( value, "off")) mon.linenoEnabled = 0; return; |
From: Petr L. <lu...@us...> - 2002-03-22 21:21:27
|
Update of /cvsroot/javaprofiler/library In directory usw-pr-cvs1:/tmp/cvs-serv19266 Modified Files: README Log Message: *_line, options added Index: README =================================================================== RCS file: /cvsroot/javaprofiler/library/README,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -r1.36 -r1.37 *** README 10 Feb 2002 18:36:13 -0000 1.36 --- README 22 Mar 2002 21:21:23 -0000 1.37 *************** *** 380,383 **** --- 380,387 ---- default: on + alloc_line {on|off} frame line numbers + in trace distinguished + default: on + cpu {on|off} turn cpu profiling on/off default: on *************** *** 405,411 **** --- 409,423 ---- default: on + cpu_line {on|off} frame line numbers + in trace distinguished + default: on + cpu_calltree {on|off} cpu calltree build default: on + cpu_calltree_line {on|off} line numbers of method + calls distinguished + default: off + mon {on|off} turn monitor profiling on/off default: on *************** *** 425,428 **** --- 437,444 ---- mon_thread {on|off} monitor profiling data distinguished to Java threads + default: on + + mon_line {on|off} frame line numbers + in trace distinguished default: on |
From: Pavel V. <va...@us...> - 2002-03-22 11:25:30
|
Update of /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data In directory usw-pr-cvs1:/tmp/cvs-serv22446/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data Modified Files: AllocTypeData.java Log Message: name of type added Index: AllocTypeData.java =================================================================== RCS file: /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data/AllocTypeData.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** AllocTypeData.java 4 Mar 2002 23:59:54 -0000 1.6 --- AllocTypeData.java 22 Mar 2002 11:25:23 -0000 1.7 *************** *** 37,40 **** --- 37,45 ---- */ private int arrayType; //PENDING + + private String name; //PENDING methods that retutn this + private boolean isArray; + private boolean isPrimitiveArray; + /** * Map of methods where instance of this type (class or array of classes) were allocated. *************** *** 62,65 **** --- 67,109 ---- methods=Collections.EMPTY_MAP; threads=Collections.EMPTY_MAP; + + isArray = true; + isPrimitiveArray = classData == null; + switch ( arrayType ) { + case IProf.JVMPI_NORMAL_OBJECT: + name = classData.getName(); + isArray = false; + break; + case IProf.JVMPI_CLASS: + name = "[" + classData.getName(); + break; + case IProf.JVMPI_BOOLEAN: + name = "[Z"; + break; + case IProf.JVMPI_BYTE: + name = "[B"; + break; + case IProf.JVMPI_CHAR: + name = "[C"; + break; + case IProf.JVMPI_SHORT: + name = "[S"; + break; + case IProf.JVMPI_INT: + name = "[I"; + break; + case IProf.JVMPI_LONG: + name = "[J"; + break; + case IProf.JVMPI_FLOAT: + name = "[F"; + break; + case IProf.JVMPI_DOUBLE: + name = "[D"; + break; + default: + name = ""; + } + } *************** *** 157,164 **** --- 201,219 ---- } + public String getName() { + return name; + } + + public boolean isArray() { + return isArray; + } + } /* * $Log$ + * Revision 1.7 2002/03/22 11:25:23 vachis + * name of type added + * * Revision 1.6 2002/03/04 23:59:54 vachis * removed/delayed allocation, use of Collections.EMPTY_MAP |
From: Marek P. <ma...@us...> - 2002-03-14 00:08:46
|
Update of /cvsroot/javaprofiler/library/src/commun In directory usw-pr-cvs1:/tmp/cvs-serv325/src/commun Modified Files: communSocket.cpp Log Message: randomized socket port selection Index: communSocket.cpp =================================================================== RCS file: /cvsroot/javaprofiler/library/src/commun/communSocket.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** communSocket.cpp 6 Mar 2002 18:00:38 -0000 1.13 --- communSocket.cpp 14 Mar 2002 00:08:43 -0000 1.14 *************** *** 64,75 **** sockaddr_in sin; sin.sin_family = AF_INET; - sin.sin_port = htons( port); sin.sin_addr.s_addr = htonl( INADDR_ANY); #ifdef WIN32 - if( _failed = (bind( _sock, (sockaddr*)&sin, sizeof( sin)) == SOCKET_ERROR)) return; if( _failed = (listen( _sock, 1) == SOCKET_ERROR)) return; #else - if( _failed = (bind( _sock, (sockaddr*)&sin, sizeof( sin)) < 0)) return; if( _failed = (listen( _sock, 1) < 0)) return; #endif --- 64,102 ---- sockaddr_in sin; sin.sin_family = AF_INET; sin.sin_addr.s_addr = htonl( INADDR_ANY); + srand( (unsigned)time( NULL)); + + int n = 0; + do { + + sin.sin_port = htons( port); + + #ifdef WIN32 + _failed = (bind( _sock, (sockaddr*)&sin, sizeof( sin)) == SOCKET_ERROR); + #else + _failed = (bind( _sock, (sockaddr*)&sin, sizeof( sin)) < 0); + #endif + + if( _failed) { + + port = 5000+rand()%10000; + n++; + } + } while( _failed && n < 10); + + if( _failed) return; + + if( port != _port) { + + cerr << "WARNING: default port not available !!!" << endl; + cerr << "WARNING: listening on port " << port << endl; + + _port = port; + } + #ifdef WIN32 if( _failed = (listen( _sock, 1) == SOCKET_ERROR)) return; #else if( _failed = (listen( _sock, 1) < 0)) return; #endif |
From: Marek P. <ma...@us...> - 2002-03-14 00:08:46
|
Update of /cvsroot/javaprofiler/library In directory usw-pr-cvs1:/tmp/cvs-serv325 Modified Files: TODO Log Message: randomized socket port selection Index: TODO =================================================================== RCS file: /cvsroot/javaprofiler/library/TODO,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** TODO 7 Mar 2002 00:27:21 -0000 1.10 --- TODO 14 Mar 2002 00:08:43 -0000 1.11 *************** *** 0 **** --- 1,4 ---- + 2002-03-14 + + * special filters (customizable, regular expressions) + |
From: Pavel V. <va...@us...> - 2002-03-13 21:10:08
|
Update of /cvsroot/javaprofiler/test/snapshot In directory usw-pr-cvs1:/tmp/cvs-serv18430 Modified Files: TestNoSwing.java Log Message: thread added Index: TestNoSwing.java =================================================================== RCS file: /cvsroot/javaprofiler/test/snapshot/TestNoSwing.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** TestNoSwing.java 3 Mar 2002 00:26:30 -0000 1.3 --- TestNoSwing.java 13 Mar 2002 21:10:04 -0000 1.4 *************** *** 41,66 **** class TestNoSwing { ! ! Set set; ! List list; TestNoSwing() { set = new HashSet(); ! list = new ArrayList(); }; ! void initSet() { int i; ! ! for (i = 1; i < 500; i++) { set.add( new Double(Math.random()) ); } ! }; ! ! void initList() { Iterator it=set.iterator(); Double d; ! ! while ( it.hasNext() ) { d = (Double) it.next(); --- 41,72 ---- class TestNoSwing { ! final int numIter = 50; ! final int numItems = 1000; ! private Set set; ! private List list; ! ! //shared ! SortedSet tree; TestNoSwing() { set = new HashSet(); ! list = new LinkedList(); ! tree = new TreeSet(); }; ! void init() { int i; ! ! //init set ! set.clear(); ! for (i = 1; i < numItems; i++) { set.add( new Double(Math.random()) ); } ! ! //init list Iterator it=set.iterator(); Double d; ! ! list.clear(); while ( it.hasNext() ) { d = (Double) it.next(); *************** *** 70,81 **** void sort() { - SortedSet tree=new TreeSet(); Iterator it=list.iterator(); Double d; - while ( it.hasNext() ) { d = (Double) it.next(); ! tree.add( d ); } --- 76,85 ---- void sort() { Iterator it=list.iterator(); Double d; while ( it.hasNext() ) { d = (Double) it.next(); ! sortingAdd( d ); } *************** *** 85,93 **** //System.out.print( d + " "); } ! } public static void main( String[] arg ) { TestNoSwing a = new TestNoSwing(); int i; --- 89,172 ---- //System.out.print( d + " "); } ! } ! ! void work() { ! int i; ! ! for (i = 1; i < numIter; i++) { ! init(); ! sort(); ! if ( Math.round(i/10) - i/10 == 0 ) ! clear(); ! System.err.print( i + " " ); ! } ! } ! ! synchronized void sortingAdd( Double d ) { ! tree.add( d ); ! } ! ! synchronized void clear() { ! tree.clear(); ! } ! ! /////////////////////////////////////////////////////////////////////// ! private class SortWorker extends Thread { ! private Set set; ! private List list; ! ! SortWorker() { ! set = new HashSet(); ! list = new LinkedList(); ! }; ! ! void init() { ! int i; ! ! //init set ! set.clear(); ! for (i = 1; i < numItems; i++) { ! set.add( new Double(Math.random()) ); ! } ! ! //init list ! Iterator it=set.iterator(); ! Double d; ! ! while ( it.hasNext() ) { ! d = (Double) it.next(); ! list.add( d ); ! } ! } ! ! void sortInv() { ! ListIterator it=list.listIterator(); ! Double d; ! ! //go to last ! while ( it.hasNext() ) { ! it.next(); ! }; ! ! while ( it.hasPrevious() ) { ! d = (Double) it.previous(); ! sortingAdd( d ); ! } ! } ! ! public void run () { ! int i; ! ! init(); ! for (i = 1; i < numIter; i++) { ! sortInv(); //make collision on sychronized method ! } ! } } + /////////////////////////////////////////////////////////////////////// public static void main( String[] arg ) { TestNoSwing a = new TestNoSwing(); + SortWorker b = a.new SortWorker(); //inner class creation int i; *************** *** 99,111 **** catch (IOException ioe) { System.err.println( "IOException caught:" + ioe ); } ! for (i = 1; i < 20; i++) { ! a.initSet(); ! a.initList(); ! a.sort(); ! System.err.print( i + " " ); ! } ! System.err.println( "end." ); System.err.print("Press a key"); --- 178,187 ---- catch (IOException ioe) { System.err.println( "IOException caught:" + ioe ); + ioe.printStackTrace(); } ! b.start(); ! a.work(); ! System.err.println( "end." ); System.err.print("Press a key"); *************** *** 115,119 **** --- 191,198 ---- catch (IOException ioe) { System.err.println( "IOException caught:" + ioe ); + ioe.printStackTrace(); } } } + + |
From: Pavel V. <va...@us...> - 2002-03-13 21:09:50
|
Update of /cvsroot/javaprofiler/test/snapshot In directory usw-pr-cvs1:/tmp/cvs-serv18215 Modified Files: runsnap.bat run3.bat run2.bat run1.bat printsnap.bat Log Message: shmem Index: runsnap.bat =================================================================== RCS file: /cvsroot/javaprofiler/test/snapshot/runsnap.bat,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** runsnap.bat 26 Jan 2002 19:37:10 -0000 1.3 --- runsnap.bat 13 Mar 2002 21:09:47 -0000 1.4 *************** *** 3,6 **** rem SET CLASSPATH=..\..\jpiimpl;..\..\interface;.\;%CLASSPATH% SET CLASSPATH=..\..\jpiimpl\jpiimpl.jar;.\;%CLASSPATH% ! set path=%JAVA_HOME%\bin;%path% java TestSnap --- 3,6 ---- rem SET CLASSPATH=..\..\jpiimpl;..\..\interface;.\;%CLASSPATH% SET CLASSPATH=..\..\jpiimpl\jpiimpl.jar;.\;%CLASSPATH% ! set path=%JAVA_HOME%\bin;%path%;..\..\library\src2 java TestSnap Index: run3.bat =================================================================== RCS file: /cvsroot/javaprofiler/test/snapshot/run3.bat,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** run3.bat 3 Mar 2002 00:28:35 -0000 1.2 --- run3.bat 13 Mar 2002 21:09:47 -0000 1.3 *************** *** 3,5 **** --- 3,6 ---- SET CLASSPATH=.;%CLASSPATH% set path=%JAVA_HOME%\bin;%path% + rem java -Xrun..\..\library\src\profiler\profiler:commun_type=shmem TestNoSwing > out3.txt java -Xrun..\..\library\src\profiler\profiler:commun_type=socket TestNoSwing > out3.txt Index: run2.bat =================================================================== RCS file: /cvsroot/javaprofiler/test/snapshot/run2.bat,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** run2.bat 3 Mar 2002 00:28:35 -0000 1.4 --- run2.bat 13 Mar 2002 21:09:47 -0000 1.5 *************** *** 3,5 **** --- 3,6 ---- SET CLASSPATH=%JAVA_HOME%\demo\jfc\SwingSet2\SwingSet2.jar;%CLASSPATH% set path=%JAVA_HOME%\bin;%path% + rem java -Xrun..\..\library\src\profiler\profiler:commun_type=shmem SwingSet2 > out2.txt java -Xrun..\..\library\src\profiler\profiler:commun_type=socket SwingSet2 > out2.txt Index: run1.bat =================================================================== RCS file: /cvsroot/javaprofiler/test/snapshot/run1.bat,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** run1.bat 3 Mar 2002 00:28:35 -0000 1.6 --- run1.bat 13 Mar 2002 21:09:47 -0000 1.7 *************** *** 3,5 **** SET CLASSPATH=%JAVA_HOME%\demo\jfc\Notepad\Notepad.jar;%CLASSPATH% set path=%JAVA_HOME%\bin;%path% ! java -Xrun..\..\library\src\profiler\profiler:commun_type=socket Notepad > out1.txt --- 3,6 ---- SET CLASSPATH=%JAVA_HOME%\demo\jfc\Notepad\Notepad.jar;%CLASSPATH% set path=%JAVA_HOME%\bin;%path% ! rem java -Xrun..\..\library\src\profiler\profiler:commun_type=shmem Notepad > out1.txt ! java -Xrun..\..\library\src\profiler\profiler:commun_type=socket Notepad > out1.txt \ No newline at end of file Index: printsnap.bat =================================================================== RCS file: /cvsroot/javaprofiler/test/snapshot/printsnap.bat,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** printsnap.bat 26 Jan 2002 19:36:18 -0000 1.1 --- printsnap.bat 13 Mar 2002 21:09:47 -0000 1.2 *************** *** 3,6 **** rem SET CLASSPATH=..\..\jpiimpl;..\..\interface;.\;%CLASSPATH% SET CLASSPATH=..\..\jpiimpl\jpiimpl.jar;.\;%CLASSPATH% ! set path=%JAVA_HOME%\bin;%path% java PrintSnap > snapout.txt --- 3,6 ---- rem SET CLASSPATH=..\..\jpiimpl;..\..\interface;.\;%CLASSPATH% SET CLASSPATH=..\..\jpiimpl\jpiimpl.jar;.\;%CLASSPATH% ! set path=%JAVA_HOME%\bin;%path%;..\..\library\src2 java PrintSnap > snapout.txt |