Re-optimize JSContext usage in JIT code

RESOLVED FIXED in Firefox 61

Status

()

enhancement
RESOLVED FIXED
a year ago
a year ago

People

(Reporter: jandem, Assigned: jandem)

Tracking

(Blocks 1 bug)

unspecified
mozilla61
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox61 fixed)

Details

Attachments

(3 attachments, 2 obsolete attachments)

Assignee

Description

a year ago
This involves removing some cooperative scheduling code. I want to do this to optimize explicit interrupt checks better for bug 1448887.
Assignee

Comment 1

a year ago
Attachment #8962658 - Flags: review?(luke)
Assignee

Comment 2

a year ago
Attachment #8962659 - Flags: review?(luke)
Assignee

Comment 3

a year ago
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)
Assignee

Comment 4

a year ago
Attachment #8962665 - Attachment is obsolete: true
Attachment #8962665 - Flags: review?(luke)
Attachment #8962670 - Flags: review?(luke)
Assignee

Updated

a year ago
Attachment #8962670 - Flags: review?(luke)
Assignee

Comment 5

a year ago
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+

Comment 8

a year ago
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

Comment 9

a year ago
bugherder
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
Last Resolved: a year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in before you can comment on or make changes to this bug.