Created attachment 355402 [details, diff] firefox-23.0-pgo-bug_474978_c7-mod.patch A modification of the patch from bug 474978 comment #7 is all it takes to build www-client/firefox-23.0 with profile guided optimization. I am attaching the patch here for anyone interested (to be dropped into /etc/portage/patches/www-client/firefox-23.0). I am very aware that, at the moment, profile guided optimization is unsupported here. Therefore I have filed a bug upstream — https://bugzilla.mozilla.org/show_bug.cgi?id=902885 — to improve the situation there. My full build logs have also been attached there. For ease of searching, however, here are the error messages I got before applying the full patch (the latter of them is with a partial patch of only client.mk). -------------------------- MOZ_PGO_INSTRUMENTED=1 JARLOG_FILE=jarlog/en-US.log EXTRA_TEST_ARGS=10 make -C obj-x86_64-unknown-linux-gnu pgo-profile-run make[1]: Entering directory `/var/tmp/portage/www-client/firefox-23.0/work/mozilla-release/obj-x86_64-unknown-linux-gnu' make[1]: *** No rule to make target `pgo-profile-run'. Stop. -------------------------- make[1]: Entering directory `/var/tmp/portage/www-client/firefox-23.0/work/mozilla-release/obj-x86_64-unknown-linux-gnu' python ./_profile/pgo/profileserver.py 10 Traceback (most recent call last): File "./_profile/pgo/profileserver.py", line 18, in <module> from automation import Automation File "/var/tmp/portage/www-client/firefox-23.0/work/mozilla-release/obj-x86_64-unknown-linux-gnu/_profile/pgo/automation.py", line 36, in <module> import mozcrash ImportError: No module named mozcrash -------------------------- I guess a patch
Created attachment 355404 [details] emerge --info www-client/firefox
(The last sentence of comment #1 continues here) ... I guess a patch could be incorporated into our tree, until anything moves upstream (which may take many weeks or months till a major version bump).
Created attachment 355418 [details, diff] reworked firefox-22.0 fix attached user patch is a bit better (it does not remove crash handlers from python web server for pgo profile build) but anyway seems to be dirty the proper way is a symlink mozbase in ${S}/obj-<arch>/build/pgo to ${S}/testing/mozbase at compile time
The mozilla team does not have the resources to handle PGO builds, as always closing wontfix. As always please search for a duplicate before you open a new bug.
Hi, Is there anywhere I can find a version of this patch for firefox-24?
Created attachment 360188 [details, diff] Here's my patch for firefox-24.0. The additions to profileserver.py seem quite hackish, but they work.
Created attachment 362638 [details, diff] Here's the corresponding patch for ~www-client/firefox-25.0. Almost identical to the one for firefox-24.0.
Created attachment 365284 [details, diff] Almost identical patch for www-client/firefox-26.0 is here.
Thanks!
Created attachment 369974 [details, diff] A more future-proof PGO patch for www-client/firefox-27.0
Created attachment 373248 [details, diff] Practically the same patch for www-client/firefox-28.0
Exactly the same patch as for 28.0 applies for www-client/firefox-29.0.
Created attachment 378962 [details, diff] A simplified PGO patch for www-client/firefox-30.0 For Firefox 30.0 the old patches did not do their job completely. There was a deeper problem: the Python interpreter, that Firefox's makefiles used for the pgo-profile-run target, was the system-selected Python and not the virtualenv one that the Firefox's build scripts set up. By selecting the proper, virtualenv Python, we can now get rid of most of the patch, although one line still remains.
Exactly the same simple patch as for 30.0 applies for www-client/firefox-31.0.
Created attachment 384476 [details, diff] A simple PGO patch for www-client/firefox-32.0 The same patch also applies for Firefox 32.0, although with some offset. Here is a clean PGO patch for www-client/firefox-32.0.
(In reply to Siim Ainsaar from comment #15) > Created attachment 384476 [details, diff] [details, diff] > A simple PGO patch for www-client/firefox-32.0 > > The same patch also applies for Firefox 32.0, although with some offset. > Here is a clean PGO patch for www-client/firefox-32.0. Did you check if this patch is actually still required? I just test-ran firefox-32.0 with USE="pgo" and I had no build failures...
Created attachment 386914 [details, diff] An anologous PGO patch for www-client/firefox-33.0 Indeed, Firefox 32.0.* did not need the patch, but 33.0 needs an analogous patch again.
Created attachment 400862 [details, diff] A new PGO patch for www-client/firefox-37.0.1 The same patch has been working until firefox 36.0.4, but not so for 37.0.1: MOZILLA_DIR=$(TOPSRCDIR) was missing from the patched line for it. How to do such additions automatically in the future? Why are they needed at all? As it appears, the makefile named "testsuite-targets.mk" should be automatically included, but it isn't, because ENABLE_TESTS is false. However, I do not want to compile all the testsuite, but just the PGO profiling tests. Therefore the simplest solution is in the attached patch: I just remove this check for the ENABLE_TESTS variable.
*** This bug has been marked as a duplicate of bug 388585 ***