| Overview
Download Setup Running Building Credits OverviewThis program is called TraceTool and it's an example tracing utility which uses dyninstAPI. The TraceTool program will instrument a given program so that function entries, exits, and callsites in the program will be instrumented with calls into designated tracing functions in the tracetool tracing library. It currently has been tested on x86-Linux, Power-AIX, and Sparc-Solaris.It has certain limitations.
Downloadtracetool.tar.gzSetupBefore TraceTool is run, certain environment variables need to be set.For dyninstAPI, the environment variables DYNINSTAPI_RT_LIB and LD_LIBRARY_PATH need to be set appropriately. DYNINSTAPI_RT_LIB needs to be set to the path of the dyninst runtime library file (libdyninstAPI_RT.so.1) and the environment variable LD_LIBRARY_PATH needs to be updated so that it contains the directory containing the dyninst library (libdyninstAPI.so). For the tracetool utility, the environment variable TRACETOOL_LIB needs to be set to the path of the tracetool tracing library. Here's example of cshell commands which I use to do the above. setenv DYNINSTAPI_RT_LIB ~/devafs/swork/d20/lib/i386-unknown-linux2.4/libdyninstAPI_RT.so.1 setenv LD_LIBRARY_PATH ~/devafs/swork/d20/lib/i386-unknown-linux2.4:$LD_LIBRARY_PATH setenv TRACETOOL_LIB /p/paradyn/development/schendel/proj/test150/i386_rh72/tracelib.so RunningAs the options below show it can either create or attach to the process to be traced.cumin_47> tracetool Usage: tracetool [-p<pid>] program [prog-arguments] -p: specify process id of program, for attaching if no pid is passed, then the process is started directly (need to set environment variable TRACETOOL_LIB to path of trace library) Here's an example of an invocation of tracetool on the application wget that I have been using.
/p/paradyn/development/schendel/proj/test150/i386_rh72/tracetool -p2567 $A/sequential/wget/bin/wget where 2567 was the pid of the wget process started in another terminal
/p/paradyn/development/schendel/proj/test150/i386_rh72/tracetool $A/sequential/wget/bin/wget -Q500m -r http://www.cnn.com/ -o mylog | & tee log1 BuildingThere is a Makefile in the directory tracetool/<platform>.In the Makefile the variable DYNINST_ROOT will need to be updated to the directory where dyninstAPI is located. Specifically, this directory should be the directory containing the dyninst core and lib directories. Type make to build the tracetool, tracing library, and the test application.
CreditsWritten by:Brandon Schendel to contact, email paradyn@cs.wisc.edu |