[Libreoffice] [GSoC] link-time optimization
michael.meeks at novell.com
Mon Aug 22 04:22:10 PDT 2011
On Sat, 2011-08-20 at 23:04 +0200, Matúš Kukan wrote:
> I created patch, which allows link-time optimization (--enable-lto)
> for shared libraries, you need at least gcc-4.5 (I'm not checking for
> version in configure).
Patch looks great to me :-)
> I don't know what should I try to test
> if it is really faster and how much.
Heh ;-) so a 'callgrind' run on startup would be one approach:
valgrind --tool=callgrind --simulate-cache=yes --dump-instr=yes ./soffice.bin -writer --splash-pipe=0
And then look at the total number of simulated cycles I guess. On the
other hand it would be perhaps easier, and more interesting to see if
the code is actually smaller ;-) what is the size before and after of
the writer library eg. ?
> Most of the time is running lto1 executable and it eat cca
> 2GB RAM when optimizing sw library. (cca 4,5 minutes for me)
:-) Of course, if we can get some real wins with it (particularly
putting more code into one big library), then a bit more link time is a
price well worth paying I think.
I suspect most of the bigger wins come from getting as much as possible
of the code integrated together into one big, mozilla-style library
but ... :-) lets see.
michael.meeks at novell.com <><, Pseudo Engineer, itinerant idiot
More information about the LibreOffice