Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 315997

Summary: www-client/mozilla-firefox-3.6.3: Trace Monkey is disabled on amd64
Product: Gentoo Linux Reporter: Richard <shiningarcanine>
Component: Current packagesAssignee: Mozilla Gentoo Team <mozilla>
Status: RESOLVED FIXED    
Severity: normal CC: bugs+gentoo, spatz, tom.gl
Priority: High    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Patch to enable TraceMonkey on x86_64 systems
Patch to xulrunner-1.9.2.3 ebuild to use TraceMonkey patch
Patch to mozilla-firefox 3.6.3 ebuild to use TraceMonkey patch
current xulrunner-1.9.2.3-r1 ebuild with 64bit TM epatch line
current mozilla-firefox-3.6.3 ebuild with 64bit TM epatch line
arch linux patch that I am presently using

Description Richard 2010-04-18 18:31:37 UTC
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.
Comment 1 Richard 2010-04-18 18:33:47 UTC
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
Comment 2 Richard 2010-04-18 18:34:39 UTC
Created attachment 228309 [details, diff]
Patch to xulrunner-1.9.2.3 ebuild to use TraceMonkey patch
Comment 3 Richard 2010-04-18 18:35:12 UTC
Created attachment 228311 [details, diff]
Patch to mozilla-firefox 3.6.3 ebuild to use TraceMonkey patch
Comment 4 Jory A. Pratt gentoo-dev 2010-04-18 18:55:53 UTC
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.
Comment 5 Richard 2010-04-18 19:39:01 UTC
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?
Comment 6 rob shelton 2010-04-25 00:28:27 UTC
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.
Comment 7 rob shelton 2010-04-25 00:29:46 UTC
Created attachment 229035 [details]
current xulrunner-1.9.2.3-r1 ebuild with 64bit TM epatch line
Comment 8 rob shelton 2010-04-25 00:30:16 UTC
Created attachment 229037 [details]
current mozilla-firefox-3.6.3 ebuild with 64bit TM epatch line
Comment 9 rob shelton 2010-04-25 00:30:38 UTC
Created attachment 229039 [details]
arch linux patch that I am presently using
Comment 10 rob shelton 2010-06-23 12:38:00 UTC
Same patch continues to work on mozilla-firefox-3.6.4. Only used the enable tracemonkey patch.
Comment 11 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2010-07-21 13:20:45 UTC
+  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)
+