Last Comment Bug 682326 - Disable method jit for chrome
: Disable method jit for chrome
Status: RESOLVED FIXED
[qa-]
: addon-compat
Product: Fennec Graveyard
Classification: Graveyard
Component: General (show other bugs)
: Trunk
: x86 Linux
: -- normal (vote)
: Firefox 7
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-26 10:12 PDT by Mark Finkle (:mfinkle) (use needinfo?)
Modified: 2011-09-26 11:58 PDT (History)
9 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
patch (2.30 KB, patch)
2011-08-26 10:12 PDT, Mark Finkle (:mfinkle) (use needinfo?)
mbrubeck: review+
christian: approval‑mozilla‑aurora+
christian: approval‑mozilla‑beta+
Details | Diff | Review

Description Mark Finkle (:mfinkle) (use needinfo?) 2011-08-26 10:12:41 PDT
Created attachment 556061 [details] [diff] [review]
patch

When we turned on method jit for chrome, we didn't really see that much of a gain in performance, if any. But we are using more memory in the parent process because of it.

This patch turns off methodjit for chrome. You will still see some parent process mjit usage in about:memory because some webpage (content) are loaded in the parent process.
Comment 1 Matt Brubeck (:mbrubeck) 2011-08-26 10:21:44 PDT
Comment on attachment 556061 [details] [diff] [review]
patch

Review of attachment 556061 [details] [diff] [review]:
-----------------------------------------------------------------

Don't check in the mozconfig.
Comment 2 Mark Finkle (:mfinkle) (use needinfo?) 2011-08-26 10:47:48 PDT
removed the mozconfig and actually set the pref to false
http://hg.mozilla.org/integration/mozilla-inbound/rev/60594ddf3d9e
Comment 3 Marco Bonardo [::mak] 2011-08-27 01:48:05 PDT
http://hg.mozilla.org/mozilla-central/rev/60594ddf3d9e
Comment 4 Mark Finkle (:mfinkle) (use needinfo?) 2011-09-08 17:20:49 PDT
Comment on attachment 556061 [details] [diff] [review]
patch

To help reduce memory usage
Comment 5 Nicholas Nethercote [:njn] 2011-09-08 17:22:50 PDT
I second the aurora/beta nominations.  The method JIT uses a lot of memory.  And it should be very low-risk, since it was off previously.
Comment 6 christian 2011-09-09 15:16:32 PDT
Comment on attachment 556061 [details] [diff] [review]
patch

Approved for releases/mozilla-aurora and releases/mozilla-beta. Please land asap.
Comment 8 Kyle Huey [:khuey] (khuey@mozilla.com) (Away until 6/13) 2011-09-12 17:16:03 PDT
Is there a bug on file for doing this on desktop firefox?
Comment 9 Mark Finkle (:mfinkle) (use needinfo?) 2011-09-12 17:41:11 PDT
(In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #8)
> Is there a bug on file for doing this on desktop firefox?

Not that I am aware of, but desktop might have different behavior/goals. It's a tradeoff and on mobile we traded for memory.
Comment 10 Jesse Ruderman 2011-09-12 19:31:58 PDT
I'm worried this change will make computationally intensive add-ons much slower.

Why was this solution chosen as opposed to, say, tweaking the method jit heuristics to kick in less often?
Comment 11 Kyle Huey [:khuey] (khuey@mozilla.com) (Away until 6/13) 2011-09-13 04:51:05 PDT
Are people running computationally intensive addons on mobile?

Also, there's still the tracer, right?
Comment 12 Mark Finkle (:mfinkle) (use needinfo?) 2011-09-13 06:56:02 PDT
(In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #11)
> Are people running computationally intensive addons on mobile?

It's possible I guess

> Also, there's still the tracer, right?

Yes, the tracer is still enabled
Comment 13 Jesse Ruderman 2011-09-13 08:55:23 PDT
The tracer is disabled by default.  Does disabling the method jit actually enable the tracer?  How long until the tracer is ripped out?
Comment 14 Anthony Hughes (:ashughes) [GFX][QA][Mentor] 2011-09-22 16:57:27 PDT
qa- as no QA fix verification is needed
Comment 15 Brian Hackett (:bhackett) 2011-09-26 11:58:34 PDT
I think the mjit's problem here is in its technique for discarding jitcode.  Stock JM occasionally tries to discard jitcode during GC, but can only do so if the jitcode's compartment does not have active frames on the stack.  I noticed when fixing bug 688292 that when we GC there is almost always chrome code on the stack (at least on some workloads), which will cause mjit code to be discarded even slower.

In compartments with TI enabled (not chrome) this is different, and all jitcode is discarded on every GC even in compartments with frames on the stack.  I tried to do this for stock JM too in bug 685358, but ran into problems with JM+TM integration (weird corruption problems).  By removing the tracer or decoupling it from JM, that bug could reland.

Note You need to log in before you can comment on or make changes to this bug.