Difference between revisions of "Valgrind"

From Apache OpenOffice Wiki
Jump to: navigation, search
(cleanup and link to Callgrind)
Line 25: Line 25:
 
</pre>
 
</pre>
  
−
== Callgrind How-To ==
+
== more information ==
  
−
There's a [http://tools.openoffice.org/profiling/callgrind-howto.html Callgrind How-To] at the OOo website.
+
There's also some Writer document about Valgrind: http://tools.openoffice.org/debugging/usingvalgrind.sxw
  
 
TODO: move (!) its content here, not just copy but also remove there, so we don't end up with a fork.
 
TODO: move (!) its content here, not just copy but also remove there, so we don't end up with a fork.
  
−
There's also some Writer document about Valgrind: http://tools.openoffice.org/debugging/usingvalgrind.sxw
+
TODO: '''Run recent version''' <br/>
 +
Someone should run the latest version o OO.o, as Valgrind 3.3.0 re-introduces Hellgrind which helps e.g. to hunt down deadlocks. See [http://www.valgrind.org/docs/manual/dist.news.html] for more.
  
−
TODO: same as above.
+
== Callgrind Profiling How-To ==
  
−
TODO: '''Run recent version''' <br/>
+
There's a [[Callgrind| Callgrind How-To]].
−
Someone should run the latest version o OO.o, as Valgrind 3.3.0 re-introduces Hellgrind which helps e.g. to hunt down deadlocks. See [http://www.valgrind.org/docs/manual/dist.news.html] for more.
 

Revision as of 23:19, 4 February 2009

disabling the custom allocator

If you use ooo-build; export OOO_FORCE_SYSALLOC=1 before running, (this is built into linkoo's ooenv script).

If you use a Vanilla build, and your shell is setup for building ooo, use the following wrapper script around valgrind:

#!/bin/sh

# instrument soffice with a malloc-based memory allocator.
# Requires libsalalloc_malloc.so to be in the LD_LIBRARY_PATH.
# Forwards all command line arguments to valgrind.

export LD_PRELOAD=libsalalloc_malloc.so
valgrind $@ 

which preloads a small interceptor lib, which redirects all allocator calls to malloc.

disabling glib's custom allocator

If you want to also track down problems with glib allocated objects, e.g. resource leaks in gconfbe then you need to disable glib's custom allocation as well, e.g.

G_SLICE=always-malloc valgrind ...

more information

There's also some Writer document about Valgrind: http://tools.openoffice.org/debugging/usingvalgrind.sxw

TODO: move (!) its content here, not just copy but also remove there, so we don't end up with a fork.

TODO: Run recent version
Someone should run the latest version o OO.o, as Valgrind 3.3.0 re-introduces Hellgrind which helps e.g. to hunt down deadlocks. See [1] for more.

Callgrind Profiling How-To

There's a Callgrind How-To.

Personal tools