Firefox is being built with Trace Monkey disabled by default on AMD64 systems. Reproducible: Always Steps to Reproduce: 1. Run sunspider in firefox on an x86_64 Gentoo no-multilib system. 2. Run sunspider in firefox on an identically configured x86_32 Gentoo system. 3. Compare the results and notice how the x86_32 Firefox runs circles around the x86_64 Firefox. Actual Results: On my system, I observe 2011.0ms +/- 3.9% from Sunspider with the stock ebuild. Expected Results: If TraceMonkey is enabled through a modified ebuild, I get 1090.6ms +/- 1.6%. There is a Gentoo forums thread on this topic: http://forums.gentoo.org/viewtopic-p-6249496.html It unfortunately advises applying some PGO patches that break PGO builds. I have done a fair amount of testing and determined that applying the PGO patches recommended in that thread has more of a placebo effect than anything else in terms of its affect on performance. The PGO patches actually will break a PGO Firefox build, so there is little point to using them, however, the patch to enable TraceMonkey does bring tangible improvements to AMD64 systems. I will follow-up with the patches necessary to enable TraceMonkey in portage.
Created attachment 228307 [details, diff] Patch to enable TraceMonkey on x86_64 systems This is from Arch Linux's firefox package: http://aur.archlinux.org/packages.php?ID=22296
Created attachment 228309 [details, diff] Patch to xulrunner-1.9.2.3 ebuild to use TraceMonkey patch
Created attachment 228311 [details, diff] Patch to mozilla-firefox 3.6.3 ebuild to use TraceMonkey patch
your patch for ebuild does nothing, if you do not --enable-tracejit, you will not have tracemonkey support. I have all this already worked out on my stable setup, I will handle this when we finish security bump to get firefox/xulrunner secure again.
I have done benchmarks and enable-x86_64-tracemonkey.patch is clearing doing something. With modified ebuilds that applies enable-x86_64-tracemonkey.patch, Sunspider times are 1090.6ms +/- 1.6% while the stock ebuild's Sunspider times are 2011.0ms +/- 3.9%. I recompiled Xulrunner and Firefox without enable-x86_64-tracemonkey.patch and with --enable-tracejit and the modified ebuild is scoring 2264.6ms +/- 18.8% on Sunspider. Is it possible that your information applies to Firefox 3.7.x and not Firefox 3.6.x?
As the originator of the forum thread, I concur with the conclusion. These Arch Linux TraceMonkey patches give an effective working mozilla-firefox with the expected performance improvements. I also concur with the removal of the PGO patches. They did give me a very slight performance improvement, but if they cause problems further down the line, then not worth having. I have been running mozilla-firefox/xulrunner with the TraceMonkey patches since the 29th March on 3 machines, with no crashes. Will attach my current ebuilds, which are the portage ebuilds with an epatch line to enable TraceMonkey. I will also attach, just in case different, the Arch Linux patch.
Created attachment 229035 [details] current xulrunner-1.9.2.3-r1 ebuild with 64bit TM epatch line
Created attachment 229037 [details] current mozilla-firefox-3.6.3 ebuild with 64bit TM epatch line
Created attachment 229039 [details] arch linux patch that I am presently using
Same patch continues to work on mozilla-firefox-3.6.4. Only used the enable tracemonkey patch.
+ 21 Jul 2010; Lars Wendler <polynomial-c@gentoo.org> + +files/801-enable-x86_64-tracemonkey.patch, xulrunner-1.9.2.7.ebuild: + Enable tracemonkey on amd64 (bug #315997) + + 21 Jul 2010; Lars Wendler <polynomial-c@gentoo.org> + +files/801-enable-x86_64-tracemonkey.patch, mozilla-firefox-3.6.7.ebuild: + Enable tracemonkey on amd64 (bug #315997) +