>> When you compile with -Os, the inlining happens only when code size reduces.
>> Thus we pretty much care about the code size metrics only.  I suspect the
>> problem here might be that normal C++ code needs some inlining to make
>> abstraction penalty go away. GCC -Os implementation is generally tuned for
>> CSiBE and it is somewhat C centric (that makes sense for embedded world). As 
>> a
>> result we might get quite noticeable slowdowns on C++ apps compiled with -Os
>> (and code size growth too since abstraction is never eliminated). It can be
>> seen also at tramp3d (Pooma testcase) where -Os produces a lot bigger and a 
>> lot
>> slower code.
> Looks like -Os needs tweaking for C++. It would be awesome if Mozilla  
> could serve a testcase for that.
>> I would be very interested to know the most obvious cases where we miss
>> inlining and should not.  It would be most helpful to directly know
>> -fdump-tree-inline_param-details for those or have self contained testcase.
> I posted such a testcase under "Crucial C++ inlining broken under Os"  
> subject.

Thanks, I will check it out tomorrow.  Testcases are really important here.

> Would be nice to ensure that code-size-reducing inlining has testsuite  
> coverage and then move on to more ambitious targets.

We have CSiBE benchmark to test -Os, but it does not contain that much of
inlining heavy testcases as far as I am aware.
>
> For example, it would be nice to mix -O2/-Os via pgo. Mozilla carries  
> support for a lot of special-cases that are rarely used, would be nice  
> to aggressively minimize binary size for those features. I'm hoping we  
> can reduce binary size further via LTO.

With PGO everything at average fewer than once per execution in train run
is optimized for size.
>
> I would be happy to see a streamlined feedback loop between GCC and  
> Mozilla. I think setting up regular Mozilla benchmarking is a great  
> idea. I volunteer to be the Mozilla contact for that.
>
> Mozilla build instructions are here:  
> https://developer.mozilla.org/En/Simple_Firefox_build
>
> PGO instructions are at  
> https://developer.mozilla.org/en/Building_with_Profile-Guided_Optimization
>
> Our testsuite is pretty easy to setup now, see
> https://wiki.mozilla.org/StandaloneTalos
> It takes over an hour to run on slower hardware. I'm not aware of any  
> good documentation on what the tests do and what they are measured in.  
> https://wiki.mozilla.org/Performance:Tinderbox_Tests is an older  
> reference on the matter. Ping me on irc if you aren't sure what a test  
> is doing.

I will check it out tomorrow and see how far I get.  Automated nightly
tester would be very good for this.

Honza
>
> Cheers,
> Taras

Reply via email to