Closed Bug 1570259 Opened 5 years ago Closed 5 years ago

Remove AutoSetHelperThreadContext from off-thread Wasm and Ion tasks

Categories

(Core :: JavaScript Engine: JIT, task)

task
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: jandem, Assigned: jandem)

Details

Attachments

(5 files)

The compiler backend can call functions like NumberMod/DivMod that use AutoUnsafeCallWtihABI but we should be able to avoid those things and not require a TlsContext at all for off-thread JIT tasks.

I can look into this at some point.

Flags: needinfo?(jdemooij)

The next patch will simplify the constructor code a bit more.

This will allow us to run off-thread Ion tasks without a JSContext.

I renamed IonCompiling and IonCompilation to IonBackend to make it
clearer that this doesn't include IonBuilder time.

Depends on D41378

Some functions that are called from the Ion backend use AutoUnsafeCallWithABI.

Initially I wanted to fix this by splitting these functions in two separate
functions, but this doesn't work well for all the Math builtins that are called
by GVN.

Depends on D41379

Off-thread tasks now use a pool of JSContexts (for compatibility with the XPCOM thread pool).
Tasks that don't need a JSContext can run without one (nullptr TlsContext). We can now do this
for Ion and Wasm tasks too.

Depends on D41380

Flags: needinfo?(jdemooij)
Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e902dec0592d
part 1 - Document and clean up JitContext constructors. r=luke
https://hg.mozilla.org/integration/autoland/rev/7ec11f97a63d
part 2 - Group JitContext fields and use new initializer syntax. r=luke
https://hg.mozilla.org/integration/autoland/rev/a2a7e0d2423b
part 3 - Move some fields from JSContext to JitContext. r=tcampbell
https://hg.mozilla.org/integration/autoland/rev/da156cbf44a2
part 4 - Make AutoUnsafeCallWithABI work without a TlsContext. r=tcampbell
https://hg.mozilla.org/integration/autoland/rev/c5d77f141e75
part 5 - Remove AutoSetHelperThreadContext from off-thread Ion and Wasm tasks. r=tcampbell,luke
Assignee: nobody → jdemooij
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: