Baldr: re-optimize stack limit and JSContext retrieval

RESOLVED FIXED in Firefox 60

Status

()

enhancement
RESOLVED FIXED
Last year
Last year

People

(Reporter: luke, Assigned: luke)

Tracking

(Blocks 1 bug)

unspecified
mozilla60
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox60 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Assignee

Description

Last year
Posted patch rm-cx-indirection (obsolete) — Splinter Review
Now that the JSContext cooperative scheduling functionality is no longer needed, a given JSObject (and, transitively, wasm::Instance) can assume a fixed OS thread and JSContext*.  This allows removing several indirections in wasm that were added to allow a single TlsData* to bounce between threads.  (JIT stack overflow checks could be optimized as well.)
Attachment #8946384 - Flags: review?(jdemooij)
Cretonne doesn't yet implement stack overflow checks. Tracked here: https://github.com/stoklund/cretonne/issues/234
Assignee

Comment 2

Last year
... and of course that should be stackLimit*ForJitCode*().
Attachment #8946384 - Attachment is obsolete: true
Attachment #8946384 - Flags: review?(jdemooij)
Attachment #8946456 - Flags: review?(jdemooij)
Comment on attachment 8946456 [details] [diff] [review]
rm-cx-indirection

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

I wonder if we need to remove the testing functions from the JS shell first, but we can worry about that if this breaks fuzzing.
Attachment #8946456 - Flags: review?(jdemooij) → review+
Assignee

Comment 4

Last year
(In reply to Jan de Mooij [:jandem] from comment #3)
> I wonder if we need to remove the testing functions from the JS shell first,
> but we can worry about that if this breaks fuzzing.

When I landed the inverse patch, I tried to write a test for it that would have crashed but, iirc, it wasn't possible because the shell testing was so limited that you couldn't, e.g., hop a single JSObject between threads.  That's what got me worried/emailing that, if we ever actually used cooperative contexts, there were other bugs lurking.

Comment 5

Last year
Pushed by lwagner@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/1802ba58c11a
Baldr: re-optimize stack limit and JSContext retrieval (r=jandem)

Comment 6

Last year
bugherder
https://hg.mozilla.org/mozilla-central/rev/1802ba58c11a
Status: ASSIGNED → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
You need to log in before you can comment on or make changes to this bug.