Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 480258 - www-client/firefox-23.0 with PGO
Summary: www-client/firefox-23.0 with PGO
Status: RESOLVED DUPLICATE of bug 388585
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2013-08-08 13:21 UTC by Siim Ainsaar
Modified: 2016-08-12 03:24 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
firefox-23.0-pgo-bug_474978_c7-mod.patch (firefox-23.0-pgo-bug_474978_c7-mod.patch,2.69 KB, patch)
2013-08-08 13:21 UTC, Siim Ainsaar
Details | Diff
emerge --info www-client/firefox (emerge_--info_www-client_firefox,8.12 KB, text/plain)
2013-08-08 13:22 UTC, Siim Ainsaar
Details
reworked firefox-22.0 fix (ffox-pgo.patch,1.29 KB, patch)
2013-08-08 15:40 UTC, victor romanchuk
Details | Diff
Here's my patch for firefox-24.0. (firefox-24.0-pgo.patch,4.60 KB, patch)
2013-10-05 20:40 UTC, Siim Ainsaar
Details | Diff
Here's the corresponding patch for ~www-client/firefox-25.0. (firefox-25.0_pgo.patch,4.79 KB, patch)
2013-11-05 21:03 UTC, Siim Ainsaar
Details | Diff
Almost identical patch for www-client/firefox-26.0 is here. (firefox-26.0_pgo.patch,4.87 KB, patch)
2013-12-13 22:37 UTC, Siim Ainsaar
Details | Diff
A more future-proof PGO patch for www-client/firefox-27.0 (firefox-27.0_pgo.patch,2.66 KB, patch)
2014-02-09 19:46 UTC, Siim Ainsaar
Details | Diff
Practically the same patch for www-client/firefox-28.0 (firefox-28.0_pgo.patch,2.66 KB, patch)
2014-03-22 08:43 UTC, Siim Ainsaar
Details | Diff
A simplified PGO patch for www-client/firefox-30.0 (firefox-30.0_pgo.patch,927 bytes, patch)
2014-06-15 18:23 UTC, Siim Ainsaar
Details | Diff
A simple PGO patch for www-client/firefox-32.0 (firefox-32.0_pgo.patch,927 bytes, patch)
2014-09-09 19:00 UTC, Siim Ainsaar
Details | Diff
An anologous PGO patch for www-client/firefox-33.0 (firefox-33.0_pgo.patch,980 bytes, patch)
2014-10-18 20:41 UTC, Siim Ainsaar
Details | Diff
A new PGO patch for www-client/firefox-37.0.1 (firefox-37.0.1_pgo.patch,396 bytes, patch)
2015-04-08 19:49 UTC, Siim Ainsaar
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Siim Ainsaar 2013-08-08 13:21:51 UTC
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
Comment 1 Siim Ainsaar 2013-08-08 13:22:54 UTC
Created attachment 355404 [details]
emerge --info www-client/firefox
Comment 2 Siim Ainsaar 2013-08-08 13:27:15 UTC
(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).
Comment 3 victor romanchuk 2013-08-08 15:40:20 UTC
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
Comment 4 Jory A. Pratt gentoo-dev 2013-08-08 22:29:54 UTC
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.
Comment 5 Alec Moskvin 2013-10-05 18:32:13 UTC
Hi,

Is there anywhere I can find a version of this patch for firefox-24?
Comment 6 Siim Ainsaar 2013-10-05 20:40:16 UTC
Created attachment 360188 [details, diff]
Here's my patch for firefox-24.0.

The additions to profileserver.py seem quite hackish, but they work.
Comment 7 Siim Ainsaar 2013-11-05 21:03:33 UTC
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.
Comment 8 Siim Ainsaar 2013-12-13 22:37:12 UTC
Created attachment 365284 [details, diff]
Almost identical patch for www-client/firefox-26.0 is here.
Comment 9 Alec Moskvin 2013-12-14 16:21:46 UTC
Thanks!
Comment 10 Siim Ainsaar 2014-02-09 19:46:21 UTC
Created attachment 369974 [details, diff]
A more future-proof PGO patch for www-client/firefox-27.0
Comment 11 Siim Ainsaar 2014-03-22 08:43:41 UTC
Created attachment 373248 [details, diff]
Practically the same patch for www-client/firefox-28.0
Comment 12 Siim Ainsaar 2014-05-02 09:20:13 UTC
Exactly the same patch as for 28.0 applies for www-client/firefox-29.0.
Comment 13 Siim Ainsaar 2014-06-15 18:23:29 UTC
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.
Comment 14 Siim Ainsaar 2014-07-29 14:11:24 UTC
Exactly the same simple patch as for 30.0 applies for www-client/firefox-31.0.
Comment 15 Siim Ainsaar 2014-09-09 19:00:50 UTC
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.
Comment 16 Ian Stakenvicius (RETIRED) gentoo-dev 2014-09-10 21:20:38 UTC
(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...
Comment 17 Siim Ainsaar 2014-10-18 20:41:53 UTC
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.
Comment 18 Siim Ainsaar 2015-04-08 19:49:15 UTC
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.
Comment 19 Siim Ainsaar 2016-08-12 03:24:28 UTC

*** This bug has been marked as a duplicate of bug 388585 ***