From: Marek P. <ma...@us...> - 2002-01-31 12:31:33
|
Update of /cvsroot/javaprofiler/library/src/commun2 In directory usw-pr-cvs1:/tmp/cvs-serv27034/src/commun2 Modified Files: prof_interface.cpp Log Message: calltree Index: prof_interface.cpp =================================================================== RCS file: /cvsroot/javaprofiler/library/src/commun2/prof_interface.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** prof_interface.cpp 2001/12/09 21:09:09 1.16 --- prof_interface.cpp 2002/01/31 12:31:00 1.17 *************** *** 57,60 **** --- 57,61 ---- #include "../mon/monThreadTrace.h" #include "../mon/monTrace.h" + #include "../calltree/callTree.h" void Prof::shutdown() { *************** *** 1160,1162 **** --- 1161,1188 ---- communLock.wait(); gcLock.release(); + } + + void Prof::getCallTree( objectID threadObjId, // in (jint) + Buffer& b) { // out + + Synchronized sync( dataLock, 0); + if( !shuttingDown && !threadsSuspended) sync.enter(); + + ObjectTable* o = Counter::getCounter()->table.get( threadObjId); + if( !o) { + + b += (jint)RC_BAD_OBJ_ID; + return; + } + + IdObject* p = o->obj; + if( !p ->isOfType( IdObject::THREAD)) { + + b += (jint)RC_BAD_OBJ_ID; + return; + } + + b += (jint)RC_OK; + + (static_cast<Thread*>( p))->callTree.getBinaryData( b); } |