Difference between revisions of "Speedprof"

From Apache OpenOffice Wiki
Jump to: navigation, search
(use the branch instead of a patch)
(bin the patches section / tweak bits)
Line 10: Line 10:
 
     cvs login
 
     cvs login
 
     cvs -z3 co -r sled-fixes memprof
 
     cvs -z3 co -r sled-fixes memprof
 
=== patch it ===
 
 
Then if you're on a reasonably recent system you need to patch it to use new TLS / NPTL threading support instead of the older linux pthreads assumptions; [http://go-oo.org/ooo-build/patches/test/memprof-nptl.diff patch].
 
<pre>
 
patch -p0 < memprof-nptl.diff
 
</pre>
 
  
 
=== install it ===
 
=== install it ===
  
     configure
+
     ./autogen.sh
 
     make
 
     make
     make install
+
     sudo make install
  
 
=== how to use it ===
 
=== how to use it ===
Line 33: Line 26:
  
 
* sometimes crashes the app - but hey, sometimes the app crashes under it's own steam too - hard to know whom to blame.
 
* sometimes crashes the app - but hey, sometimes the app crashes under it's own steam too - hard to know whom to blame.
* doesn't work well with old systems (know to work well on SL10.0 with the patch eg.)
+
* doesn't work well with old systems (pre TLS / NPTL)
 
* doesn't like very long C++ symbols much - makes the columns somewhat unpleasant to use, needs some app tweakage.
 
* doesn't like very long C++ symbols much - makes the columns somewhat unpleasant to use, needs some app tweakage.

Revision as of 10:20, 26 July 2006

what is it

Speedprof is an LD_PRELOAD based itimer (or hard real-time, or builtin CPU timer) based snapshot profiler. It samples at regular intervals (tweakable by reading the code ;-) and then presents a rather sexy data mining view so you can wind back full stack information - what function called what and when, self & cumulative times down trace paths etc.

how to get it

Checkout 'memprof' from GNOME CVS:

   export CVSROOT=':pserver:anonymous@anoncvs.gnome.org:/cvs/gnome'
   cvs login
   cvs -z3 co -r sled-fixes memprof

install it

   ./autogen.sh
   make
   sudo make install

how to use it

   speedprof ./soffice.bin -writer

Of course, the most useful mode is to use the 'reset' button - ie. get OO.o going to the state you're interested in. Hit reset - do something slow - hit 'Profile' and wander the trace.

downsides

  • sometimes crashes the app - but hey, sometimes the app crashes under it's own steam too - hard to know whom to blame.
  • doesn't work well with old systems (pre TLS / NPTL)
  • doesn't like very long C++ symbols much - makes the columns somewhat unpleasant to use, needs some app tweakage.
Personal tools