[Libreoffice] How to use gprof on LibO?

Michael Meeks michael.meeks at novell.com
Mon Jan 31 05:38:49 PST 2011

Hi Soeren,

On Sat, 2011-01-29 at 15:50 +0100, Soeren Moeller wrote:
> In our effort of replacing deprecated data types from tools/ by std::
> types we would like to use gprof for profiling (to choose the right
> data types).

	Oh - fun :-) is a complete expunging of the obsolete types not
possible ?

> But unfortunately, we don't know to set the -pg flag, and where
> the gmon.out file would go. Has anyone of you experiences with
> profiling LibO, and would like to tell us, how to do?

	I always use callgrind instead; and I use it like this:

valgrind --tool=callgrind --simulate-cache=yes --dump-instr=yes ./soffice.bin -writer -splash-pipe=0

	Then I use 'kcachegrind' on the output.

	Now - possibly you want to use callgrind_control -z just before you
start doing something fun in calc - so that you can not get swamped by
the startup cost; and of course - this method is fairly slow, and really
you need to build with debug symbols to get a good view of what is up.

	OTOH - it is a wonderful tool ;-)



 michael.meeks at novell.com  <><, Pseudo Engineer, itinerant idiot

More information about the LibreOffice mailing list