Closed Bug 1566466 Opened 5 years ago Closed 5 years ago

JSScript isRelazifiable check should be consistent with when we keep LazyScript

Categories

(Core :: JavaScript Engine, task, P2)

task

Tracking

()

RESOLVED FIXED
mozilla73
Tracking Status
firefox73 --- fixed

People

(Reporter: tcampbell, Assigned: tcampbell)

References

Details

Attachments

(1 file)

The check in [1] where we decide if we entrain the LazyScript after delazification is not the same as the check in [2] we use to allow relazification. The result is we keep LazyScripts alive when we'll never be able to use them again.

Another minor nit here is that we check hasDoNotRelazify() in [2] which is a runtime flag (used for pinning functions on stack for testing). This should be excluded from this check like jitcode is. We can have another helper function that checks the dynamic condition.

[1] https://searchfox.org/mozilla-central/rev/07f7390618692fa4f2a674a96b9b677df3a13450/js/src/vm/JSFunction.cpp#1563
[2] https://searchfox.org/mozilla-central/source/js/src/vm/JSScript.h#2683

Blocks: 1529456

Move the relazification decisions to JSScript since the check is made after
delazification happens. The JSScript::isRelazifiable check inspects
characteristics of the script itself, while JSScript::canRelazify includes
additional checks for runtime conditions outside the script.

Pushed by tcampbell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/14f33b78f0eb Clean up relazification conditions. r=jandem
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla73
Pushed by tcampbell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1bd1069fa2b2 Clean up relazification conditions. r=jandem
Regressions: 1600806

Backed out changeset 1bd1069fa2b2 (bug 1566466) on request by tcampbell for causing ccov Jit6 permafails

Backout: https://hg.mozilla.org/integration/autoland/rev/fde74a46394f181a273198dacaf3081223c4ea20

Flags: needinfo?(tcampbell)

This patch changed the semantics of a test-only shell function. It failed on ccov builds because they still disable lazy parsing. The isRelazifiableFunction testing function should have old functionality restored, or the tests should be adjusted. The testing function should be better documented about what expectations are, especially transient blockers to relazification.

Flags: needinfo?(tcampbell)
Pushed by shindli@mozilla.com: https://hg.mozilla.org/mozilla-central/rev/616c216abffd Clean up relazification conditions. r=jandem a=backout-reversal DONTBUILD
Pushed by tcampbell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9160b2617014 Clean up relazification conditions. r=jandem
Status: REOPENED → RESOLVED
Closed: 5 years ago5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla73

== Change summary for alert #24206 (as of Tue, 03 Dec 2019 00:08:40 GMT) ==

Improvements:

13% raptor-tp6-imgur-firefox-cold loadtime macosx1014-64-shippable opt 3,505.17 -> 3,042.50

For up to date results, see: https://treeherder.mozilla.org/perf.html#/alerts?id=24206

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: