Closed
Bug 857845
Opened 12 years ago
Closed 11 years ago
Remove JaegerMonkey from SpiderMonkey
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla24
People
(Reporter: gkw, Assigned: jandem)
References
Details
Attachments
(5 files)
1.48 MB,
patch
|
Details | Diff | Splinter Review | |
1.50 MB,
patch
|
bhackett1024
:
review+
luke
:
superreview+
|
Details | Diff | Splinter Review |
16.71 KB,
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
2.29 KB,
patch
|
jandem
:
review+
|
Details | Diff | Splinter Review |
32.29 KB,
patch
|
djvj
:
review+
|
Details | Diff | Splinter Review |
Now that BaselineCompiler has landed, it's probably time to remove JaegerMonkey, possibly in the next merge window (Firefox 24 - note that this is likely an ESR release).
Filing this bug so we can track it. :)
Reporter | ||
Comment 1•12 years ago
|
||
JM meta bug 536277 and JM meta bug 549412 for fuzz bugs can then be resolved.
Reporter | ||
Comment 2•12 years ago
|
||
Perhaps this bug could involve disabling it by default first, then removing it. (Feel free to file a new bug / change this if this is not optimal)
Summary: Remove JaegerMonkey from SpiderMonkey → Disable JaegerMonkey (by default) then remove it from SpiderMonkey
Assignee | ||
Comment 3•12 years ago
|
||
(In reply to Gary Kwong [:gkw] [:nth10sd] from comment #2)
> Perhaps this bug could involve disabling it by default first, then removing
> it. (Feel free to file a new bug / change this if this is not optimal)
JM does not compile anything if baseline is enabled, so it's effectively already disabled on all tier-1 platforms AFAIK (even ARMv6).
(There are some places outside JM where we check cx->methodJitEnabled, so right now flipping the pref will affect perf a bit, but these should be easy to fix.)
Comment 4•12 years ago
|
||
This is a MemShrink:P1 because removing JM will remove a lot of the type inference, which takes up lots of memory.
Whiteboard: [MemShrink:P1]
Updated•12 years ago
|
Whiteboard: [MemShrink:P1]
Comment 5•12 years ago
|
||
There was some discussion about making JM+TI, at least for 24, a compile-only option, because when JM+TI is removed from the code SPARC, MIPS and PowerPC (we use an internal out-of-the-tree implementation) will not have JIT support. I'd like to ask if that is still possible, similar to the legacy tracejit in 10ESR.
I'm trudging through a PowerPC backend for Ion, but if JM is still in 24ESR that buys me some time. It's a considerably larger undertaking. I don't know if anyone in the SPARC or MIPS camps are working on their own implementation.
I certainly wouldn't object to its complete removal in 25; I know it's become a maintainability beast.
Assignee | ||
Comment 6•12 years ago
|
||
First cut.
96 files changed, 62 insertions(+), 42804 deletions(-)
Builds, passes tests.
Assignee | ||
Comment 7•12 years ago
|
||
There's more code we can remove (browser and shell prefs, about:memory stuff, JSOPTION_METHODJIT, analysis code) and we should also rename some methods, but we can do that in follow-up patches I think. 1.5 MB is big enough already.
Assignee: general → jdemooij
Status: NEW → ASSIGNED
Attachment #749134 -
Flags: superreview?(luke)
Attachment #749134 -
Flags: review?(bhackett1024)
Comment 8•12 years ago
|
||
Comment on attachment 749134 [details] [diff] [review]
Part 1 (261e3e928ce9)
What was the change in the opt file size?
Attachment #749134 -
Flags: superreview?(luke) → superreview+
Updated•12 years ago
|
Attachment #749134 -
Flags: review?(bhackett1024) → review+
Assignee | ||
Comment 10•12 years ago
|
||
(In reply to Cameron Kaiser from comment #9)
> What is the landing timeframe? (See my question in comment 5.)
I'm sorry but we were discussing this yesterday and we want to remove JM for Firefox 24. We really do appreciate people porting Firefox to other platforms and we do what we can to avoid breaking or regressing tier-3 platforms. However, keeping JM around for another cycle blocks some important optimization/refactoring work (bug 868437, analysis/TI work, etc) and the competition is heavy..
Comment 11•12 years ago
|
||
Obviously I have no way of preventing it, but mentioning this for the record, most of the tier-3 ports use the ESR to stabilize now (particularly the OS/2 port and ourselves), so removing or significantly changing platform support right before an ESR branch really hurts.
Bringing Ion up on a new architecture is intimidating, whereas with Jaeger it was mostly just tedious. I have the code written, but it still doesn't build; I'm going to have to revise the move emitter and lowering code for a second time. I don't know if I'll make 24 and my other PPC JS contributor had a hardware failure and is out of commission for the time being. We'll hold the stable TenFourFox userbase on 17ESR until/if we can get it working.
I certainly appreciate the maintainability problem, but losing JIT support right before what would have been our next stable branch is a potential port killer. FWIW.
Comment 12•12 years ago
|
||
Well, from the opposite perspective, it would make sense that Mozilla would prefer to drop major deprecated things before an ESR so they don't have to maintain the code for another full year.
(by the way, the JM prefs were fixed to deal with comment 3 in another bug and it's all disabled by default, so I'll update the title)
Summary: Disable JaegerMonkey (by default) then remove it from SpiderMonkey → Remove JaegerMonkey from SpiderMonkey
Comment 13•12 years ago
|
||
Given the rapid pace of engine progress and the highly competitive landscape, I agree with Jan that we can't afford to wait, especially when tier-3 ports have the immediate short-term option of turning off the JITs. I also agree with Dave that extending the maintenance lifetime of JM on ESR is highly undesirable.
Going forward, I'd think that porting and maintaining the baseline jit should be *much* easier than JM for tier-3 ports (and hopefully not too much work given a working JM port).
Comment 14•12 years ago
|
||
JM would be disabled on ESR, so there would be no burden there for JM sec fixes. Though I guess if tearing out JM enables a lot of cleanups of BC and IM, then backporting sec fixes to BC and IM will become much more painful...
Comment 15•12 years ago
|
||
> Going forward, I'd think that porting and maintaining the baseline jit
> should be *much* easier than JM for tier-3 ports (and hopefully not too much
> work given a working JM port).
Maintaining, probably so, since my limited understanding of Ion shows that much of the compiler's operation occurs at a higher level. But that means there has to be a lot more machinery in the architecture-specific backend. With Jaeger it was a matter of writing the assembler/ pieces, the trampoline, and teaching MethodJIT about ABI-compliant stack frames, which wasn't an easy thing to do, but the machinery was pretty clear about what needed to be done. There's a lot more going on in Ion and I don't understand a lot of it. Some of the comments in the ARM version indicate they're not exactly sure what's going on either. :P
However, this is all orthogonal to this bug and I've said my piece, so I'll respectfully return to lurking.
Assignee | ||
Comment 16•12 years ago
|
||
(In reply to Cameron Kaiser from comment #15)
> There's a lot more going on in Ion and I don't understand
> a lot of it. Some of the comments in the ARM version indicate they're not
> exactly sure what's going on either. :P
Just ask in #jsapi or #ionmonkey on IRC, or feel free to mail me directly if you have any questions about Baseline or Ion.
Comment 17•12 years ago
|
||
A porting guide would help a lot more.
Comment 18•12 years ago
|
||
Cameron, I think it would make a lot of sense for you to join the #jsapi and #ionmonkey channels on our IRC network and talk to the JS devs to describe the current problems you have with the porting. Jandem told me he'd be glad to help out with these issues :)
Comment 19•12 years ago
|
||
(In reply to Cameron Kaiser from comment #15)
To be clear, I was talking about the newly-landed baseline jit (without Ion) as the hopefully-easy initial porting target.
Comment 20•12 years ago
|
||
Luke, I sent you an E-mail. I'll pick up the discussion there.
Assignee | ||
Comment 21•12 years ago
|
||
Whiteboard: [leave open]
Assignee | ||
Comment 22•12 years ago
|
||
(In reply to Luke Wagner [:luke] from comment #8)
> What was the change in the opt file size?
I looked at a (non-PGO) Windows opt build with/without the patch. mozjs.dll went from 3,310 KB to 2,908 KB.
Assignee | ||
Comment 23•12 years ago
|
||
Remove dead/unnecessary code.
Attachment #750147 -
Flags: review?(luke)
Comment 24•12 years ago
|
||
Comment 25•12 years ago
|
||
The patch removed methodjit/Trampoline* files, but didn't remove them from Makefile.in. This broke 64-bit mingw build for me and, looking at the code, it probably broke MSVC 64-bit and Solaris builds.
The attached patch fixes the problem and does a little clean up (fewer ifdef ENABLE_ION are needed now).
Attachment #750348 -
Flags: review?(jdemooij)
Assignee | ||
Comment 26•12 years ago
|
||
Comment on attachment 750348 [details] [diff] [review]
Remove Trampoline* assemblies from Makefile.in
Review of attachment 750348 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks!
Attachment #750348 -
Flags: review?(jdemooij) → review+
Comment 27•12 years ago
|
||
Jan, did you receive either my message, Luke's or Martin's? With two cycles to go before 24, I really want to know what I need to have together to get Baseline up without Ion, and I'm running out of time. I have the assembler and macroassembler written, and it does compile, but I'm still missing some pieces in the code generator.
I'd really appreciate some pointers so I can break the workload down into pieces I need to finish.
Assignee | ||
Comment 28•12 years ago
|
||
(In reply to Cameron Kaiser from comment #27)
> Jan, did you receive either my message, Luke's or Martin's?
Yesterday I replied to your mail.. Did you not receive that? I will resend it.
Comment 29•12 years ago
|
||
No, I didn't. You can use either this address or the other one. Thanks, I appreciate it.
Assignee | ||
Comment 30•12 years ago
|
||
Attachment #750710 -
Flags: review?(kvijayan)
Reporter | ||
Comment 31•12 years ago
|
||
Just to note, jandem and I spoke in person about making the soon-to-be-old shell flags for JM to be no-ops in the short term rather than removing them, which can break portions of fuzzing harnesses as decoder discovered after TraceMonkey was removed.
Comment 32•12 years ago
|
||
Comment on attachment 750147 [details] [diff] [review]
Part 2 - More StackFrame cleanup
Great job, continue the rippage.
Attachment #750147 -
Flags: review?(luke) → review+
Comment 33•12 years ago
|
||
Comment on attachment 750710 [details] [diff] [review]
Part 3 - Remove browser prefs, about:memory entries
Review of attachment 750710 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/jsapi-tests/testDebugger.cpp
@@ -244,5 @@
>
> - uint32_t opts = JS_GetOptions(cx);
> - opts |= JSOPTION_METHODJIT | JSOPTION_METHODJIT_ALWAYS;
> - JS_SetOptions(cx, opts);
> -
These MethodJIT options get thrown away, but shouldn't baseline be enabled here?
::: js/src/jsapi-tests/testProfileStrings.cpp
@@ -190,5 @@
>
> BEGIN_TEST(testProfileStrings_isCalledWhenError)
> {
> CHECK(initialize(cx));
> - JS_SetOptions(cx, JS_GetOptions(cx) | JSOPTION_METHODJIT | JSOPTION_METHODJIT_ALWAYS);
Why are ion and baseline not enabled in the |isCalledWhenError| test variant, but is called on the other variants?
Attachment #750710 -
Flags: review?(kvijayan) → review+
Comment 34•11 years ago
|
||
Comment 35•11 years ago
|
||
Assignee | ||
Comment 36•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/1add7f1eeb40
(In reply to Kannan Vijayan [:djvj] from comment #33)
> These MethodJIT options get thrown away, but shouldn't baseline be enabled
> here?
The test calls a function once so it's not hot enough for baseline. Furthermore the jsdbg2 jit-tests are a lot more complete so I don't think it matters.
> Why are ion and baseline not enabled in the |isCalledWhenError| test
> variant, but is called on the other variants?
Same here, but added the SetOptions call back for consistency.
Comment 37•11 years ago
|
||
Assignee | ||
Comment 38•11 years ago
|
||
Closing this bug. There may still be some dead code left, but we can fix that in follow-up bugs.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•11 years ago
|
Whiteboard: [leave open]
Assignee | ||
Updated•11 years ago
|
Target Milestone: --- → mozilla24
You need to log in
before you can comment on or make changes to this bug.
Description
•