Closed Bug 1449135 Opened 2 years ago Closed 2 years ago

Re-optimize JSContext usage in JIT code

Categories

(Core :: JavaScript Engine: JIT, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

(Blocks 1 open bug)

Details

Attachments

(3 files, 2 obsolete files)

This involves removing some cooperative scheduling code. I want to do this to optimize explicit interrupt checks better for bug 1448887.
Attachment #8962658 - Flags: review?(luke)
Attachment #8962659 - Flags: review?(luke)
This is a pretty big patch, but most of it is code removal:

 49 files changed, 362 insertions(+), 954 deletions(-)

rt->mainContext_ is now immutable after it's set in JSRuntime::init. This patch also optimizes interrupt/overflow checks in JIT code to eliminate the second load, and MacroAssembler::loadJSContext is just a movePtr now.

There's a lot more we can remove/rename after this (ZoneGroup for instance).
Attachment #8962665 - Flags: review?(luke)
Attachment #8962665 - Attachment is obsolete: true
Attachment #8962665 - Flags: review?(luke)
Attachment #8962670 - Flags: review?(luke)
Attachment #8962670 - Flags: review?(luke)
This version is a bit more conservative; it removes less code.
Attachment #8962670 - Attachment is obsolete: true
Attachment #8962692 - Flags: review?(luke)
Comment on attachment 8962658 [details] [diff] [review]
Part 1 - Remove shell code/tests

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

Fewer tests than I expected.
Attachment #8962658 - Flags: review?(luke) → review+
Attachment #8962659 - Flags: review?(luke) → review+
Comment on attachment 8962692 [details] [diff] [review]
Part 3 - Remove cooperative scheduling

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

Nice work removing all this.
Attachment #8962692 - Flags: review?(luke) → review+
Pushed by jandemooij@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/29e8ada7d1a6
part 1 - Remove shell code/tests for cooperative scheduling. r=luke
https://hg.mozilla.org/integration/mozilla-inbound/rev/7db16aa2e0ee
part 2 - Add MOZ_CRASH to cooperative scheduling APIs. r=luke
https://hg.mozilla.org/integration/mozilla-inbound/rev/678d0894d291
part 3 - Remove cooperative scheduling; bake in JSContext* in JIT code. r=luke
https://hg.mozilla.org/mozilla-central/rev/29e8ada7d1a6
https://hg.mozilla.org/mozilla-central/rev/7db16aa2e0ee
https://hg.mozilla.org/mozilla-central/rev/678d0894d291
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in before you can comment on or make changes to this bug.