Closed Bug 1334837 Opened 8 years ago Closed 8 years ago

Add JSContext* to runtime for the active cooperatively scheduled thread

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla54
Tracking Status
firefox54 --- fixed

People

(Reporter: bhackett1024, Assigned: bhackett1024)

References

Details

Attachments

(4 files)

Attached patch patchSplinter Review
The initial target for bug 1323066 is to allow JS runtimes to be cooperatively multithreaded, with at most one mutator thread operating at a time. This patch adds an |activeContext| field for that to the runtime; since right now the runtime is single threaded, this field always points to that thread's context. This patch also replaces most uses of UnprotectedData in the engine with ActiveThreadData (or a related class, if the data can also be accessed on a background thread), improving our thread safety checking on these fields.
Attachment #8831474 - Attachment is patch: true
Assignee: nobody → bhackett1024
Attached patch runtime changesSplinter Review
Attachment #8831475 - Flags: review?(jdemooij)
Attached patch GC changesSplinter Review
Attachment #8831476 - Flags: review?(jcoppeard)
Attached patch JIT changesSplinter Review
Attachment #8831477 - Flags: review?(hv1989)
Blocks: 1334212
Blocks: 1334927
Attachment #8831475 - Flags: review?(jdemooij) → review+
Attachment #8831477 - Flags: review?(hv1989) → review+
Comment on attachment 8831476 [details] [diff] [review] GC changes Review of attachment 8831476 [details] [diff] [review]: ----------------------------------------------------------------- Looks good. Is there anything that exercises this functionality yet?
Attachment #8831476 - Flags: review?(jcoppeard) → review+
(In reply to Jon Coppeard (:jonco) from comment #4) > Comment on attachment 8831476 [details] [diff] [review] > GC changes > > Review of attachment 8831476 [details] [diff] [review]: > ----------------------------------------------------------------- > > Looks good. Is there anything that exercises this functionality yet? Unfortunately, there isn't. Once the rest of the obstacles are out of the way to having a cooperatively multithreaded runtime, I'll build a shell harness to run threads cooperatively so that we can actually test this stuff.
Pushed by bhackett@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/4b8c006aff8d Add JSContext* to runtime for the active cooperatively scheduled thread, r=jandem,jonco,h4writer.
Backed out in https://hg.mozilla.org/integration/mozilla-inbound/rev/9503e89340d9 for Mac debug crashes [@ js::CurrentThreadIsIonCompiling()] - a few devtools chunks were willing to crash that way too, but xpcshell is by far the easiest place to catch it, since every run gives you plenty of them, https://treeherder.mozilla.org/logviewer.html#?job_id=75007257&repo=mozilla-inbound
Pushed by bhackett@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/a732f9bf1195 Add JSContext* to runtime for the active cooperatively scheduled thread, r=jandem,jonco,h4writer.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: