Disable Cranelift on non-arm64 Android/Linux/macOS by default; simplify about:config options
Categories
(Core :: JavaScript: WebAssembly, enhancement, P1)
Tracking
()
People
(Reporter: lth, Assigned: lth)
References
Details
Attachments
(3 files)
We're not maintaining Cranelift-x64 in SpiderMonkey at the moment and it is crashy in the field (or will become so soon, as ABI changes are landing). Let's remove it from Nightly builds, it can easily enough be included in custom builds should that be desirable, though likely it is not.
Assignee | ||
Comment 1•4 years ago
|
||
Bug 1674725 tracks the ABI work.
Assignee | ||
Comment 2•4 years ago
|
||
Also, need to disable cranelift on Windows-ARM64 because the ABI needs to be updated there too.
Assignee | ||
Comment 3•4 years ago
|
||
Taking this, because we will also need to tidy up the about:config options.
Assignee | ||
Comment 4•4 years ago
|
||
We want to enable cranelift on aarch64 hardware except on Windows (due
to ABI issues) and on x64 with the aarch64 simulator, but not on x64
in general (because it is immature).
Add a test case to ensure that cranelift is not enabled where we do
not expect it to be.
Assignee | ||
Comment 5•4 years ago
|
||
This patch makes cranelift and ion exclusive of each other: enabling
cranelift on a platform will effectively disable Ion on that platform.
Specifically there's a change at the pref/switch level that does not
go terribly deep:
- the new about:config option is javascript.options.wasm_optimizingjit,
the old wasm_cranelift and wasm_ionjit are no more - new values of X in --wasm-compiler=X in the js shell are 'optimizing'
and 'baseline+optimizing', the old values 'cranelift', 'ion',
'baseline+ion' and 'baseline+optimizing' are no more - we keep the separate prefs internally in the code for ion and cranelift
but if ENABLE_WASM_CRANELIFT is defined then we never set the ion
pref to true, and if it is not defined then we never set the cranelift
pref to true
The trickiest changes are win testWasm.cpp and in the JIT compiler option
processing in jsapi.cpp.
People who will suffer as a result of this are those who are working
on ports of cranelift to new platforms in Firefox. As of now we have
no such work going on.
In the longer term the exclusive-or situation can be alleviated by a
switch that lets cranelift override ion when cranelift is present and
the switch is on. Patches welcome.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Pushed by lhansen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c4511a3c1bc6 Fix moz.configure setup for cranelift. r=rhunt
Pushed by malexandru@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/abade44d94f8 Fix lint failure in js/moz.configure a=lint-fix
Comment 8•4 years ago
|
||
bugherder |
Assignee | ||
Comment 9•4 years ago
|
||
This is on try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=76d4b0a1e847a31f171c56622daf003112b21691 but it's going to need some raptor updates, I see.
Assignee | ||
Comment 10•4 years ago
|
||
The pref name has changed from wasm_ionjit to wasm_optimizingjit (partly to accomodate macOS,
partly because this is better for the current architecture). So rename the prefs, and
also rename the tests to reflect this reality.
Depends on D96059
Updated•4 years ago
|
Assignee | ||
Comment 11•4 years ago
|
||
https://treeherder.mozilla.org/jobs?repo=try&revision=bd56f4161fe05137a92508565bea0e20f188a38b with all fixes for raptor - green.
Assignee | ||
Comment 12•4 years ago
|
||
Alexandru, the raptor change is blocking unified builds on macOS and it would be best to resolve this matter ASAP. There was a try push two days ago that was green, see comment 11.
Comment 14•4 years ago
|
||
Pushed by lhansen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/043b8afd58e6 Update raptor options for wasm tests. r=perftest-reviewers,AlexandruIonescu https://hg.mozilla.org/integration/autoland/rev/4806fdbc8d17 Fix prefs, switches, and selection for cranelift. r=rhunt
Comment 15•4 years ago
|
||
bugherder |
Comment 16•4 years ago
|
||
is there anyway the original changes here could cause xpcshell to not startup on apples new aarch64 machines? Both in x86 build and emulated as well as universal build and native?
I can run tests successfully on the revision before: e0ccf52ee83679fb8e7f1ad24ca067302eda6f1d, but updating to c4511a3c1bc64210f293ffe88ce20a4b0603a5a0 yields xpcshell failures, then backing out c4511a3c1bc64210f293ffe88ce20a4b0603a5a0 still yields xpcshell startup failures:
https://treeherder.mozilla.org/jobs?repo=try&revision=a3ee5020b3e798a45e1d616b3d1e8d453a2a2f86
hoping there is something to connect the dots
Assignee | ||
Comment 17•4 years ago
|
||
That's weird, and I don't know what might be going on.
Assignee | ||
Updated•4 years ago
|
Description
•