Please compile Firefox with PGO optimizations

Bug #213708 reported by Sorin Ionescu
240
This bug affects 42 people
Affects Status Importance Assigned to Milestone
XULRunner
Fix Released
Medium
firefox (Ubuntu)
Fix Released
Wishlist
Unassigned
Declined for Jaunty by Alexander Sack
Declined for Karmic by Chris Coulson
Declined for Lucid by Chris Coulson
Quantal
Won't Fix
Wishlist
Unassigned
firefox-3.0 (openSUSE)
New
Undecided
Unassigned
xulrunner (Debian)
New
Unknown

Bug Description

Binary package hint: xulrunner-1.9

I've been using Arch Linux for the last 3 months. Now, I'm back on Ubuntu because I got tired of configuring. Configuring never ends. However, for Arch Linux, I made the best Firefox 3 package ( http://aur.archlinux.org/packages.php?ID=15184 ), which includes PGO optimizations ( http://developer.mozilla.org/en/docs/Building_with_Profile-Guided_Optimization ).

The Windows version is PGO optimised. People will hate the Ubuntu version knowing that the Windows version is so much faster. The official mozilla nightlies are PGO optimised.

This was a test I did on Arch Linux, which is compiled against i686:
Firefox 3 Beta 3 on the left.
Firefox 3 Beta 4 with Profile Guided Optimisations on the right: http://www.paste2.org/p/15666

This is what I got with this build https://bugs.launchpad.net/gutsy-backports/+bug/212468

http://tinyurl.com/6fv8aq

7 times slower. I'm not sure how much i686 helps. But, my i686 PGO was 3 times faster than my normal i686.

There are no regressions. It just works.

I've attached how it was compiled and the mozconfig.

Revision history for this message
In , Ted Mielczarek (ted-mielczarek) wrote :

This was actually ok before bug 361343. There was another older bug where I made the existing PGO support work again.

Revision history for this message
In , Ted Mielczarek (ted-mielczarek) wrote :

Created an attachment (id=304838)
enable pgo on fx-linux-tbox

There you go.

Revision history for this message
In , Ted Mielczarek (ted-mielczarek) wrote :

Created an attachment (id=304854)
with clobbery

So, this is going to be an unpopular change, I think we need to make it clobber as well.

Revision history for this message
In , Joduinn (joduinn) wrote :

From offline discussions with Damon, RobSayre, and then Ted:

1) This is being proposed for nightly/clobber builds, as well as hourly/incremental builds as well as release builds.

2) There are similar changes required for Mac. Ted is filing a bug for that.

3) This double-compile process will take extra time to cycle a build; seems like linux would be 2x, win32 would be just under 2x. This will need to be communicated to everyone watching Tinderbox.

4) We are not blocked on bug#418896 or bug#418894.

Revision history for this message
In , Joduinn (joduinn) wrote :

marking P1 as its needed for beta4.

Revision history for this message
In , RobertSayre (sayrer) wrote :

I had to back this out because of the following error:

/builds/tinderbox/Fx-Trunk/Linux_2.6.18-8.el5_Depend/mozilla/memory/jemalloc/jemalloc.c: In function 'choose_arena':
/builds/tinderbox/Fx-Trunk/Linux_2.6.18-8.el5_Depend/mozilla/memory/jemalloc/jemalloc.c:6043: error: corrupted profile info: edge from 5 to 6 exceeds maximal count
gmake[4]: *** [jemalloc.o] Error 1

Revision history for this message
In , RobertSayre (sayrer) wrote :

Looks like this might be just jemalloc causing problems. We should be able to skip PGO for that.

Revision history for this message
In , Ted Mielczarek (ted-mielczarek) wrote :

Created an attachment (id=305385)
skip PGO in jemalloc

This should do it.

Revision history for this message
In , Benjamin Smedberg (Mozilla) [:bs] (benjamin-smedbergs) wrote :

(From update of attachment 305385)
File a followup? I imagine PGO for jemalloc would useful if simply for branch-prediction/locality optimizations.

Revision history for this message
In , Ted Mielczarek (ted-mielczarek) wrote :

(From update of attachment 305385)
Filed bug 419470, will mention it in a comment.

Revision history for this message
In , Dsicore (dsicore) wrote :

(From update of attachment 305385)
a1.9+=damons

