Closed Bug 1674722 Opened 4 years ago Closed 4 years ago

Disable Cranelift on non-arm64 Android/Linux/macOS by default; simplify about:config options

Categories

(Core :: JavaScript: WebAssembly, enhancement, P1)

x86_64
All
enhancement

Tracking

()

RESOLVED FIXED

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.

See Also: → 1674725

Bug 1674725 tracks the ABI work.

Also, need to disable cranelift on Windows-ARM64 because the ABI needs to be updated there too.

Taking this, because we will also need to tidy up the about:config options.

Assignee: jseward → lhansen
Blocks: 1675385

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.

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.

Blocks: 1675222
Keywords: leave-open
Summary: Disable Cranelift on x64 by default → Disable Cranelift on non-arm64 Android/Linux/macOS by default; simplify about:config options
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
Regressions: 1675836
Regressions: 1675841

This is on try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=76d4b0a1e847a31f171c56622daf003112b21691 but it's going to need some raptor updates, I see.

Depends on: 1675836

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

Attachment #9186586 - Attachment description: Bug 1674722 - Update raptor options for wasm tests. r?sparky → Bug 1674722 - Update raptor options for wasm tests. r?bebe

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.

Flags: needinfo?(aionescu)

r+ then

Flags: needinfo?(aionescu)
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

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

Flags: needinfo?(lhansen)

That's weird, and I don't know what might be going on.

Flags: needinfo?(lhansen)
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Keywords: leave-open
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: