Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Heads up: Attempting to switch Linux builds to GCC 4.4 with PGO

11 views
Skip to first unread message

Taras Glek

unread,
Apr 20, 2010, 12:30:27 PM4/20/10
to
Hi,

GCC 4.4 on x86 is able to successfully build Firefox with profile guided
optimization. From my experience so far GCC 4.4 is the only version and
x86 is the only platform where we can do this at the moment.
GCC 4.5 and x86-64 (on 4.4 and 4.5) have some gcc bugs that need fixing.

Since PGO gives us a significant startup performance boost(1) and helps
with other benchmarks, I filed a bug
https://bugzilla.mozilla.org/show_bug.cgi?id=559964 to setup gcc 4.4 on
our build VMs with the aim of enabling pgo in our x86 Linux builds.

Cheers,
Taras


1.
http://blog.mozilla.com/tglek/2010/04/12/squeezing-every-last-bit-of-performance-out-of-the-linux-toolchain/

Benjamin Smedberg

unread,
Apr 20, 2010, 1:46:33 PM4/20/10
to
On 4/20/10 12:30 PM, Taras Glek wrote:
> Hi,
>
> GCC 4.4 on x86 is able to successfully build Firefox with profile guided
> optimization. From my experience so far GCC 4.4 is the only version and
> x86 is the only platform where we can do this at the moment.
> GCC 4.5 and x86-64 (on 4.4 and 4.5) have some gcc bugs that need fixing.

Are those bugs filed and planned to be fixed in 4.5.x? One of my secondary
priorities for this quarter is to run static analysis as part of our
standard builds, which is why we switched to GCC 4.3 fairly recently with
plugin support. Since GCC 4.4 doesn't have plugin support, and treehydra
doesn't work ith GCC 4.5 yet, it seems like this change is at odds with that.

We could of course build the debug builds with static analysis on GCC 4.3
and the release builds without static analysis on GCC 4.4, but if we can do
a little work and get all the way to GCC 4.5, we can have both and can avoid
switching compiler yet again later.

--BDS

Taras Glek

unread,
Apr 20, 2010, 3:01:23 PM4/20/10
to
On 04/20/2010 10:46 AM, Benjamin Smedberg wrote:
> On 4/20/10 12:30 PM, Taras Glek wrote:
>> Hi,
>>
>> GCC 4.4 on x86 is able to successfully build Firefox with profile guided
>> optimization. From my experience so far GCC 4.4 is the only version and
>> x86 is the only platform where we can do this at the moment.
>> GCC 4.5 and x86-64 (on 4.4 and 4.5) have some gcc bugs that need fixing.
>
> Are those bugs filed and planned to be fixed in 4.5.x? One of my
> secondary priorities for this quarter is to run static analysis as part
> of our standard builds, which is why we switched to GCC 4.3 fairly
> recently with plugin support. Since GCC 4.4 doesn't have plugin support,
> and treehydra doesn't work ith GCC 4.5 yet, it seems like this change is
> at odds with that.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43773 is the 4.5 pgo bug.I
haven't filed the x86_64 issues.

>
> We could of course build the debug builds with static analysis on GCC
> 4.3 and the release builds without static analysis on GCC 4.4, but if we
> can do a little work and get all the way to GCC 4.5, we can have both
> and can avoid switching compiler yet again later.

That would be nice. I think we should be able to port the static
analysis libraries over by the end of summer. I think GCC 4.5.0 is a
huge step forward for GCC and as such it might have more bugs than usual
to iron out, so I'm not in a big rush.

The reason I'm advocating a 4.4 switch is because it makes a huge
difference to real users now. I'd like to deploy x86 pgo now so we learn
of any potential downsides (and communicate them upstream to gcc) asap.
Once x86 is done, mobile should be the next pgo frontier as the benefits
should be even greater there.

Taras

Taras Glek

unread,
Apr 22, 2010, 7:55:56 PM4/22/10
to
On 04/20/2010 10:46 AM, Benjamin Smedberg wrote:

Yeah ok. Turns out we can build with PGO on gcc 4.5(for x86 and x86_64)
with a few source changes(bug 560897). Then another workaround is needed
to avoid linking against new libstdc++ features (bug 559964).

Lets get 4.5 deployed!

Taras

ps.


I also fixed up Treehydra to compile with gcc 4.5. It still needs a lot
of tlc to make all of the tests pass(ie porting of ESP, etc to updated
gcc datastructures).

michael

unread,
Apr 23, 2010, 3:31:53 PM4/23/10
to

For profile guided optimization builds, does it only help Firefox
application (i.e. firefox-bin)?
Or it will optimize Gecko (e.g. libxul.so) so that 3rd party
application which embeds Gecko will benefit from it?

Thank you.

0 new messages