Closed
Bug 1357680
Opened 8 years ago
Closed 8 years ago
Babel class inheritance code confuses TI and Ion inlining
Categories
(Core :: JavaScript Engine: JIT, enhancement, P1)
Core
JavaScript Engine: JIT
Tracking
()
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: jandem, Assigned: jandem)
References
(Blocks 2 open bugs)
Details
(Keywords: perf)
Attachments
(3 files)
18.06 KB,
patch
|
bhackett1024
:
review+
|
Details | Diff | Splinter Review |
1009 bytes,
patch
|
bhackett1024
:
review+
|
Details | Diff | Splinter Review |
5.18 KB,
patch
|
jandem
:
review+
|
Details | Diff | Splinter Review |
Ember's Glimmer VM is transpiled with Babel. For derived classes, Babel uses setPrototypeOf on the constructor function. This pattern confuses TI and hence we don't inline some trivial base constructors and end up with megamorphic property accesses on the Ember benchmark in bug 1352486.
I have patches to fix this and some related issues with proto mutation,
Assignee | ||
Comment 1•8 years ago
|
||
Ion is currently unable to inline functions with unknown properties, because we need to add a type constraint to trigger invalidation of compilations that inlined the script when the callees stack types change.
This patch replaces this constraint with a Vector of RecompileInfo entries (compilations that inlined this script) on TypeScript, so we can invalidate them on type changes.
Attachment #8859509 -
Flags: review?(bhackett1024)
Assignee | ||
Updated•8 years ago
|
Updated•8 years ago
|
Attachment #8859509 -
Flags: review?(bhackett1024) → review+
Pushed by jandemooij@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/7a446a56598f
part 1 - Track Ion-inlined scripts explicitly so we can inline functions with unknown properties. r=bhackett
Assignee | ||
Updated•8 years ago
|
Keywords: leave-open
Comment 3•8 years ago
|
||
sorry had to back this out for leak issue like https://treeherder.mozilla.org/logviewer.html#?job_id=93241968&repo=mozilla-inbound&lineNumber=9557
Flags: needinfo?(jdemooij)
Assignee | ||
Comment 4•8 years ago
|
||
Ugh a js_free must be js_delete, I had that change at some point but must have dropped it.
Backout by ihsiao@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3ccc9c855766
Backed out changeset 7a446a56598f for leak issue
Pushed by jandemooij@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/954eeda43262
part 1 - Track Ion-inlined scripts explicitly so we can inline functions with unknown properties. r=bhackett
Comment 7•8 years ago
|
||
bugherder |
Assignee | ||
Comment 9•8 years ago
|
||
This patch is also unlikely to improve anything but it's another incremental step.
Attachment #8860903 -
Flags: review?(bhackett1024)
Updated•8 years ago
|
Attachment #8860903 -
Flags: review?(bhackett1024) → review+
Comment 10•8 years ago
|
||
Pushed by jandemooij@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/c35f0ad34397
part 2 - Remove unnecessary setNewGroupUnknown call in SetClassAndProto. r=bhackett
Comment 11•8 years ago
|
||
bugherder |
Assignee | ||
Comment 12•8 years ago
|
||
This patch makes 2 changes:
(1) When we mutate the prototype of a native object, instead of marking the new group as having unknown properties, we propagate the property types from the object to the new group.
(2) When we mutate the prototype of a scripted function, we create a new group and propagate the canonical JSFunction to it.
On the Ember benchmark we can inline more functions now and I hope these changes will make us more robust in a lot of other cases that involve proto mutation.
Attachment #8863358 -
Flags: review?(bhackett1024)
Assignee | ||
Comment 13•8 years ago
|
||
Comment on attachment 8863358 [details] [diff] [review]
Part 3 - TI changes
Brian has no internet access for a while but reviewed this over email.
Attachment #8863358 -
Flags: review?(bhackett1024) → review+
Comment 14•8 years ago
|
||
Pushed by jandemooij@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/b6315d186b4b
part 3 - Don't mark the new group as having unknown properties when changing an object's proto. r=bhackett
Assignee | ||
Updated•8 years ago
|
Keywords: leave-open
Comment 15•8 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Comment 16•7 years ago
|
||
This will affect speedometer with updated Ember. marking [qf:p1] for tracking high impact improvements.
Whiteboard: [qf:p1]
Updated•3 years ago
|
Performance Impact: --- → P1
Whiteboard: [qf:p1]
Updated•2 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•