Support relazifying async/generator functions
Categories
(Core :: JavaScript Engine, task, P3)
Tracking
()
People
(Reporter: tcampbell, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: perf-alert, Whiteboard: [overhead:14kb])
Attachments
(3 files)
Thanks to the BaseScript and BaselineInterpreter projects it should be feasible to support relazifying async and generator functions.
A few places need to replace JSFunction::nonLazyScript()
calls with JSFunction::getOrCreateScript()
. We already check for a JitScript
before using the Baseline resume-entrypoints which simplifies things.
Reporter | ||
Comment 1•4 years ago
|
||
This allows the AsyncGeneratorResume logic to determine how to resume without
needing access to the full bytecode.
Reporter | ||
Comment 2•4 years ago
|
||
Add a few uses of JSFunction::getOrCreateScript to tolerate lazy generators
in the resume code. We then remove the relazification restrictions.
Depends on D69458
Reporter | ||
Comment 3•4 years ago
|
||
Here is a prototype of it. I need a big more targeted testing for correctness and validation of performance. One nice aspect of the new BaseScript
design, is that mistakes here will only result in nullptr crashes by trying to access bytecode on a lazy script.
Reporter | ||
Comment 4•4 years ago
|
||
This prototype is still pretty broken in a few cases.
Updated•3 years ago
|
Updated•3 years ago
|
Reporter | ||
Comment 5•3 years ago
|
||
In later patches, this may GC and this
may be moved.
Depends on D69458
Pushed by tcampbell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8d0cb8c6bb7c Store the opcode that caused a generator to pause. r=jandem https://hg.mozilla.org/integration/autoland/rev/5ff84c1e2f55 Make DebuggerFrame::setGeneratorInfo static. r=jandem https://hg.mozilla.org/integration/autoland/rev/28e150b3df59 Allow relazifying generators. r=jandem
Comment 7•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/8d0cb8c6bb7c
https://hg.mozilla.org/mozilla-central/rev/5ff84c1e2f55
https://hg.mozilla.org/mozilla-central/rev/28e150b3df59
Comment 8•3 years ago
|
||
Backed out as requested by Ted.
Backout link: https://hg.mozilla.org/integration/autoland/rev/751ecfca72b1fd7e210cfa845e008e6e5d9ca107
Comment 9•3 years ago
|
||
== Change summary for alert #28570 (as of Mon, 01 Feb 2021 11:31:22 GMT) ==
Improvements:
Ratio | Suite | Test | Platform | Options | Absolute values (old vs new) |
---|---|---|---|---|---|
1% | Base Content JS | windows10-64-shippable | 2,511,200.00 -> 2,497,386.67 | ||
1% | Base Content JS | windows10-64-shippable-qr | 2,511,197.33 -> 2,497,349.33 | ||
1% | Base Content JS | windows10-64-shippable-qr | 2,511,200.00 -> 2,497,381.33 | ||
1% | Base Content JS | linux1804-64-shippable | 2,506,725.33 -> 2,493,149.33 | ||
1% | Base Content JS | linux1804-64-shippable-qr | 2,506,064.00 -> 2,493,257.33 | ||
0.45% | Base Content JS | macosx1014-64-shippable-qr | 2,509,365.33 -> 2,498,001.33 |
For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=28570
Reporter | ||
Updated•3 years ago
|
Updated•3 years ago
|
Comment 10•3 years ago
|
||
== Change summary for alert #28601 (as of Wed, 03 Feb 2021 10:47:34 GMT) ==
Regressions:
Ratio | Suite | Test | Platform | Options | Absolute values (old vs new) |
---|---|---|---|---|---|
1% | Base Content JS | macosx1014-64-shippable-qr | 2,498,901.33 -> 2,512,853.33 | ||
1% | Base Content JS | linux1804-64-shippable | 2,492,894.00 -> 2,506,218.67 | ||
1% | Base Content JS | windows10-64-shippable | 2,497,268.00 -> 2,510,589.33 | ||
1% | Base Content JS | windows10-64-shippable-qr | 2,497,264.67 -> 2,510,576.00 | ||
1% | Base Content JS | windows10-64-shippable-qr | 2,497,262.67 -> 2,510,584.00 | ||
1% | Base Content JS | linux1804-64-shippable-qr | 2,493,860.67 -> 2,506,906.67 |
For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=28601
Updated•3 years ago
|
Updated•2 years ago
|
Reporter | ||
Comment 11•1 year ago
|
||
The patches I had here were not sound. It may be possible to fix still, but it is not a priority
Description
•