Closed Bug 1686018 Opened 4 years ago Closed 4 years ago

0.35 - 0.37% Base Content JS (linux1804-64-shippable, linux1804-64-shippable-qr, macosx1014-64-shippable-qr, windows10-64-shippable, windows10-64-shippable-qr) regression on push f78e99829e2615067fe014bb8b9a7da75980c2ba (Wed January 6 2021)

Categories

(Core :: JavaScript Engine, defect, P1)

defect

Tracking

()

RESOLVED FIXED
86 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox84 --- unaffected
firefox85 --- unaffected
firefox86 --- fixed

People

(Reporter: aesanu, Assigned: tcampbell)

References

(Regression)

Details

(Keywords: perf, perf-alert, regression)

Attachments

(1 file)

Perfherder has detected a awsy performance regression from push f78e99829e2615067fe014bb8b9a7da75980c2ba. As author of one of the patches included in that push, we need your help to address this regression.

Regressions:

Ratio Suite Test Platform Options Absolute values (old vs new)
0.37% Base Content JS linux1804-64-shippable-qr 2,515,493.33 -> 2,524,762.00
0.37% Base Content JS macosx1014-64-shippable-qr 2,518,129.33 -> 2,527,402.67
0.37% Base Content JS windows10-64-shippable 2,520,112.00 -> 2,529,386.67
0.37% Base Content JS windows10-64-shippable-qr 2,520,032.00 -> 2,529,330.67
0.35% Base Content JS linux1804-64-shippable 2,516,138.33 -> 2,524,912.00

Details of the alert can be found in the alert summary, including links to graphs and comparisons for each of the affected tests. Please follow our guide to handling regression bugs and let us know your plans within 3 business days, or the offending patch(es) will be backed out in accordance with our regression policy.

For more information on performance sheriffing please see our FAQ.

Flags: needinfo?(nicolas.b.pierron)

I honestly do not understand what might be happening here.
The problem is unlikely to be the one which modifies the python code to optimize the test suite.

And the first patch inlines the code of JS::Evaluate and isolate the branch related to SelfHosted code initialization.

The only noticeable difference might be that the Rooted<frontend::CompilationInfo> compilationInfo is alive for longer than it used to be when it was isolated after the Source buffer init.

Ted, would you have any idea could have changed the retained amount of memory, otherwise I can make a tiny patch which moves the initForSelfHostingGlobal back under the source buffer init, but I honestly don't think this could be related.

Also, the 2 additional field added to the JSRuntime would not explain a ~9 KB increase in memory, even with alignment issues.

Flags: needinfo?(tcampbell)

Set release status flags based on info from the regressing bug 1668361

Taking a look. One issue is that we lost the run-once flag when we got rid of the Evaluate call. Fixing that helps, but is not entire solution and I'm looking for other small issues

Assignee: nobody → tcampbell
Flags: needinfo?(tcampbell)
Flags: needinfo?(nicolas.b.pierron)

During selfhosting initialization, we perform a GC and then freeze the
global. This means we must clear any dangling references before this GC
happens. This fixes a recent regression where we started keeping the
top-level script alive unintentionally. Also ensure the options mark the
script as run-once to match that old behaviour.

Second problem is we have a live RootedScript while we call freezeSelfHostingZone. This keeps the top-level script+bytecode alive when it wasn't before.

Pushed by tcampbell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f0c0bf6cad91 Avoid entraining top-level selfhosted script. r=nbp
Status: NEW → ASSIGNED
Priority: -- → P1
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch

== Change summary for alert #28483 (as of Mon, 18 Jan 2021 11:38:04 GMT) ==

Improvements:

Ratio Suite Test Platform Options Absolute values (old vs new)
0.44% Base Content JS linux1804-64-shippable 2,522,878.67 -> 2,511,809.33
0.44% Base Content JS linux1804-64-shippable-qr 2,522,734.67 -> 2,511,748.00
0.44% Base Content JS macosx1014-64-shippable-qr 2,525,476.00 -> 2,514,394.67
0.44% Base Content JS windows10-64-shippable 2,527,316.00 -> 2,516,254.67
0.44% Base Content JS windows10-64-shippable-qr 2,527,300.00 -> 2,516,228.00
0.37% Base Content JS windows10-64-shippable-qr 2,525,574.00 -> 2,516,348.00

For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=28483

Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: