* Curtis L. Olson -- Tuesday 24 June 2003 18:44:
> Does anyone have any ideas for factoring out the
> startup/initialization time from these performance reports?

Risking that I go on everybody's nerves already: this is again
the job of valgrind + the calltree "skin" (see below for the urls). 
Valgrind is only an engine that emulates a CPU. That is, it
catches every machine instruction, does some stuff before, lets
the real CPU execute the instruction, and does some stuff
afterwards. This can be used to check for access to uninitialized
memory, but it can also be used for tasks like profiling. All
you need is a different valgrind "skin". The profiling skin
does not execute in real-time, yet its measurement is perfectly
proportional. Valgrind + calltree generates a lot of raw data---
kcachegrind (KDE-libs required) displays the data in humanly
readable form. You can even see how different data fit into
the CPU cache ...

The colored fields at the top right of the below mentioned
screenshot indicate the time the program counter spent in the
respective functions. On the top left you can see chronological
phases. The first few slices are the startup phase. The last
ones are regular runtime. One runtime slice is selected and you
can see its analysis. You can select every single slice or a
couple thereof. There isn't much you *can't* do.   :-) 
You can even send signals to valgrind for when it shall start
and when it shall stop profiling.


HOWTO:

1. make sure you have the KDE-libs installed on a Linux system
2. download and install valgrind from
   http://developer.kde.org/~sewardj/valgrind-1.9.6.tar.bz2
3. download and install calltree from 
   http://kcachegrind.sourceforge.net/calltree-0.9.1.tar.gz
4. download and install kcachegrind from
   http://kcachegrind.sourceforge.net/kcachegrind-0.3b.tar.gz
5. execute e.g. (for nVidia cards; leave the environment
   away for others :-/ )
   $ __GL_FORCE_GENERIC_CPU=1 calltree --dumps=10000000 fgfs
6. now analyze the generated data by typing in the same dir:
   $ kcachegrind
7. marvel at the detailed output and click around
   http://www.unet.univie.ac.at/~a8603365/vg.png (82kB)

m.




Hint for Andy: the last valgrind version from cvs =does= handle
MMX/SSE(2), but that one doesn't work with calltree yet.

_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to