Please compile Firefox with PGO optimizations
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
XULRunner |
Fix Released
|
Medium
|
|||
firefox (Ubuntu) |
Triaged
|
Wishlist
|
Unassigned | ||
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://
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://
This is what I got with this build https:/
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.
In Mozilla Bugzilla #418866, Ted Mielczarek (ted-mielczarek) wrote : | #1 |
In Mozilla Bugzilla #418866, Ted Mielczarek (ted-mielczarek) wrote : | #2 |
Created an attachment (id=304838)
enable pgo on fx-linux-tbox
There you go.
In Mozilla Bugzilla #418866, Ted Mielczarek (ted-mielczarek) wrote : | #3 |
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.
In Mozilla Bugzilla #418866, Joduinn (joduinn) wrote : | #4 |
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.
In Mozilla Bugzilla #418866, Joduinn (joduinn) wrote : | #5 |
marking P1 as its needed for beta4.
In Mozilla Bugzilla #418866, RobertSayre (sayrer) wrote : | #6 |
I had to back this out because of the following error:
/builds/
/builds/
gmake[4]: *** [jemalloc.o] Error 1
In Mozilla Bugzilla #418866, RobertSayre (sayrer) wrote : | #7 |
Looks like this might be just jemalloc causing problems. We should be able to skip PGO for that.
In Mozilla Bugzilla #418866, Ted Mielczarek (ted-mielczarek) wrote : | #8 |
Created an attachment (id=305385)
skip PGO in jemalloc
This should do it.
In Mozilla Bugzilla #418866, Benjamin Smedberg (Mozilla) [:bs] (benjamin-smedbergs) wrote : | #9 |
(From update of attachment 305385)
File a followup? I imagine PGO for jemalloc would useful if simply for branch-
In Mozilla Bugzilla #418866, Ted Mielczarek (ted-mielczarek) wrote : | #10 |
(From update of attachment 305385)
Filed bug 419470, will mention it in a comment.
In Mozilla Bugzilla #418866, Dsicore (dsicore) wrote : | #11 |
(From update of attachment 305385)
a1.9+=damons
In Mozilla Bugzilla #418866, Ted Mielczarek (ted-mielczarek) wrote : | #12 |
(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.
In Mozilla Bugzilla #418866, Beltzner (beltzner) wrote : | #13 |
Do you guys need a clean window to do this, like with Windows?
In Mozilla Bugzilla #418866, RobertSayre (sayrer) wrote : | #14 |
(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.
In Mozilla Bugzilla #418866, Beltzner (beltzner) wrote : | #15 |
(From update of attachment 304854)
a=beltzner for after beta 4
In Mozilla Bugzilla #418866, Joduinn (joduinn) wrote : | #16 |
*** Bug 384899 has been marked as a duplicate of this bug. ***
In Mozilla Bugzilla #418866, Joduinn (joduinn) wrote : | #17 |
(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)
In Mozilla Bugzilla #418866, Ted Mielczarek (ted-mielczarek) wrote : | #18 |
Rob: do you want to do this? This has been sort of hanging out here for a while.
In Mozilla Bugzilla #418866, Mtschrep (mtschrep) wrote : | #19 |
Given limited time in the release we are punting pgo on mac and linux - let's pick this up in next release
Sorin Ionescu (sorin.ionescu-deactivatedaccount) wrote : Please compile it with PGO optimizations | #20 |
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://
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://
This is what I got with this build https:/
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 |
Sorin Ionescu (sorin.ionescu-deactivatedaccount) wrote : | #21 |
Changed in xulrunner-1.9: | |
importance: | Undecided → Wishlist |
In Mozilla Bugzilla #418866, Ted Mielczarek (ted-mielczarek) wrote : | #22 |
(From update of attachment 304854)
Clearing approval flag to get this off the radar.
In Mozilla Bugzilla #418866, Ted Mielczarek (ted-mielczarek) wrote : | #23 |
(From update of attachment 305385)
Clearing approval flag to get this off the radar.
In Mozilla Bugzilla #418866, Ted Mielczarek (ted-mielczarek) wrote : | #24 |
We may take this in 3.next.
Simon Strandman (nejsimon) wrote : Re: Please compile it with PGO optimizations | #25 |
Building firefox with PGO is actually quite simple. Just add "mk_add_options PROFILE_
Please enable this in Jaunty!
John Vivirito (gnomefreak) wrote : | #26 |
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 |
In Mozilla Bugzilla #418866, Ted Mielczarek (ted-mielczarek) wrote : | #27 |
I wouldn't block on it, though.
In Mozilla Bugzilla #418866, Bzbarsky (bzbarsky) wrote : | #28 |
So I just tried compiling with pgo on Linux. I get:
../../.
/home/bzbarsky/
../../.
../../.
../../.
../../.
../../.
/home/bzbarsky/
/home/bzbarsky/
/home/bzbarsky/
/home/bzbarsky/
collect2: ld returned 1 exit status
gmake[7]: *** [libplaces.so] Error 1
In Mozilla Bugzilla #418866, Reed Loden (reed) wrote : | #29 |
I think Murali was using gcov on Linux lately... maybe he can give some pointers?
In Mozilla Bugzilla #418866, Murali Nandigama (mnandigama) wrote : | #30 |
Preliminary symptoms seems to be issues with LDFLAGS.
I need to check the .mozconfig file to comment further.
In Mozilla Bugzilla #418866, Reed Loden (reed) wrote : | #31 |
bz, please post your .mozconfig for Murali, as per comment #26.
In Mozilla Bugzilla #418866, Bzbarsky (bzbarsky) wrote : | #32 |
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.
In Mozilla Bugzilla #418866, Murali Nandigama (mnandigama) wrote : | #33 |
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
In Mozilla Bugzilla #418866, Ted Mielczarek (ted-mielczarek) wrote : | #34 |
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.
In Mozilla Bugzilla #418866, Bzbarsky (bzbarsky) wrote : | #35 |
> export LDFLAGS="-lgcov -static-libgcc"
I can try that, but sounds like https:/
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.
In Mozilla Bugzilla #418866, L. David Baron (dbaron) wrote : | #36 |
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?
In Mozilla Bugzilla #418866, Ted Mielczarek (ted-mielczarek) wrote : | #37 |
(In reply to comment #31)
> > export LDFLAGS="-lgcov -static-libgcc"
>
> I can try that, but sounds like
> https:/
> 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://
In Mozilla Bugzilla #418866, Reed Loden (reed) wrote : | #38 |
(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.
In Mozilla Bugzilla #418866, Bzbarsky (bzbarsky) wrote : | #39 |
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-
Changed in firefox-3.0: | |
status: | New → Confirmed |
Changed in xulrunner-1.9: | |
status: | Incomplete → Confirmed |
John Vivirito (gnomefreak) wrote : | #40 |
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.
John Vivirito (gnomefreak) wrote : | #41 |
Can you please file a bug upstream to ask them as a wishlist bug to provide PGO builds since at this time they do not build with PGO enabled. Please post the link here so we can track it.
thanks
Festor (festor-deactivatedaccount) wrote : | #42 |
John, I don't understand what you want say.
If Arch Linux has a Firefox with PGO, what problem are there in Ubuntu?
John Vivirito (gnomefreak) wrote : Re: [Bug 213708] Re: Please compile Firefox with PGO optimizations | #43 |
On 03/06/2009 11:39 AM, Surfaz Gemon Meme wrote:
> John, I don't understand what you want say.
>
> If Arch Linux has a Firefox with PGO, what problem are there in Ubuntu?
>
It would be best if upstream shipped with PGO however i'm sure we can
but IMHO it would be best that way. You can ask asac in
#ubuntu-mozillateam but i'm fairly sure he would rather it be done upstream.
--
Sincerely Yours,
John Vivirito
https:/
https:/
Linux User# 414246
"How can i get lost, if i have no where to go"
-- Metallica from Unforgiven III
Festor (festor-deactivatedaccount) wrote : | #44 |
2009/3/6 John Vivirito <email address hidden>
> It would be best if upstream shipped with PGO however i'm sure we can
> but IMHO it would be best that way. You can ask asac in
> #ubuntu-mozillateam but i'm fairly sure he would rather it be done
> upstream.
>
Asac told me that he will try build debs with PGO enabled.
I don't understand why this feature should be came enable from upstream
since is a packaging task.
The only problem that I found when I trying to enable PGO in ubuntu firefox
package is in debian/rules file, which don't uses the parameters of
mozconfig file. Then I don't know where I should put 'mk_add_options
PROFILE_GEN_SCRIPT'
Alexander Sack (asac) wrote : | #45 |
the main issue is that we need a minimal test webbrowser or something to properly PGO optimize xulrunner during build.
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 |
Alexander Sack (asac) wrote : | #46 |
meaning: PGO building firefox wont help much as most is in xul that needs to be optimized.
Changed in firefox-3.1: | |
importance: | Undecided → Wishlist |
status: | New → Triaged |
Alexander Sack (asac) wrote : | #47 |
doing this for ffox 3.0 packages is out of reach. targetting it for ffox 3.1/xul 1.9.1 combo instead.
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 |
Festor (festor-deactivatedaccount) wrote : | #48 |
Please, then answer here too:
Simon Strandman (nejsimon) wrote : | #49 |
@john: Sorry for not replying earlier, I forgot to subscribe to this bug. The situation with firefox/xulrunner is making things a bit difficult. I'll see if I can figure something out.
Craig (candrews-integralblue) wrote : | #50 |
I can't help but notice that, at the top, asac has marked that Jaunty won't be getting PGO for Xulrunner or Firefox 3.0 or 3.1/3.5. Is this true? Mozilla's Linux binaries are PGO enabled... isn't it good enough that upstream does it, as well as other distros?
If Jaunty really won't be getting PGO-enabled builds... if I may be so bold.. why not? Thanks
Reed Loden (reed) wrote : | #51 |
On Mon, 23 Mar 2009 02:17:34 -0000
Craig <email address hidden> wrote:
> Mozilla's Linux binaries are PGO enabled... isn't it good enough
> that upstream does it, as well as other distros?
Uh, Mozilla's Linux binaries are not PGO enabled.
https:/
tracking getting the Linux builds to use PGO.
Craig (candrews-integralblue) wrote : | #52 |
Thank you Reed. I was had read (and should have linked to) another site that claimed upstream's binaries were PGO compiled now. I sincerely apologize for this mistake! :-/
John Vivirito (gnomefreak) wrote : | #53 |
On 03/22/2009 10:17 PM, Craig wrote:
> I can't help but notice that, at the top, asac has marked that Jaunty
> won't be getting PGO for Xulrunner or Firefox 3.0 or 3.1/3.5. Is this
> true? Mozilla's Linux binaries are PGO enabled... isn't it good enough
> that upstream does it, as well as other distros?
>
> If Jaunty really won't be getting PGO-enabled builds... if I may be so
> bold.. why not? Thanks
>
This cant land in 3.0.x it will however be in 3.5 in Jaunty repos, when
well that is up to upstream but likely to be next major pre release.
It can only be applied to 3.5 and 3.6 since 3.0.x is final release and
only security fixes will land there.
we dont use Mozilla binaries we use their source to produce our own
binaries.
--
Sincerely Yours,
John Vivirito
https:/
https:/
Linux User# 414246
"How can i get lost, if i have no where to go"
-- Metallica from Unforgiven III
Changed in xulrunner: | |
status: | Unknown → Confirmed |
John Vivirito (gnomefreak) wrote : | #54 |
This is a xulrunner fix not firefox
Changed in firefox-3.1 (Ubuntu): | |
status: | Triaged → Invalid |
status: | Invalid → Won't Fix |
In Mozilla Bugzilla #418866, B-jacques (b-jacques) wrote : | #55 |
Created an attachment (id=372234)
Use -fprofile-
I tried Mozilla's PGO build and at one point or another, GCC would bail out complaining about corrupted profiling files, much like the issue that led to patch #305385. It turns out that GCC's profiling support was written without taking threaded applications into account, leading to inconsistencies in profiling information, which would then cause GCC to error out when reading them later.
In GCC-4.4, a new compiler flag was added to solve this issue:
"When using -fprofile-generate with a multi-threaded program, the profile counts may be slightly wrong due to race conditions. The new -fprofile-
This patch adds a the -fprofile-
(I was unable to reproduce bz's linking issue.)
In Mozilla Bugzilla #418866, B-jacques (b-jacques) wrote : | #56 |
(From update of attachment 372234)
Several rebuilds later I ran into the jemalloc build error. So clearly there is more going on here than meets the eye.
Michael Marley (mamarley) wrote : | #57 |
Will it be possible to compile Firefox with PGO for Karmic?
Alexander Sack (asac) wrote : Re: [Bug 213708] Re: Please compile Firefox with PGO optimizations | #58 |
On Thu, Apr 30, 2009 at 11:59:17PM -0000, Michael Marley wrote:
> Will it be possible to compile Firefox with PGO for Karmic?
>
Yes, we have this on on our list. Contributions welcome.
- Alexander
Michael Marley (mamarley) wrote : | #59 |
I have tried building a package with PGO, but I am not sure how that would interact with the separation between Firefox and XULRunner, so I am not quite sure where to start.
Alexander Sack (asac) wrote : | #60 |
so the idea is to start xulrunner _instead_ of firefox as a minimal browser xulapp that connects to the PGO testcase proxy.
Samat Jain (tamasrepus) wrote : | #61 |
AFAIK, for PGO in Firefox only the xulrunner package needs to be compiled. The "firefox-*" packages only contain XUL, Javascript, and other non-compiled resources.
Michael: what did you need to change in the debian/rules file to make PGO work? All build instructions I've found use client.mk; Ubuntu uses the Makefile in the top-level source directory which doesn't have a "profiledbuild" target. I don't understand the Firefox build process to understand how these files interact with each other and needs to be modified in the Ubuntu package to make this work.
In Mozilla Bugzilla #418866, Drdarkraven (drdarkraven) wrote : | #62 |
TEST-UNEXPECTED
INFO | (automation.py) | Application ran for: 0:00:00.465828
make: *** [profiledbuild] Error 245
Changed in xulrunner (Debian): | |
status: | Unknown → New |
spitfire (mieszkoslusarczyk) wrote : | #63 |
How about karmic, xulrunner-
Changed in xulrunner-1.9 (Ubuntu): | |
status: | Won't Fix → New |
Alexander Sack (asac) wrote : | #64 |
this i on our radar for karmic. yes.
In Mozilla Bugzilla #418866, Blasse (koralik) wrote : | #65 |
I've got the same error on x86-64 with gcc4.4.0 no matter what mozconfig options I use.
In Mozilla Bugzilla #418866, Nephyrin (nephyrin) wrote : | #66 |
I also get the TEST-UNEXPECTED
I get this on both 4.3 and 4.4, i haven't tested <=4.2
In Mozilla Bugzilla #418866, Scott Ritchie (scottritchie) wrote : | #67 |
I ran into an identical gcov issue while trying to build Wine on Ubuntu 9.04: http://
I'm beginning to think there's a deeper problem exposing this for both of us, like something within gcc and gcov
This thread (about another gcov problem): http://
> I was able to reproduce this only by having a mismatch of GCC built
> libraries. When I used a GCC 3.4.6 built TAU/PDT, I got:
>
> % tau_cc.sh -fprofile-arcs -fprofile-generate foo.c
>
> ...
> : undefined reference to `__gcov_
>
> However, when I rebuilt TAU,PDT, and then used it, I had no problem.
>
> When I'd used all 3.4.6 built libraries, it all worked as well, only with
> the mismatch could I reproduce it.
>
In Mozilla Bugzilla #418866, Ted Mielczarek (ted-mielczarek) wrote : | #68 |
It certainly sounds like a busted GCC or gcov or something, not at all a problem with our codebase.
In Mozilla Bugzilla #418866, Blasse (koralik) wrote : | #69 |
TEST-UNEXPECTED
INFO | (automation.py) | Application ran for: 0:00:00.465828
make: *** [profiledbuild] Error 245
Seems to connected with pgo script. When I'm using simple shell script, that just start and close ff, it builds just fine.
In Mozilla Bugzilla #418866, Ted Mielczarek (ted-mielczarek) wrote : | #70 |
The PGO script simply sets up the environment and launches the browser. The "code -11" there is the browser crashing.
In Mozilla Bugzilla #418866, Blasse (koralik) wrote : | #71 |
Strange, as the same config give woring non-pgo build, also as I mentioned before, shell script produces working pgo build. So what's wrong? :)
In Mozilla Bugzilla #418866, Nephyrin (nephyrin) wrote : | #72 |
There may be multiple issues at play, but when i was getting the code -11, running the profile-generate binary manually or through any script segfaulted. Non-pgo builds work fine for me, it's only the profile-generation binary that has issues. Skipping that and doing the final build without profile data negates the purpose of PGO.
Its possible your script is running the wrong binary, not stopping the build should it fail, or you're simply running into a different issue.
I've tried gcc 4.3 and 4.4, 4.4's profile-correction, enabling and disabling optimization, bare minimum mozconfigs, central and 191src. I used to run nightly builds with pgo on, and they just broke one day. I haven't gotten one to compile since.
In Mozilla Bugzilla #418866, Scott Ritchie (scottritchie) wrote : | #73 |
Here's an issue I found from googling for gcov symbol errors:
http://
---
I just spent an incredible amount of time debugging a very similar error.
Here's what I learned:
* You have to pass -fprofile-arcs -ftest-coverage when compiling.
* You have to pass -fprofile-arcs when linking.
* You can still get weird linker errors when linking. They'll look like
this: libname.
constructors keyed to long_name_
This means that gconv's having problem with one of your compiler-generated
constructors (in my case, a copy-constructor). Check the function mentioned in
the error message, see what kinds of objects it copy-constructs, and see if any
of those classes doesn't have a copy constructor. Add one, and the error will
go away.
Edit: Whether or not you optimize can also affect this. Try turing on /
switching off optimizations if you're having problems with it.
---
This may be what's causing the problem in both Wine and Firefox.
In Mozilla Bugzilla #418866, RobertSayre (sayrer) wrote : | #74 |
fantastic
In Mozilla Bugzilla #418866, Bzbarsky (bzbarsky) wrote : | #75 |
For my error, maybe the issue is the nsTArray use on MorkColumn (which has no copy ctor)? It'd suck if gcov required explicit copy ctors on everything we use nsTArray on. :(
In Mozilla Bugzilla #418866, Scott Ritchie (scottritchie) wrote : | #76 |
Try fixing just one of the copy constructors and see if gcc errors in a different place - if so, then we'll indeed need one for every function :(
In Mozilla Bugzilla #418866, Brendan-mozilla (brendan-mozilla) wrote : | #77 |
Why am I reading MorkAnything in 2009?
/be
In Mozilla Bugzilla #418866, Bzbarsky (bzbarsky) wrote : | #78 |
Because you want to be able to migrate Firefox 2 user profiles?
In Mozilla Bugzilla #418866, Gavin Sharp (gavin-sharp) wrote : | #79 |
MorkReader (not Mork itself) is still used for import from pre-Firefox 3.0 history.
In Mozilla Bugzilla #418866, Shaver (shaver) wrote : | #80 |
(Personally, I don't mind if FF-after-3.5, or even FF 3.5.1 can't import history from FF 2.0.)
In Mozilla Bugzilla #418866, Mike Connor (mconnor) wrote : | #81 |
We should get that on file... I'm not opposed to killing migration-
Michael Marley (mamarley) wrote : | #82 |
Now that Firefox 3.5 is out, it would probably be a good time to get started on this. I have been playing around with the source code, trying to get it to compile with PGO, but I can't find any way to make that work. It seems as if Ubuntu is using a completely different build system than the default.
Othmane Moustaouda (othmane) wrote : | #83 |
@Micheal Marley
Me too I've tried to compile it with PGO under Ubuntu by following the tutorial from Mozilla site, but it seems doesn't work...
[Little OT]
Will there be Firefox 3.5 packages for Jaunty?
[/Little OT]
Michael Marley (mamarley) wrote : | #84 |
(In response to little OT)
I don't know about officially, but I have some almost-final (post-RC2) builds of Firefox 3.5 for Jaunty in my PPA. https:/
Michael Rooney (mrooney) wrote : Re: [Bug 213708] Re: Please compile Firefox with PGO optimizations | #85 |
On Mon, Jul 6, 2009 at 10:26 AM, Othmane Moustaouda<email address hidden> wrote:
> Will there be Firefox 3.5 packages for Jaunty?
There has been for a while, "firefox-3.5". Currently it is a beta 4
build from late March (though is up to date in Karmic) but is planned
to be upgraded in the near future. Also if you want bleeding edge
there is a daily builds PPA provided by Mozilla.
John Vivirito (gnomefreak) wrote : | #86 |
On 07/06/2009 01:57 PM, Michael Marley wrote:
> (In response to little OT)
>
> I don't know about officially, but I have some almost-final (post-RC2)
> builds of Firefox 3.5 for Jaunty in my PPA.
> https:/
>
Jaunty should have final 3.5. The version in Jaunty is
3.5+nobinonly-
--
Sincerely Yours,
John Vivirito
https:/
https:/
Linux User# 414246
"How can i get lost, if i have no where to go"
-- Metallica from Unforgiven III
In Mozilla Bugzilla #418866, tqft (ianburrows-au) wrote : | #87 |
make -f client.mk profiledbuild not working at present
/media/
/media/
nsHttpAuthManag
make[9]: *** [nsHttpConnecti
make -f client.mk build working
Last time I built successfully was about last Thursday or Friday (am at GMT+10) here
In Mozilla Bugzilla #418866, Ted Mielczarek (ted-mielczarek) wrote : | #88 |
This looks like a GCC problem. I think given the sheer number of comments here, GCC's PGO is so buggy/fickle as to be unusable.
In Mozilla Bugzilla #418866, tqft (ianburrows-au) wrote : | #89 |
And today
make -f client.mk profiledbuild
is working
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2a1pre) Gecko/20090723 Minefield/3.6a1pre ID:20090723105705
It did complain and stop in the configure section about libiw-dev being missing (ubuntu here and apt-get fixed that) but I don't know if that is related to the previous failure.
In Mozilla Bugzilla #418866, tqft (ianburrows-au) wrote : | #90 |
Profiledbuild died again today 1245pm Monday 3 Aug 2009 Aust Eastern Std Time (GMT +10). Don't know when the change to make it fail happened. Sometime between now and last Thursday.
/media/
/media/
/media/
/media/
/media/
make[7]: *** [nsEventQueue.o] Error 1
make[7]: *** Waiting for unfinished jobs....
/media/
/media/
make[7]: Leaving directory `/media/
make[6]: *** [libs] Error 2
make[6]: Leaving directory `/media/
make[5]: *** [libs_tier_xpcom] Error 2
make[5]: Leaving directory `/media/
make[4]: *** [tier_xpcom] Error 2
make[4]: Leaving directory `/media/
make[3]: *** [default] Error 2
make[3]: Leaving directory `/media/
make[2]: *** [build] Error 2
make[2]: Leaving directory `/media/
make[1]: *** [build] Error 2
make[1]: Leaving directory `/media/
make: *** [profiledbuild] Error 2
ordinary build works.
Is there any chance of having an official pgo build attempted once per day, so that there will exist a body of data about how and when it fails?
Michael Marley (mamarley) wrote : | #91 |
What kind of progress is being made on getting this ready for Karmic? Will a FFE be necessary?
John Vivirito (gnomefreak) wrote : Re: [Bug 213708] Re: Please compile Firefox with PGO optimizations | #92 |
On 09/16/2009 05:38 PM, Michael Marley wrote:
> What kind of progress is being made on getting this ready for Karmic?
> Will a FFE be necessary?
>
Upstream has not completed this yet IIRC. We are waiting for
them to finish and we will roll it out on the release they fix
this on. not sure what we will do with proir versions but im
ffairly sure we will not apply it to them.
--
Sincerely Yours,
John Vivirito
https:/
https:/
Linux User# 414246
"How can i get lost, if i have no where to go"
-- Metallica from Unforgiven III
Michael Marley (mamarley) wrote : | #93 |
Is there any progress here? Might this be easier to do now that Firefox and XULRunner are packaged together?
Mathias Burén (mathias-buren) wrote : | #94 |
What's the status on this? Are there any reasons not to use pgo?
SoWeLie (sowelie) wrote : | #95 |
Any progress on this? It is pretty embarrassing how slow Firefox on Ubuntu is compared to Windows.
Majki-Fajki (miles-teg) wrote : | #96 |
On Arch Linux it's swings :))
In Mozilla Bugzilla #418866, Tglek (tglek) wrote : | #97 |
(In reply to comment #57)
> This looks like a GCC problem. I think given the sheer number of comments here,
> GCC's PGO is so buggy/fickle as to be unusable.
That may be, but we have enough gcc-brains in mozilla now that we have little excuse to not try to deploy it. Here is why.
I am building with gcc 4.4.3 on fedora, didn't run into any issues mentioned in this bug(may be luck).
Here are some cold startup numbers. First is the name where ordered=
firefox.stock: 2515ms 49452
firefox.ordered 1919ms 45344
firefox.static 2321ms 49616
firefox.
firefox.static.pgo 1619ms 38436
The improvements in startup stem completely from improved seeking behavior. There is a 3x reduction in pagefaults between the slowest and fastest build.
The reason why pgo is fast(as far as I can tell it does not lay out the binary chronologically) is because -freorder-
Unfortunately I haven't yet figured out how to chronologically order symbols in a pgo build, that would result in the fastest-
Conclusion: PGO wins are massive and very real. Because of -freorder-
Aside: All this made me wonder if it's possible to build on top of -freorder-
In Mozilla Bugzilla #418866, Blizzard (blizzard) wrote : | #98 |
I think Taras just signed up.
In Mozilla Bugzilla #418866, Mh+mozilla (mh+mozilla) wrote : | #99 |
FWIW, all I got from trying to build with PGO is a crash during libxul initialization when the profile is being run, i.e. after the first build, not the second one. And the crash has a very nice mozilla unrelated backtrace:
#0 0x00007ffff40807c1 in strlen () from /lib/libc.so.6
#1 0x00007ffff6823a92 in __gcov_init () from /tmp/xulrunner/
#2 0x00007ffff6824f56 in __do_global_
#3 0x00007ffff51888ab in _init () from /tmp/xulrunner/
#4 0x00007fffffffe908 in ?? ()
#5 0x00007ffff7dee429 in ?? () from /lib64/
#6 0x00007ffff7dee5af in ?? () from /lib64/
#7 0x00007ffff7de1b2a in ?? () from /lib64/
#8 0x0000000000000001 in ?? ()
#9 0x00007fffffffeb8c in ?? ()
#10 0x0000000000000000 in ?? ()
I haven't tried on x86, though, only on x86-64. But that means PGO already doesn't work everywhere.
I do think, however, that what could be more interesting than PGO (and would work better) is profile guided code improvement. The idea would be to hint the compiler that chunks of code are likely or unlikely to be run, depending on data gathered from the profile, using __builtin_expect() for gcc, for example. I think that would make at the very least 50% (if not near 100%) of what PGO does, without having to build twice, and without resorting on gcc working properly for PGO.
In Mozilla Bugzilla #418866, Mh+mozilla (mh+mozilla) wrote : | #100 |
Confirmed, with the same gcc options, pgo works on x86 but not on x86-64.
In Mozilla Bugzilla #418866, Tglek (tglek) wrote : | #101 |
(In reply to comment #63)
> Confirmed, with the same gcc options, pgo works on x86 but not on x86-64.
Which version of gcc? I can't seem to get anything other than 4.4 to build stuff.
In Mozilla Bugzilla #418866, Jfelps (jfelps) wrote : | #102 |
I get basically the same crash after the first build on x86-64, with gcc 4.4.3.
In Mozilla Bugzilla #418866, Mh+mozilla (mh+mozilla) wrote : | #103 |
> Which version of gcc? I can't seem to get anything other than 4.4 to build
> stuff.
4.4.3 from debian for both x86 and x86-64.
In Mozilla Bugzilla #418866, Tglek (tglek) wrote : | #104 |
Figured out the problem. profiledbuild doesn't work on GCC 4.3 because the build system occasionally drops the -fprofile-generate flags(ie while building parts of nss) which then confuses things at link time(newer compilers seem to be more lenient there).
Unfortunately even if one does pass the pgo options everywhere, the second build fails because gcc 4.3 does not have -Wcoverage-
Scott Ritchie (scottritchie) wrote : | #105 |
Why doesn't Arch get the build failures mentioned in the upstream bug report?
In Mozilla Bugzilla #418866, Richard (shiningarcanine) wrote : | #106 |
Taras, I am having difficulty reproducing your results. I am using a Slackware Linux user's build script to build firefox with PGO enabled:
I made some improvements to her script and contributed them back to the thread at linuxquestions.org, however, I am unable to reproduce any improvements in Sun Spider benchmarks when comparing her script's PGO-build to the system Firefox, even if both are patched to enable TraceMonkey support on 64-bit Linux.
I think my difficulty is because -freorder-
In Mozilla Bugzilla #418866, Tglek (tglek) wrote : | #107 |
(In reply to comment #68)
> I think my difficulty is because -freorder-
> passed to GCC. What are you doing to pass -freorder-
> during the initial build?
in configure.in change
MOZ_OPTIMIZE_
MOZ_OPTIMIZE_
Those pgo instructions are a bit crazy. See https:/
In Mozilla Bugzilla #418866, Richard (shiningarcanine) wrote : | #108 |
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=
INFO | automation.py | Application pid: 28455
TEST-UNEXPECTED
INFO | automation.py | Application ran for: 0:00:00.109925
make: *** [profiledbuild] Error 245
It has been like this whenever I would try doing PGO-builds over the past few years. Googling the error message gives me plenty of people with the same issue, but no solutions.
In Mozilla Bugzilla #418866, Tglek (tglek) wrote : | #109 |
(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=
> python
> /home/richard/
> INFO | automation.py | Application pid: 28455
> TEST-UNEXPECTED
> 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-
export CXX="g++ $PGO"
export CC="cc $PGO"
in your .mozconfig
then run firefox, then build it a second time with PGO=-fprofile-
It would be cool if someone could figure out how to build firefox with pgo on 64bit.
In Mozilla Bugzilla #418866, Mh+mozilla (mh+mozilla) wrote : | #110 |
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.
In Mozilla Bugzilla #418866, Tglek (tglek) wrote : | #111 |
(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,
In Mozilla Bugzilla #418866, Tglek (tglek) wrote : | #112 |
files the x86_64 gcc bug as http://
In Mozilla Bugzilla #418866, Tglek (tglek) wrote : | #113 |
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)
In Mozilla Bugzilla #418866, Mh+mozilla (mh+mozilla) wrote : | #114 |
-fprofile-
In Mozilla Bugzilla #418866, Tglek (tglek) wrote : | #115 |
(In reply to comment #76)
> -fprofile-
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).
In Mozilla Bugzilla #418866, Tglek (tglek) wrote : | #116 |
Created an attachment (id=442123)
configury
In Mozilla Bugzilla #418866, Virus-found (virus-found) wrote : | #117 |
(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.
Kwinz (ldm) wrote : | #118 |
New patch upsteam.
https:/
Let's get PGO working now!
In Mozilla Bugzilla #418866, Mh+mozilla (mh+mozilla) wrote : | #119 |
(From update of attachment 442123)
Pushed as http://
Should this bug be closed or is actually enabling pgo build on build servers part of this bug ?
In Mozilla Bugzilla #418866, Tglek (tglek) wrote : | #120 |
(In reply to comment #80)
> (From update of attachment 442123 [details])
> Pushed as http://
>
> 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 |
In Mozilla Bugzilla #418866, Evgeny Burmentyev (vir-found) wrote : | #121 |
Hm, it fails to compile now. Regression range is http://
gcc -o now.o -c -fomit-
cc1: error: unrecognized command line option "-freoder-
make[5]: *** [now.o] Error 1
In Mozilla Bugzilla #418866, Tglek (tglek) wrote : | #122 |
(In reply to comment #82)
> cc1: error: unrecognized command line option "-freoder-
> make[5]: *** [now.o] Error 1
Sounds like you configured with one compiler and are building with an older one.
In Mozilla Bugzilla #418866, Evgeny Burmentyev (vir-found) wrote : | #123 |
(In reply to comment #83)
> (In reply to comment #82)
>
> > cc1: error: unrecognized command line option "-freoder-
> > 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.
In Mozilla Bugzilla #418866, Mh+mozilla (mh+mozilla) wrote : | #124 |
(In reply to comment #83)
> (In reply to comment #82)
>
> > cc1: error: unrecognized command line option "-freoder-
> > 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.
In Mozilla Bugzilla #418866, Evgeny Burmentyev (vir-found) wrote : | #125 |
(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://
In Mozilla Bugzilla #418866, Evgeny Burmentyev (vir-found) wrote : | #126 |
Created attachment 449604
fixes two typos, introduced in b5b016bb7c91 commit
In Mozilla Bugzilla #418866, Evgeny Burmentyev (vir-found) wrote : | #127 |
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.
In Mozilla Bugzilla #418866, Ted Mielczarek (ted-mielczarek) wrote : | #128 |
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 |
Chris Coulson (chrisccoulson) wrote : | #129 |
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 |
Ted Mielczarek (ted-mielczarek) wrote : | #130 |
We have finally flipped this on for our official Firefox Linux builds using GCC 4.5, see https:/
sam tygier (samtygier) wrote : | #131 |
official firefox 6 builds now have PGO. ubuntu 6.0+build1+
sam tygier (samtygier) wrote : | #132 |
I ran the peacekeeper benchmark on the official mozilla ff6 build, and ubuntu 6.0+build1+
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.
madbiologist (me-again) wrote : | #133 |
Is PGO enabled in firefox 7.0~b4+
madbiologist (me-again) wrote : | #134 |
Is PGO enabled in firefox 7.0+build2+
sam tygier (samtygier) wrote : | #135 |
no, still built with -Os. you can check by putting about:buildconf
tags: | added: lucid maverick natty oneiric |
greg (grigorig) wrote : | #136 |
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.
madbiologist (me-again) wrote : | #137 |
Note that we should also build with -O3 to get the best out of PGO - see https:/
@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:buildconf
greg (grigorig) wrote : | #138 |
You need to check for -fprofile-use.
Chris Coulson (chrisccoulson) wrote : | #139 |
Fixed in quantal
Changed in firefox (Ubuntu): | |
status: | Triaged → Fix Released |
greg (grigorig) wrote : | #140 |
Are we going to see PGO in updated Firefox releases for precise?
Chris Coulson (chrisccoulson) wrote : | #141 |
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
Chris Coulson (chrisccoulson) wrote : | #142 |
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 |
Chris Coulson (chrisccoulson) wrote : | #143 |
Actually, scratch that. We get the same build failure in thunderbird without PGO.
Changed in firefox (Ubuntu): | |
status: | Triaged → Fix Released |
Chris Coulson (chrisccoulson) wrote : | #144 |
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 |
madbiologist (me-again) wrote : | #145 |
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?
Chris Coulson (chrisccoulson) wrote : | #146 |
Yes, the build system automatically sets that when you build with PGO
This was actually ok before bug 361343. There was another older bug where I made the existing PGO support work again.