Revision history for this message
In , Ted Mielczarek (ted-mielczarek) wrote :

(From update of attachment 305385)
sayrer: you should be clear to try this again, but given that we're freezing tomorrow night, it might be rough to do it before wednesday.

Revision history for this message
In , Beltzner (beltzner) wrote :

Do you guys need a clean window to do this, like with Windows?

Revision history for this message
In , RobertSayre (sayrer) wrote :

(In reply to comment #13)
> Do you guys need a clean window to do this, like with Windows?

That would be best, but I don't think it's critical we do it this week. Our best avenue for beta linux users seems to be distro betas. So I'm content to focus on mac and additional Windows profile input for the rest of this week.

Revision history for this message
In , Beltzner (beltzner) wrote :

(From update of attachment 304854)
a=beltzner for after beta 4

Revision history for this message
In , Joduinn (joduinn) wrote :

*** Bug 384899 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Joduinn (joduinn) wrote :

(In reply to comment #15)
> (From update of attachment 304854 [details])
> a=beltzner for after beta 4

Therefore, removing as blocker on bug#418926 (3.0beta4 tracking bug)

Revision history for this message
In , Ted Mielczarek (ted-mielczarek) wrote :

Rob: do you want to do this? This has been sort of hanging out here for a while.

Revision history for this message
In , Mtschrep (mtschrep) wrote :

Given limited time in the release we are punting pgo on mac and linux - let's pick this up in next release

Revision history for this message
Sorin Ionescu (sorin.ionescu-deactivatedaccount) wrote : Please compile it with PGO optimizations

Binary package hint: xulrunner-1.9

I've been using Arch Linux for the last 3 months. Now, I'm back on Ubuntu because I got tired of configuring. Configuring never ends. However, for Arch Linux, I made the best Firefox 3 package ( http://aur.archlinux.org/packages.php?ID=15184 ), which includes PGO optimizations ( http://developer.mozilla.org/en/docs/Building_with_Profile-Guided_Optimization ).

The Windows version is PGO optimised. People will hate the Ubuntu version knowing that the Windows version is so much faster. The official mozilla nightlies are PGO optimised.

This was a test I did on Arch Linux, which is compiled against i686:
Firefox 3 Beta 3 on the left.
Firefox 3 Beta 4 with Profile Guided Optimisations on the right: http://www.paste2.org/p/15666

This is what I got with this build https://bugs.launchpad.net/gutsy-backports/+bug/212468

http://tinyurl.com/6fv8aq

7 times slower. I'm not sure how much i686 helps. But, my i686 PGO was 3 times faster than my normal i686.

There are no regressions. It just works.

description: updated
Revision history for this message
Sorin Ionescu (sorin.ionescu-deactivatedaccount) wrote :
Murat Gunes (mgunes)
Changed in xulrunner-1.9:
importance: Undecided → Wishlist
Revision history for this message
In , Ted Mielczarek (ted-mielczarek) wrote :

(From update of attachment 304854)
Clearing approval flag to get this off the radar.

Revision history for this message
In , Ted Mielczarek (ted-mielczarek) wrote :

(From update of attachment 305385)
Clearing approval flag to get this off the radar.

Revision history for this message
In , Ted Mielczarek (ted-mielczarek) wrote :

We may take this in 3.next.

Revision history for this message
Simon Strandman (nejsimon) wrote : Re: Please compile it with PGO optimizations

Building firefox with PGO is actually quite simple. Just add "mk_add_options PROFILE_GEN_SCRIPT='$(PYTHON) $(MOZ_OBJDIR)/_profile/pgo/profileserver.py'" to mozconfig (profileserver.py is a script that runs the app) and run make with the "profiledbuild" target instead of "build".

Please enable this in Jaunty!

Revision history for this message
John Vivirito (gnomefreak) wrote :

nxsty,
Please feel free to build it with PGO and if it works after testing it please feel free to offer a debdiff or join us in #ubuntu-mozillateam on irc.freenode.net and talk to one of us about it and we can see if it is agreed opon

Changed in xulrunner-1.9:
status: New → Incomplete
Revision history for this message
In , Ted Mielczarek (ted-mielczarek) wrote :

I wouldn't block on it, though.

Revision history for this message
In , Bzbarsky (bzbarsky) wrote :

So I just tried compiling with pgo on Linux. I get:

../../../../db/morkreader/libmorkreader_s.a(nsMorkReader.o): In function `global constructors keyed to 65535_0_nsMorkReader.cpp':
/home/bzbarsky/mozilla/debug/mozilla/db/morkreader/nsMorkReader.cpp:579: undefined reference to `__gcov_init'
../../../../db/morkreader/libmorkreader_s.a(nsMorkReader.o):(.data.rel+0x24): undefined reference to `__gcov_merge_add'
../../../../db/morkreader/libmorkreader_s.a(nsMorkReader.o):(.data.rel+0x30): undefined reference to `__gcov_merge_single'
../../../../db/morkreader/libmorkreader_s.a(nsMorkReader.o):(.data.rel+0x3c): undefined reference to `__gcov_merge_single'
../../../../db/morkreader/libmorkreader_s.a(nsMorkReader.o):(.data.rel+0x48): undefined reference to `__gcov_merge_add'
../../../../db/morkreader/libmorkreader_s.a(nsMorkReader.o):(.data.rel+0x54): undefined reference to `__gcov_merge_ior'
/home/bzbarsky/mozilla/debug/obj-firefox-gpo/dist/lib/libunicharutil_s.a(nsUnicharUtils.o): In function `global constructors keyed to 65535_0_nsUnicharUtils.cpp':
/home/bzbarsky/mozilla/debug/obj-firefox-gpo/intl/unicharutil/util/internal/nsUnicharUtils.cpp:226: undefined reference to `__gcov_init'
/home/bzbarsky/mozilla/debug/obj-firefox-gpo/dist/lib/libunicharutil_s.a(nsUnicharUtils.o):(.data.rel+0x24): undefined reference to `__gcov_merge_add'
/home/bzbarsky/mozilla/debug/obj-firefox-gpo/dist/lib/libunicharutil_s.a(nsUnicharUtils.o):(.data.rel+0x30): undefined reference to `__gcov_merge_single'
collect2: ld returned 1 exit status
gmake[7]: *** [libplaces.so] Error 1

Revision history for this message
In , Reed Loden (reed) wrote :

I think Murali was using gcov on Linux lately... maybe he can give some pointers?

Revision history for this message
In , Murali Nandigama (mnandigama) wrote :

Preliminary symptoms seems to be issues with LDFLAGS.

I need to check the .mozconfig file to comment further.

Revision history for this message
In , Reed Loden (reed) wrote :

bz, please post your .mozconfig for Murali, as per comment #26.

Revision history for this message
In , Bzbarsky (bzbarsky) wrote :

Created an attachment (id=362727)
The mozconfig in question

I had to do some manual copy/paste inclusion (I assumed you didn't want me to attach the 4-5 mozconfig files involved that include each other), and I removed all the comment lines. Other than that, this is the mozconfig involved.

Building on FC9 with:

% g++ --version
g++ (GCC) 4.3.0 20080428 (Red Hat 4.3.0-8)
% ld --version
GNU ld version 2.18.50.0.6-7.fc9 20080403

and ccache enabled.

Revision history for this message
In , Murali Nandigama (mnandigama) wrote :

Please add the following line to your .mozconfig file

export LDFLAGS="-lgcov -static-libgcc"

However, on a separate note, you are using '-g' flag for CFLAGS and CXXFLAGS and also using 'disable-debug'. Is it by design.

Thanks
Murali

Revision history for this message
In , Ted Mielczarek (ted-mielczarek) wrote :

Last time I tried this (with an older GCC, definitely not 4.3) it didn't require any special mozconfig hacking. It's possible gcc just sucks.

Revision history for this message
In , Bzbarsky (bzbarsky) wrote :

> export LDFLAGS="-lgcov -static-libgcc"

I can try that, but sounds like https://developer.mozilla.org/en/Building_with_Profile-Guided_Optimization needs updating. Or the build target should perhaps handle this automatically.

AS for -g and --disable-debug, yes. I want to be able to have debug symbols in my optimized builds, both for crash stacks and actual debugging of issues that only show up in the optimized build.

Revision history for this message
In , L. David Baron (dbaron) wrote :

Reed, why do you think gcov is the same as PGO? They're very different things, although I could understand if they shared some common infrastructure. Is there something I'm missing?

Revision history for this message
In , Ted Mielczarek (ted-mielczarek) wrote :

(In reply to comment #31)
> > export LDFLAGS="-lgcov -static-libgcc"
>
> I can try that, but sounds like
> https://developer.mozilla.org/en/Building_with_Profile-Guided_Optimization
> needs updating. Or the build target should perhaps handle this automatically.

The build system should handle this all automatically. It's not doing anything complicated, just -fprofile-generate / -fprofile-use:
http://mxr.mozilla.org/mozilla-central/source/configure.in#7030

Revision history for this message
In , Reed Loden (reed) wrote :

(In reply to comment #32)
> Reed, why do you think gcov is the same as PGO? They're very different things,
> although I could understand if they shared some common infrastructure. Is
> there something I'm missing?

I only mentioned gcov because of what the errors in comment #24 said.

Revision history for this message
In , Bzbarsky (bzbarsky) wrote :

Adding those LDFLAGS doesn't help; I still get the error from comment 24. The relevant command running at the time is:

c++ -fno-rtti -fno-exceptions -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof -Wno-long-long -pedantic -g -fno-strict-aliasing -fshort-wchar -pthread -pipe -DNDEBUG -DTRIMMED -g -fno-inline -Os -freorder-blocks -fno-reorder-functions -fPIC -shared -Wl,-z,defs -Wl,-h,libplaces.so -o libplaces.so nsAnnoProtocolHandler.o nsAnnotationService.o nsFaviconService.o nsNavHistory.o nsNavHistoryExpire.o nsNavHistoryQuery.o nsNavHistoryResult.o nsNavBookmarks.o nsMaybeWeakPtr.o nsMorkHistoryImporter.o nsPlacesModule.o nsNavHistoryAutoComplete.o -lpthread -lgcov -static-libgcc -Wl,-rpath-link,/home/bzbarsky/mozilla/debug/obj-firefox-pgo/dist/bin -Wl,-rpath-link,/usr/local/lib ../../../../db/morkreader/libmorkreader_s.a /home/bzbarsky/mozilla/debug/obj-firefox-pgo/dist/lib/libunicharutil_s.a -L/home/bzbarsky/mozilla/debug/obj-firefox-pgo/dist/bin -lxpcom -lxpcom_core -L/home/bzbarsky/mozilla/debug/obj-firefox-pgo/dist/bin -L/home/bzbarsky/mozilla/debug/obj-firefox-pgo/dist/lib -lplds4 -lplc4 -lnspr4 -lpthread -ldl -Wl,--version-script -Wl,/home/bzbarsky/mozilla/debug/mozilla/build/unix/gnu-ld-scripts/components-version-script -Wl,-Bsymbolic -lasound -ldl -lm

Changed in firefox-3.0:
status: New → Confirmed
Changed in xulrunner-1.9:
status: Incomplete → Confirmed
Revision history for this message
John Vivirito (gnomefreak) wrote :

This will not land in 3.0 since it is stable release and should only get security updates, however i think we should work on it for 3.1 and up.

Alexander Sack (asac)
Changed in firefox-3.0:
importance: Undecided → Medium
status: Confirmed → Triaged
Changed in xulrunner-1.9:
status: Confirmed → Triaged
Changed in firefox-3.0:
importance: Medium → Wishlist
Changed in firefox-3.1:
importance: Undecided → Wishlist
status: New → Triaged
Changed in xulrunner-1.9.1:
importance: Undecided → Wishlist
status: New → Triaged
Changed in xulrunner-1.9:
status: Triaged → Won't Fix
Changed in firefox-3.0:
status: Triaged → Won't Fix
Changed in xulrunner:
status: Unknown → Confirmed
Changed in firefox-3.1 (Ubuntu):
status: Triaged → Invalid
status: Invalid → Won't Fix
Changed in xulrunner (Debian):
status: Unknown → New
Changed in xulrunner-1.9 (Ubuntu):
status: Won't Fix → New
68 comments hidden view all 148 comments
Revision history for this message
In , Tglek (tglek) wrote :

(In reply to comment #70)
> Taras, thankyou for the information. I tried building firefox using mozilla's
> pgo instructions, but whenever I try building it, I get the following error
> message mid-way through the build:
>
> OBJDIR=/home/richard/firefox-build/vanilla/mozilla-1.9.2/../firefox-build
> python
> /home/richard/firefox-build/vanilla/mozilla-1.9.2/../firefox-build/_profile/pgo/profileserver.py
> INFO | automation.py | Application pid: 28455
> TEST-UNEXPECTED-FAIL | automation.py | Exited with code -11 during test run
> INFO | automation.py | Application ran for: 0:00:00.109925
> make: *** [profiledbuild] Error 245

I am guessing that this this due to the same segfault as others have reported(on 64bit). This may be due to our buildsystem occasionally omitting pgo flags. The other approach to doing pgo is to build with
export PGO="-fprofile-generate=/tmp/pgo -fprofile-arc"
export CXX="g++ $PGO"
export CC="cc $PGO"
in your .mozconfig
then run firefox, then build it a second time with PGO=-fprofile-use=/tmp/pgo

It would be cool if someone could figure out how to build firefox with pgo on 64bit.

Revision history for this message
In , Mh+mozilla (mh+mozilla) wrote :

I don't see why the flags would be sometimes ommitted when building on x86-64 and not on x86. My guess is that the problem lies in gcc. Even building with CXX="g++ --coverage" and CC="gcc --coverage" results in the same crashes.

Revision history for this message
In , Tglek (tglek) wrote :

(In reply to comment #72)
> I don't see why the flags would be sometimes ommitted when building on x86-64
> and not on x86. My guess is that the problem lies in gcc. Even building with
> CXX="g++ --coverage" and CC="gcc --coverage" results in the same crashes.

They are occasionally omitted on all platforms. Thanks for the info,

Revision history for this message
In , Tglek (tglek) wrote :
Revision history for this message
In , Tglek (tglek) wrote :

Created an attachment (id=440627)
pgo-friendly compiler flags

this plus fix in bug 560897 = working pgo on x86_64(and likely gcc 4.5)

Revision history for this message
In , Mh+mozilla (mh+mozilla) wrote :

-fprofile-correction in optim flags doesn't sound right

Revision history for this message
In , Tglek (tglek) wrote :

(In reply to comment #76)
> -fprofile-correction in optim flags doesn't sound right

it's not something that would land, just enough to show that pgo works. Sticking those flags in right places is the right thing(tm).

Revision history for this message
In , Tglek (tglek) wrote :

Created an attachment (id=442123)
configury

Revision history for this message
In , Virus-found (virus-found) wrote :

(In reply to comment #78)
> Created an attachment (id=442123) [details]
> configury

The patch is absolutely amazing. Works even with my complicated .mozconfig. Thank you very much! We all have been waiting for it.

Revision history for this message
Kwinz (ldm) wrote :

New patch upsteam.
https://bugzilla.mozilla.org/show_bug.cgi?id=418866
Let's get PGO working now!

Revision history for this message
In , Mh+mozilla (mh+mozilla) wrote :

(From update of attachment 442123)
Pushed as http://hg.mozilla.org/mozilla-central/rev/7a6a20da79ae

Should this bug be closed or is actually enabling pgo build on build servers part of this bug ?

Revision history for this message
In , Tglek (tglek) wrote :

(In reply to comment #80)
> (From update of attachment 442123 [details])
> Pushed as http://hg.mozilla.org/mozilla-central/rev/7a6a20da79ae
>
> Should this bug be closed or is actually enabling pgo build on build servers
> part of this bug ?

Thanks. We'll turn it on via bug 559964.

Changed in xulrunner:
status: Confirmed → Fix Released
Revision history for this message
In , Evgeny Burmentyev (vir-found) wrote :

Hm, it fails to compile now. Regression range is http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=ae1773250d39&tochange=5b3604a3cfbe

gcc -o now.o -c -fomit-frame-pointer -Wall -pthread -march=core2 -O2 -pipe -fPIC -UDEBUG -DMOZILLA_CLIENT=1 -DNDEBUG=1 -DHAVE_VISIBILITY_HIDDEN_ATTRIBUTE=1 -DHAVE_VISIBILITY_PRAGMA=1 -DXP_UNIX=1 -D_GNU_SOURCE=1 -DHAVE_FCNTL_FILE_LOCKING=1 -DLINUX=1 -Di386=1 -DHAVE_LCHOWN=1 -DHAVE_STRERROR=1 -D_REENTRANT=1 -DFORCE_PR_LOG -D_PR_PTHREADS -UHAVE_CVAR_BUILT_ON_SEM -fprofile-use -fprofile-correction -Wcoverage-mismatch -freoder-blocks-and-partition /home/virus_found/abs/firefox/src/mozilla-central-build/nsprpub/config/now.c
cc1: error: unrecognized command line option "-freoder-blocks-and-partition"
make[5]: *** [now.o] Error 1

Revision history for this message
In , Tglek (tglek) wrote :

(In reply to comment #82)

> cc1: error: unrecognized command line option "-freoder-blocks-and-partition"
> make[5]: *** [now.o] Error 1

Sounds like you configured with one compiler and are building with an older one.

Revision history for this message
In , Evgeny Burmentyev (vir-found) wrote :

(In reply to comment #83)
> (In reply to comment #82)
>
> > cc1: error: unrecognized command line option "-freoder-blocks-and-partition"
> > make[5]: *** [now.o] Error 1
>
> Sounds like you configured with one compiler and are building with an older
> one.

I'm sorry, I don't get it. What do you mean by "configured"? I configure with autoconf-2.13.

Revision history for this message
In , Mh+mozilla (mh+mozilla) wrote :

(In reply to comment #83)
> (In reply to comment #82)
>
> > cc1: error: unrecognized command line option "-freoder-blocks-and-partition"
> > make[5]: *** [now.o] Error 1
>
> Sounds like you configured with one compiler and are building with an older
> one.

It just looks like there is a typo... reoder vs. reorder.

Revision history for this message
In , Evgeny Burmentyev (vir-found) wrote :

(In reply to comment #85)
> It just looks like there is a typo... reoder vs. reorder.

Yes, this turns out to be the reason. This was introduced in http://hg.mozilla.org/mozilla-central/rev/b5b016bb7c91

Revision history for this message
In , Evgeny Burmentyev (vir-found) wrote :

Created attachment 449604
fixes two typos, introduced in b5b016bb7c91 commit

Revision history for this message
In , Evgeny Burmentyev (vir-found) wrote :

Comment on attachment 449604
fixes two typos, introduced in b5b016bb7c91 commit

I'm not permitted to change anything in this bug, but adding comments and patches, so this needs to be checked in.

Revision history for this message
In , Ted Mielczarek (ted-mielczarek) wrote :

Comment on attachment 449604
fixes two typos, introduced in b5b016bb7c91 commit

This is fallout from bug 564851. My patch there is correct, but somehow I screwed it up while landing, apparently. I checked in a fix in NSPR CVS.

Changed in xulrunner:
importance: Unknown → Medium
Revision history for this message
Chris Coulson (chrisccoulson) wrote :

This is something we are going to try and get working in Natty

affects: xulrunner-1.9.1 (Ubuntu) → firefox (Ubuntu)
Changed in firefox (Ubuntu):
assignee: nobody → Chris Coulson (chrisccoulson)
Changed in xulrunner-1.9 (Ubuntu):
status: New → Won't Fix
Revision history for this message
Ted Mielczarek (ted-mielczarek) wrote :

We have finally flipped this on for our official Firefox Linux builds using GCC 4.5, see https://bugzilla.mozilla.org/show_bug.cgi?id=559964 . Doing PGO for XULRunner would be a little different, since you'd need a different profiling script.

Revision history for this message
sam tygier (samtygier) wrote :

official firefox 6 builds now have PGO. ubuntu 6.0+build1+nobinonly-0ubuntu0.11.04.1 does not have it.

Revision history for this message
sam tygier (samtygier) wrote :

I ran the peacekeeper benchmark on the official mozilla ff6 build, and ubuntu 6.0+build1+nobinonly-0ubuntu0.11.04.1. on an intel atom N270, with 2GB ram and an SSD.

official ff6 1002
rendering 761
soc networking 844
complex graphics 3687
data 1401
DOM 722
text 1557

ubuntu ff6 888
rendering 544
soc networking 678
complex graphics 3139
data 1436
DOM 618
text 1691

so a bit more than a 10% improvement for me on low end hardware.

Revision history for this message
madbiologist (me-again) wrote :

Is PGO enabled in firefox 7.0~b4+build2+nobinonly-0ubuntu1 in the Ubuntu 11.10 repositories?

Revision history for this message
madbiologist (me-again) wrote :

Is PGO enabled in firefox 7.0+build2+nobinonly-0ubuntu4 in the Ubuntu 11.10 repositories?

Revision history for this message
sam tygier (samtygier) wrote :

no, still built with -Os. you can check by putting about:buildconfig in the url bar.

madbiologist (me-again)
tags: added: lucid maverick natty oneiric
Revision history for this message
greg (grigorig) wrote :

Firefox' Linux release builds have been using PGO for some time now. The difference is quite noticeable, especially on slow systems, such as netbooks. Why is this not used by Ubuntu yet? Firefox is Ubuntu's standard browser and users should have the best experience possible.

What is missing to get this working? Is it still possible to get PGO builds into Precise? I'm willing to help.

Revision history for this message
madbiologist (me-again) wrote :

Note that we should also build with -O3 to get the best out of PGO - see https://bugzilla.mozilla.org/show_bug.cgi?id=590181

@Sam Tygier - re comment #135 - unless I am understanding what I've read in the Mozilla bugs incorrectly, -Os seems to be an alternative to -O1/O2/O3, and as such, is separate to PGO. Is this correct, and if so what should I look for in about:buildconfig to confirm the use of PGO? I couldn't find this in the Mozilla bugs.

Revision history for this message
greg (grigorig) wrote :

You need to check for -fprofile-use.

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Fixed in quantal

Changed in firefox (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
greg (grigorig) wrote :

Are we going to see PGO in updated Firefox releases for precise?

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

You're getting a bit ahead of yourself, it hasn't even built in quantal yet. Perhaps ask me again in 4 months when it's had some proper testing there first

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

I'm turning this back off again due to continual build failures that are only reproducible on the buildd's, and because the the PPA builders are pretty much incapable of building it to help investigate

Changed in firefox (Ubuntu):
status: Fix Released → Triaged
Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Actually, scratch that. We get the same build failure in thunderbird without PGO.

Changed in firefox (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Chris Coulson (chrisccoulson) wrote :

I'm backing this out of quantal. The benchmarks show negligible benefit of turning on PGO in most tests, and there isn't really any perceivable difference at all - certainly not enough to justify a 100% increase in build time

Changed in firefox (Ubuntu Quantal):
status: Fix Released → Won't Fix
Changed in firefox (Ubuntu):
status: Fix Released → Triaged
assignee: Chris Coulson (chrisccoulson) → nobody
no longer affects: firefox-3.0 (Ubuntu)
no longer affects: firefox-3.0 (Ubuntu Quantal)
no longer affects: firefox-3.1 (Ubuntu)
no longer affects: firefox-3.1 (Ubuntu Quantal)
no longer affects: xulrunner-1.9 (Ubuntu)
no longer affects: xulrunner-1.9 (Ubuntu Quantal)
Changed in firefox (Ubuntu Quantal):
assignee: Chris Coulson (chrisccoulson) → nobody
Revision history for this message
madbiologist (me-again) wrote :

Chris - thanks for your efforts on this. I am a little surprised to hear that the benchmarks show negligible benefit of turning on PGO in most tests, given what I have read previously in this bug and in the Mozilla bug reports. However I am not an expert so I guess it is possible. I just have one question - did you also build with -O3 as per comment #137?

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Yes, the build system automatically sets that when you build with PGO

Revision history for this message
zamazan4ik (zamazan4ik) wrote :

Regarding PGO benefits for Firefox, there is a thread: https://groups.google.com/g/mozilla.dev.platform/c/wwO48xXFx0A/m/ztg4i0DYAAAJ that shows measurable improvements from PGO.

Anyway, since the issue is quite old. Is PGO still disabled for Firefox in Ubuntu repositories? Maybe things have changed during these years...

Revision history for this message
Sebastien Bacher (seb128) wrote :

Yes, things changed since the report, Ubuntu provides firefox as a snap now and PGO has been enabled on the amd64 build for a while now
https://github.com/canonical/firefox-snap/commit/7fc10a451

Changed in firefox (Ubuntu):
status: Triaged → Fix Released
Displaying first 40 and last 40 comments. View all 148 comments or add a comment.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.