KProf 1.3 README file Release date: June 29th, 2001. SUMMARY ------- KProf is a tool for developers. It lets you examine the output of code profilers to help you understand where the bottlenecks and slowdowns are in your code. KProf supports analysis of the output generated by the following profilers: - GNU gprof, available on most UNIX systems - Function Check, a recent and better profiler available from http://sourceforge.net/projects/fnccheck - Palm OS Emulator, a tool from Palm which lets emulates a PalmOS device and can profile the execution of the application running in the emulator. INSTALLING KPROF ---------------- To install KProf, simply do: $ ./configure --prefix= $ make $ make install You must be root to do the 'make install'. In case you have problems building the software, do: $ make -f Makefile.cvs prior to the ./configure step. I suggest you specify the location where KDE3 is installed (for example, /usr or /opt/kde2) using the '--prefix=' directive. Here is how I configure KProf on my machine: $ ./configure --prefix=/usr because KDE3 is installed in /usr. On some distributions, KDE3 is installed in /opt or in /opt/kde3. USING KPROF ----------- Here are the possible ways to use KProf: - RECOMMENDED: A binary program. In this case, KProf will try to locate a file named `gmon.out' in the same directory. This file is generated automatically when a program compiled with profiling turned on is executed. If 'gmon.out' is not found, KProf will try to find 'fnccheck.out', the binary profiling output generated when running a program with Function Check profiling (see information about Function Check above). Whichever profiler you use (gprof or Function Check), this is the best way to use KProf because it will automatically recognize and call the right profiler. - A text profile results generated by `gprof' after the binary program has been executed and the `gmon.out' file has been created as a result of the execution. To create the text profile results file, do the following: $ gprof -b myprogram > results.txt Then open the `results.txt' file with KProf. Please note that KProf has only been tested with the output files produced by GNU gprof 2.9.5 and up. Your mileage may vary if you are using an earlier version. Make sure that the "gprof" radio button is checked in the Open File dialog box. - A text profile results generated by 'Function Check' after the binary program has been executed and the 'fnccheck.out' file has been created as a result of the execution. To create the text profile results file, do the following: $ fncdump +calls -no-decoration myprogram > results.txt Then open the 'results.txt' file with KProf. Note that you'll have to check the 'Function Check' radio-button at bottom of the File Selector dialog for KProf to recognize the file as the output of the Function Check profiler. Make sure that the "Function Check" radio button is checked in the Open File dialog box. - A text profile results generated by `pose', the Palm OS Emulator. This file is generated automatically by the "profiling" version of the emulator (compiled with --enable-palm-profile when you ./configure'd it). The file is named "Profile Results.txt". EXTENDED FEATURES ----------------- KProf offers a number of tools to help you profile your code. It can optionally hide the contents of template-functions for readability, display a subset of the complete list when you type part of a function name in the entry field on top of the "flat" list, print your results, diff two result files, etc. Please read the online manual to learn more about these features. Feel free to send bugs and patches to fpillet@users.sourceforge.net Share and enjoy, Florent Pillet.