Fwd: Performance samples & de-virtualization for LibreOffice ...

Michael Meeks michael.meeks at collabora.com
Fri Aug 22 07:50:10 PDT 2014


Hi guys,

	So Jan has been doing awesome work as normal on pre-linking and
optimization =) It'd be great to let others see / get involved / help
out there, hence fwding it to the list; prolly a better place for the
discussion.

	Thanks Jan !

		Michael.

-------- Forwarded Message --------From: Jan Hubicka <hubicka at ucw.cz>
To: Michael Meeks <michael.meeks at collabora.com>
Cc: Jan Hubicka <hubicka at ucw.cz>, Matúš Kukan
<matus.kukan at collabora.co.uk>
Subject: Re: Performance samples for LibreOffice ...
Date: Thu, 21 Aug 2014 15:56:26 +0200

> Hi Jan,
> 
> 	Any chance I can share this with the list ?
...
Feel free to share the list.  I am not sure if you want to annotate all
types/methods from the list (because the fact they have no derived types may
depend on configuration/plugins/etc)- I would sort of expect these to need
manual inspection...

Honza
...
> On Thu, 2014-08-21 at 05:58 +0200, Jan Hubicka wrote:
> > Hi,
> > after another break I got back to play with libreoffice.  I still did not
> > worked out how to build LO with profile feedback (avoid the TLS model conflict)
> > but fixed GCC mainline to build it at least and got the compilation noticeably
> > faster ;)
> > 
> > I was recently working on warning that would suggest adding final keywords to
> > types and methods to allow better devirtualization. Here are warnings I get for
> > libmerge (from February tree, sorry)
> > http://kam.mff.cuni.cz/~hubicka/final-warnings-libreoffice.txt
> > (search also for -Wsuggest-final-methods)
> > 
> > Overall I get:
> > 107730 polymorphic calls, 0 devirtualized, 20787 speculatively devirtualized, 31324 cold
> > 53983 have multiple targets, 0 overwritable, 0 already speculated (0 agree, 0 disagree), 1 external, 351 not defined, 0 artificial
> > 
> > good portion of the 20787 calls that do get devirtualized would be turned to direct calls
> > if all the annotations was added :)
> > 
> > Honza
> 

On Fri, 2014-08-22 at 08:11 +0200, Jan Hubicka wrote:
> Michael,
> > I also played bit more with the profile guided optimization problem.  The issue is that all unit tests fails
> > becuase of "cannot load any more object with static TLS".  I do not really get why this happens - while GCC
> > profling runtime does use TLS, I am quite sure it is global-dynamic. Anyway a hack around is:
> > CPPUNITTRACE="LD_PRELOAD=/aux/hubicka/libreoffice/50-fdo/instdir/program/libmergedlo.so"
> > 
> > This makes dynamic linker to allocate enought of the DTV slosts.  Still easier than recompiling glibc with increased
> > DTV surplus.
> > 
> > Any idea where are the DTV slots go?
> 
> Actual main reason to email you was because I wrote a bit about the final warnings here
> http://hubicka.blogspot.ca/2014/08/devirtualization-in-c-part-5-asking.html
> 
> I would be happy to know if they seem useful for LO.


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



More information about the LibreOffice mailing list