Doing Profiling

Josef Weidendorfer Josef.Weidendorfer at
Thu Dec 12 12:55:39 GMT 2002

On Thursday 12 December 2002 00:16, Michael Brade wrote:
> On Wednesday 11 December 2002 20:59, Harri Porten wrote:
> > On Wed, 11 Dec 2002, Christian Esken wrote:
> > > Anybody knows how to get timings?
> >
> > Use (k)cachegrind.
> Well... I tried this as well some time ago. But I'm lost as with no other
> app so far and gave up on it; is there any documentation for kcachegrind? I
> didn't find anything useful (to me :}).

Hi all,

some status info on KCachegrind / call-tree patch for valgrind
(I'm the author of both).

These 2 things are more or less hacks from July-September this year.
Afterwards till now I had no time at all.

I know some of the problems. And I will implement a much more robust
call tracing for valgrind 2.0 (CVS version). As this version supports
kind of plugins, there will be no patch but a seperate plugin. I'm not
sure if it will make it into valgrind core distribution, but that's no point.
A first valgrind 2.0 release is aimed at january next year.

Regarding the current call-tree patch.
I know there are some problems with some glibc versions, and with programs 
using longjmp/C++ exception handling.

KCachegrind is "only" a GUI way to look at the kind of data 
cachegrind/vg_annotate or gprof produces.
PLEASE... if you have any problems understanding the things.
Mail me and I will put at least some FAQ for the www-page and
later compile it into the documentation.
For every widget it KCachegrind, there should be a "What's this" help. I 
thought this will be a good starter together with the information from the 
www page.

KCachegrind *will* at some point in time support GProf/OProfile.
It seems superior to me regarding the slowdown at all and allowing for 
hardware processor counters of P4/Athlon (real TLB/cache misses ...).

Last thing about using gprof.
You *need* instrumented compiled version (-pg) of EVERYTHING. I.e. glibc, qt, 
x11 libs, etc. Next thing: for any usefull output, you NEED ONE STATIC 
executable. This is next to impossible with KDE apps.
So gprof seems kind of useless to me at the moment...


Dipl.-Inform. Josef Weidendorfer
LRR-TUM - Raum 01.06.056 - Tel. +49 / (0)89 / 289 - 18454

More information about the kde-core-devel mailing list