From: Marek P. <ma...@us...> - 2002-01-31 12:31:33
|
Update of /cvsroot/javaprofiler/library/src/commun In directory usw-pr-cvs1:/tmp/cvs-serv27034/src/commun Modified Files: iprof.cpp iprof.h Log Message: calltree Index: iprof.cpp =================================================================== RCS file: /cvsroot/javaprofiler/library/src/commun/iprof.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** iprof.cpp 2001/12/09 16:49:32 1.12 --- iprof.cpp 2002/01/31 12:30:59 1.13 *************** *** 61,64 **** --- 61,65 ---- _func[F_DISABLE_GC] = &IProf::_disableGC; _func[F_RUN_GC] = &IProf::_runGC; + _func[F_GET_CALLTREE] = &IProf::_getCallTree; if( setup.com.communType == Setup::COMMUN_SOCKET) *************** *** 273,275 **** --- 274,287 ---- runGC(); b.clear(); + } + + void IProf::_getCallTree( Buffer& b) { + + const char* buf = b.getBuffer()+sizeof( jint); // jump the "action" field + + jint threadObjId = ntohl( *(const jint*)buf); + + b.clear(); + + getCallTree( threadObjId, b); } Index: iprof.h =================================================================== RCS file: /cvsroot/javaprofiler/library/src/commun/iprof.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** iprof.h 2001/11/28 00:02:40 1.14 --- iprof.h 2002/01/31 12:30:59 1.15 *************** *** 67,71 **** /// number of methods of the interface ! FUNC_COUNT = 12 }; --- 67,71 ---- /// number of methods of the interface ! FUNC_COUNT = 13 }; *************** *** 151,155 **** /// runGC() ! F_RUN_GC = 11 }; --- 151,158 ---- /// runGC() ! F_RUN_GC = 11, ! ! /// getCallTree() ! F_GET_CALLTREE = 12 }; *************** *** 566,570 **** ** @param b in/out buffer ** ! ** @see disableGC(), runGC() */ void _enableGC( Buffer& b); --- 569,573 ---- ** @param b in/out buffer ** ! ** @see enableGC() */ void _enableGC( Buffer& b); *************** *** 577,581 **** ** @param b in/out buffer ** ! ** @see enableGC(), runGC() */ void _disableGC( Buffer& b); --- 580,584 ---- ** @param b in/out buffer ** ! ** @see disableGC() */ void _disableGC( Buffer& b); *************** *** 588,595 **** ** @param b in/out buffer ** ! ** @see enableGC(), disableGC() */ void _runGC( Buffer& b); private: --- 591,608 ---- ** @param b in/out buffer ** ! ** @see runGC() */ void _runGC( Buffer& b); + /** Get calltree. This method processes in/out buffer, + ** gains arguments and calls getCallTree() method. When + ** finished, in 'b' there is binary output of called method. + ** + ** @param b in/out buffer + ** + ** @see getCallTree() */ + + void _getCallTree( Buffer& b); + private: *************** *** 696,699 **** --- 709,720 ---- virtual void runGC() = 0; + + /** Get calltree. An abstract method implemented + ** by Prof class. + ** + ** @see Prof::getCallTree(), Prof */ + + virtual void getCallTree( objectID threadObjId, // in (jint) + Buffer& b) = 0; // out private: |