Closed Bug 1980830 Opened 1 year ago Closed 1 year ago

Do eager off-thread baseline compilation when baseline hints are available

Categories

(Core :: JavaScript Engine: JIT, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
144 Branch
Tracking Status
firefox144 --- fixed

People

(Reporter: denispal, Assigned: denispal)

References

(Depends on 1 open bug, Blocks 2 open bugs)

Details

(Keywords: perf-alert)

Attachments

(4 files)

Now that off-thread baseline compilation is implemented in bug 1490849, we can explore dispatching these compilations eagerly during parsing when bytecode is available. I extended some patches Ted wrote in bug 1818337 to also dispatch baseline compilations eagerly. The initial prototype has very promising Speedometer3 results with improvements of 1-3% overall on every platform.

Blocks: sm-jits
Severity: -- → N/A
Priority: -- → P3

This patch will look for functions during instantiation that have bytecode and jit hints and will eagerly dispatch baseline compilations off the main thread when present.

Adds an API in Spidermonkey to dispatch dom events so we can track when an eager baseline compilation was triggered for testing purposes.

Attachment #9508459 - Attachment description: Bug 1980830: Add API to dispatch dom events from JS and add omt eager baseline test. r=tcampbell! → Bug 1980830: Add API to dispatch dom events from JS and add omt eager baseline test. r=arai!
Attachment #9508457 - Attachment description: Bug 1980830: Eagerly baseline compile off the main thread when bytecode and jit hints are available. r=tcampbell!,iain! → Bug 1980830: Eagerly baseline compile off the main thread when bytecode and jit hints are available. r=arai!,iain!
Regressions: 1987126
Regressions: 1987175
Depends on: 1987175
No longer regressions: 1987175

(In reply to Pulsebot from comment #5)

Pushed by dpalmeiro@mozilla.com:
https://github.com/mozilla-firefox/firefox/commit/33c47a05a3ef
https://hg.mozilla.org/integration/autoland/rev/aa4c6ba2b62e
Eagerly baseline compile off the main thread when bytecode and jit hints are
available. r=iain,arai
https://github.com/mozilla-firefox/firefox/commit/7150fdfd72f8
https://hg.mozilla.org/integration/autoland/rev/c9d8c54c4ad3
Add jit-test for basic eager baseline hint functionality. r=iain
https://github.com/mozilla-firefox/firefox/commit/041d6f9267c4
https://hg.mozilla.org/integration/autoland/rev/53c2ed6b1fe6
Add interval and max tries parameters to SimpleTest.waitForCondition. r=arai
https://github.com/mozilla-firefox/firefox/commit/23d9bc8f044c
https://hg.mozilla.org/integration/autoland/rev/00788eac22a9
Add API to dispatch dom events from JS and add omt eager baseline test.
r=arai
https://github.com/mozilla-firefox/firefox/commit/ff7b14462751
https://hg.mozilla.org/integration/autoland/rev/fb66fbe43aa6
apply code formatting via Lando

Perfherder has detected a browsertime performance change from push fb66fbe43aa6e1fbe404c56172c4369c50937d87.

If you have any questions, please reach out to a performance sheriff. Alternatively, you can find help on Slack by joining #perf-help, and on Matrix you can find help by joining #perftest.

Improvements:

Ratio Test Platform Options Absolute values (old vs new) Performance Profiles
13% speedometer3 Editor-CodeMirror/Long/Sync macosx1470-64-nightlyasrelease fission webrender 13.75 -> 11.95 Before/After
12% speedometer3 React-Stockcharts-SVG/PanTheChart/Async windows11-64-24h2-nightlyasrelease fission webrender 8.78 -> 7.72
11% speedometer3 Editor-CodeMirror/Long/Sync windows11-64-24h2-nightlyasrelease fission webrender 8.72 -> 7.75
11% speedometer3 React-Stockcharts-SVG/PanTheChart/total windows11-64-24h2-nightlyasrelease fission webrender 13.96 -> 12.49
8% speedometer3 Editor-CodeMirror/Long/Sync linux1804-64-nightlyasrelease-qr fission webrender 16.39 -> 15.01 Before/After
... ... ... ... ... ...
2% speedometer3 TodoMVC-React-Redux/DeletingAllItems/total macosx1500-aarch64-shippable fission webrender 4.29 -> 4.20 Before/After

Details of the alert can be found in the alert summary, including links to graphs and comparisons for each of the affected tests.

If you need the profiling jobs you can trigger them yourself from treeherder job view or ask a performance sheriff to do that for you.

You can run all of these tests on try with ./mach try perf --alert 46640

The following documentation link provides more information about this command.

Keywords: perf-alert
Regressions: 1988377
QA Whiteboard: [qa-triage-done-c145/b144]
Depends on: 2034349
Regressions: CVE-2026-8389
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: