Pct is a program counter/instruction pointer sampling based profiling system. No recompiling or code instrumentation is required. Reports can be more or less detailed as per the amount of symbol/debugging information available in the linked executable being profiled. ULTRA QUICK START INSTRUCTIONS: $ make all $ su # make install # suspend $ make check $ pct line% /tmp/pct/ct/test.*/* $ pct sym% /tmp/pct/ct/test.*/* If you get reasonable output (like this) from "cd test; profile ./g-test": 0.5% /usr/src/gnu/egcs/gcc/obj/test.c:27 0.9% /home/am3/cblake/pct/test/test.h:6 1.8% /home/am3/cblake/pct/test/test.c:11 7.0% /home/am3/cblake/pct/test/test.c:12 8.1% /home/am3/cblake/pct/test/test.h:5 8.5% /usr/src/gnu/egcs/gcc/obj/test.c:26 73.1% /usr/lib/libc.so.25.0:_strcmp then you're all set. Otherwise you probably want to clean up a little: $ fg # make uninstall # exit Depending on how lame/cool your system is, when you want to profile a program you can usually just run it under the 'profile' script: $ profile full-path-to-mythingy (I'll eliminate the full path requirement soon....) You might also need/like to /usr/local/lib/profil.o to your link line as in: $ gcc -o myprogram my_file1.o my_file2.o... /usr/local/lib/profil.o or $ gcc -o myprogram my_file1.o my_file2.o... /usr/local/lib/itimer.o Then do: $ PCT='o/tmp/pct/ct' ./myprogram [ or under csh$ (setenv PCT o/tmp/pct/ct; ./myprogram) ] and look at the results with: $ pct line% /tmp/pct/ct/myprogram.*/* Even though profiling is linked in it is disabled by default. To enable it during a program execution, you must set the PCT environment variable -- even if it is set to a null string. A variety of output formats are available. See the source code to the 'pct' script or other documentation for specific pipeline operators and hints for how to tailor them.