[Libreoffice] How to use gprof on LibO?

Soeren Moeller soerenmoeller2001 at gmail.com
Tue Feb 1 00:33:42 PST 2011


Thank you for your answers, I will try both approces.

>        Oh - fun :-) is a complete expunging of the obsolete types not
> possible ?
I very much hope it is possible, but tools/list is in the codebase
used for both classic list purposes and for situations where the
object is created once, is sorted, and then there is a lot of random
access, so here a vector would be better. But to find out which of
these two cases we are in, profiling could help.

Regards
Sören

2011/1/31 Michael Meeks <michael.meeks at novell.com>:
> 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:
>
> export OOO_DISABLE_RECOVERY=1
> 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 ;-)
>
>        HTH,
>
>                Michael.
>
> --
>  michael.meeks at novell.com  <><, Pseudo Engineer, itinerant idiot
>
>
>


More information about the LibreOffice mailing list