Delazify scripts in-place
Categories
(Core :: JavaScript Engine, task, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox76 | --- | fixed |
People
(Reporter: tcampbell, Assigned: tcampbell)
References
(Blocks 1 open bug)
Details
Attachments
(3 files)
This bug is the pivotal part of Bug 1529456. Most of the groundwork is complete for the delazification/relazification processes to work in-place on a single BaseScript.
- This allows clones of lambda functions to all delazify at once, avoid the need to JITs to detect this case.
- The debugger will only need two track a single BaseScript in it's maps and will not need to reconcile them.
- We no longer need to allocate pairs of BaseScripts with almost identical information.
- We can lazify functions that do not have an initial LazyScript.
The primary complexity to watch out for is correctly cleaning up if an OOM occurs during delazification so that the BaseScript is returned to its previous state.
Assignee | ||
Comment 1•5 years ago
|
||
Use a single GC allocation for the JSScript and the LazyScript of a
function. This reuses the script during delazification / relazification
transitions.
The debugger and JITs are simplified as a result of having a single identity
for a BaseScript rather than tracking both a lazy and non-lazy form.
Assignee | ||
Comment 2•5 years ago
|
||
To simplify in-place relazification, we disallow relazification when the
function originally had a non-null PrivateScriptData pointer. This excludes
class constructors (without inner functions) that previously supported
relazification. All other scripted leaf functions do not allocate a
PrivateScriptData because they cannot have closed-over-bindings (since they
have no inner functions).
Assignee | ||
Comment 3•5 years ago
|
||
Add helper method to manage updating BaseScript::data_ that correctly
notifies the GC MemoryUse tracking. This simplifies things later when we will
need to update data_ during delazification / relazification.
Depends on D66139
Updated•5 years ago
|
Updated•5 years ago
|
Comment 5•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/052cf2656bdc
https://hg.mozilla.org/mozilla-central/rev/424df8f11c16
https://hg.mozilla.org/mozilla-central/rev/4dd9206018a3
Comment 6•5 years ago
|
||
== Change summary for alert #25416 (as of Mon, 16 Mar 2020 11:58:04 GMT) ==
Improvements:
0.39% Base Content JS windows7-32 opt 2,959,256.00 -> 2,947,736.00
0.39% Base Content JS windows7-32-shippable opt 2,959,309.33 -> 2,947,725.33
0.27% Base Content JS linux1804-64 opt 3,711,887.33 -> 3,701,930.00
0.27% Base Content JS linux1804-64-qr opt 3,711,926.00 -> 3,701,940.00
0.27% Base Content JS linux1804-64-shippable opt 3,711,920.00 -> 3,701,936.00
0.27% Base Content JS linux1804-64-shippable-qr opt 3,711,932.00 -> 3,701,936.00
0.27% Base Content JS macosx1014-64-shippable opt 3,713,973.33 -> 3,704,002.00
0.26% Base Content JS windows10-64-qr opt 3,770,644.67 -> 3,760,717.33
0.25% Base Content JS windows10-64 opt 3,770,604.00 -> 3,761,078.67
0.25% Base Content JS windows10-64-shippable opt 3,770,620.00 -> 3,761,086.67
0.25% Base Content JS windows10-64-shippable-qr opt 3,770,598.00 -> 3,761,050.00
0.25% Base Content JS windows10-64-qr opt 3,770,606.00 -> 3,761,080.67
For up to date results, see: https://treeherder.mozilla.org/perf.html#/alerts?id=25416
Updated•5 years ago
|
Description
•