1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138
|
KProf 1.4.1 README file
Release date: July 2nd, 2002.
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
----------------
New for 1.4: In order to be able to use the built in calltree viewer,
it is essential that you install GraphViz from AT&T first, this
new functionality WILL NOT WORK withoiut it.
Get GraphViz at http://www.graphviz.org
To install KProf, simply do:
$ ./configure --prefix=<where your kde installation is, usually /usr or /opt>
$ 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.
- This only works for v1.4 of Function Check (known as
fnccheck). Version 3 compatibility is in the pipeline.
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.
If the QTreeMap library is present (http://sourceforge.net/projects/qtreemap/)
then an additional menu item will come up on the Tools menu to allow the
user to display the profile information as TreeMaps.
In addition to saving the call graphs as files, it is now possible to
display the graphs from within KProf, although this functionality is
basic. This requires at least one of the following applications to be
present
- GraphViz (http://www.graphviz.org)
- VCG (http://rw4.cs.uni-sb.de/users/sander/html/gsvcg1.html)
Feel free to send bugs and patches to
cdesmond@users.sourceforge.net
Share and enjoy,
Florent Pillet and Colin Desmond
<mailto:cdesmond@users.sourceforge.net>
|