From: Marek P. <ma...@us...> - 2002-04-15 21:04:28
|
Update of /cvsroot/javaprofiler/library/src/shared In directory usw-pr-cvs1:/tmp/cvs-serv21227/src/shared Modified Files: class.cpp method.cpp thread.cpp Log Message: serious bug fixes - monitors, deactivating... interface version checking added new test program for testing of memory profiling added Index: class.cpp =================================================================== RCS file: /cvsroot/javaprofiler/library/src/shared/class.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** class.cpp 21 Nov 2001 22:31:51 -0000 1.5 --- class.cpp 15 Apr 2002 21:04:18 -0000 1.6 *************** *** 53,66 **** active = 0; ! Prof::prof().activeClasses.removeNoRehash(this); AllocObject* o; ! if (o = allocObject) o->deactivate(); ! if (o = allocObjectArray) o->deactivate(); Method* m = methods.first(); ! while (m) { m->deactivate(); ! m = methods.next(m); } } --- 53,67 ---- active = 0; ! Prof::prof().activeClasses.removeNoRehash( this); AllocObject* o; ! if( o = allocObject) o->deactivate(); ! if( o = allocObjectArray) o->deactivate(); Method* m = methods.first(); ! while( m) { ! m->deactivate(); ! m = methods.next( m); } } Index: method.cpp =================================================================== RCS file: /cvsroot/javaprofiler/library/src/shared/method.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** method.cpp 21 Nov 2001 22:31:51 -0000 1.14 --- method.cpp 15 Apr 2002 21:04:18 -0000 1.15 *************** *** 60,99 **** void Method::deactivate() { ! Prof::prof().activeMethods.removeNoRehash(this); AllocThreadMethod* atm = allocThreadMethods.first(); ! while (atm) { atm->deactivate(); ! atm = allocThreadMethods.next(atm); } ! CpuThreadMethod* ctm = cpuThreadMethods.first(); ! while (ctm) { ! ctm->deactivate(); ! ctm = cpuThreadMethods.next(ctm); ! } ! MonThreadMethod* mtm = monThreadMethods.first(); ! while (mtm) { ! mtm->deactivate(); ! mtm = monThreadMethods.next(mtm); } AllocTrace* at = allocTraces.first(); ! while (at) { at->deactivate(); ! at = allocTraces.next(at); } CpuTrace* ct = cpuTraces.first(); ! while (ct) { ct->deactivate(); ! ct = cpuTraces.next(ct); } MonTrace* mt = monTraces.first(); ! while (mt) { mt->deactivate(); ! mt = monTraces.next(mt); } } --- 60,112 ---- void Method::deactivate() { ! Prof::prof().activeMethods.removeNoRehash( this); AllocThreadMethod* atm = allocThreadMethods.first(); ! while( atm) { ! atm->deactivate(); ! atm = allocThreadMethods.next( atm); } ! AllocObjectMethod* aom = allocObjectMethods.first(); ! while( aom) { ! aom->deactivate(); ! aom = allocObjectMethods.next( aom); } AllocTrace* at = allocTraces.first(); ! while( at) { ! at->deactivate(); ! at = allocTraces.next( at); ! } ! ! CpuThreadMethod* ctm = cpuThreadMethods.first(); ! while( ctm) { ! ! ctm->deactivate(); ! ctm = cpuThreadMethods.next( ctm); } CpuTrace* ct = cpuTraces.first(); ! while( ct) { ! ct->deactivate(); ! ct = cpuTraces.next( ct); ! } ! ! MonThreadMethod* mtm = monThreadMethods.first(); ! while( mtm) { ! ! mtm->deactivate(); ! mtm = monThreadMethods.next( mtm); } MonTrace* mt = monTraces.first(); ! while( mt) { ! mt->deactivate(); ! mt = monTraces.next( mt); } } Index: thread.cpp =================================================================== RCS file: /cvsroot/javaprofiler/library/src/shared/thread.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** thread.cpp 21 Nov 2001 22:31:51 -0000 1.10 --- thread.cpp 15 Apr 2002 21:04:18 -0000 1.11 *************** *** 59,87 **** active = 0; ! Prof::prof().activeThreads.removeNoRehash(this); ! Prof::prof().sampledThreads.remove(this); AllocThreadObject* ato = allocThreadObjects.first(); ! while (ato) { ato->deactivate(); ! ato = allocThreadObjects.next(ato); } AllocThreadMethod* atm = allocThreadMethods.first(); ! while (atm) { atm->deactivate(); ! atm = allocThreadMethods.next(atm); } ! CpuThreadMethod* ctm = cpuThreadMethods.first(); ! while (ctm) { ctm->deactivate(); ! ctm = cpuThreadMethods.next(ctm); } ! MonThreadMethod* mtm = monThreadMethods.first(); ! while (mtm) { mtm->deactivate(); ! mtm = monThreadMethods.next(mtm); } } --- 59,91 ---- active = 0; ! Prof::prof().activeThreads.removeNoRehash( this); ! Prof::prof().sampledThreads.remove( this); AllocThreadObject* ato = allocThreadObjects.first(); ! while( ato) { ! ato->deactivate(); ! ato = allocThreadObjects.next( ato); } AllocThreadMethod* atm = allocThreadMethods.first(); ! while( atm) { ! atm->deactivate(); ! atm = allocThreadMethods.next( atm); } ! CpuThreadMethod* ctm = cpuThreadMethods.first(); ! while( ctm) { ! ctm->deactivate(); ! ctm = cpuThreadMethods.next( ctm); } ! MonThreadMethod* mtm = monThreadMethods.first(); ! while( mtm) { ! mtm->deactivate(); ! mtm = monThreadMethods.next( mtm); } } |