Closed Bug 1434030 Opened 2 years ago Closed 2 years ago

Baldr: re-optimize stack limit and JSContext retrieval

Categories

(Core :: JavaScript Engine: JIT, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla60
Tracking Status
firefox60 --- fixed

People

(Reporter: luke, Assigned: luke)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

Attached 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
... and of course that should be stackLimit*ForJitCode*().
Attachment #8946384 - Attachment is obsolete: true
Attachment #8946384 - Flags: review?(jdemooij)
Attachment #8946456 - Flags: review?(jdemooij)
Blocks: 1434211
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+
(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.
Pushed by lwagner@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/1802ba58c11a
Baldr: re-optimize stack limit and JSContext retrieval (r=jandem)
https://hg.mozilla.org/mozilla-central/rev/1802ba58c11a
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
You need to log in before you can comment on or make changes to this bug.