wasm: enable lazy tiering for all content
Categories
(Core :: JavaScript: WebAssembly, task, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox140 | --- | fixed |
People
(Reporter: rhunt, Assigned: jseward)
References
Details
(Keywords: perf-alert)
Attachments
(1 file)
We believe that enabling lazy tiering for all content (not just GC modules) will improve startup time and also peak performance through support for inlining.
For shipping this, we need to:
- Flip the 'lazy_tiering' pref to true [1]
- Disable lazy tiering when the 'test serialization' pref is turned on [2]. This will keep us testing serialization by falling back to eager compilation.
We probably also want to:
- Decide what to do if we don't have helper threads available. Right now we will disable tiering and fall back to a 'once' compilation [3]. We possibly could fall back to synchronous compilation in that case. That is how JS works, if I understand correctly.
- (pre-existing) Ensure that CanFlushExecutionContextForAllThreads is thread safe. It looks like there is a race condition in the function around 'computed' and 'hasMembarrier'.
As a follow up once lazy tiering for all content has been shipped in a release or two, we should replace the two lazy tiering prefs with an 'eager' tiering pref that is off by default.
[1] https://searchfox.org/mozilla-central/rev/7857ea04d142f2abc0d777085f9e54526c7cedf9/modules/libpref/init/StaticPrefList.yaml#8879-8883
[2] https://searchfox.org/mozilla-central/rev/7857ea04d142f2abc0d777085f9e54526c7cedf9/js/public/WasmFeatures.h#157
[3] https://searchfox.org/mozilla-central/rev/7857ea04d142f2abc0d777085f9e54526c7cedf9/js/src/wasm/WasmCompile.cpp#837
[4] https://searchfox.org/mozilla-central/rev/7857ea04d142f2abc0d777085f9e54526c7cedf9/js/src/jit/FlushICache.cpp#59
| Assignee | ||
Updated•6 months ago
|
| Assignee | ||
Comment 1•6 months ago
|
||
Currently wasm lazy tiering is enabled by default only for content that uses
the wasm-GC feature set. This patch enables lazy tiering for all wasm content.
Lazy tiering is disallowed if the "test serialization" pref is enabled, or if
no helper threads are available.
As a ridealong fix, a potential race in CanFlushExecutionContextForAllThreads
is fixed -- applies to 32- and 64-bit ARM on Linux and Android only.
Backed out for causing Mochitest LeakSanitizer failures
Comment 4•6 months ago
|
||
There is an r+ patch which didn't land and no activity in this bug for 2 weeks.
:jseward, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit BugBot documentation.
| Reporter | ||
Comment 5•6 months ago
|
||
We're working on it.
Comment 7•6 months ago
|
||
Backed out for causing failures at test_webassembly_compile.html.
Backout link: https://hg-edge.mozilla.org/integration/autoland/rev/c65e2478bd4ca1cc308428afff60c5d701f0e8d7
Failure log: https://treeherder.mozilla.org/logviewer?job_id=505907544&repo=autoland&lineNumber=5167
Comment 9•5 months ago
|
||
| bugherder | ||
Comment 10•5 months ago
|
||
17% improvement on Godot-tiering.
(this is a best guess as these tests run on m-c so i dont know how to do backfills)
Comment 11•5 months ago
|
||
~1% overall improvement on Jetstream2
driven by:
- 41.5% improvement on hashset-runtime
- 71% on quicksort
- 15% on tsf-wasm
- 5% on richards-wasm
- 2% on gcc-loops
probably more, but the results are noisy.
| Assignee | ||
Updated•5 months ago
|
Comment 12•5 months ago
|
||
(In reply to Pulsebot from comment #8)
Pushed by jseward@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9618824194c5
wasm: enable lazy tiering for all content. r=rhunt.
Perfherder has detected a devtools performance change from push 9618824194c55ecf89f162b1044e637171067a7b.
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) |
|---|---|---|---|---|
| 17% | damp source-map.simple.DAMP | linux1804-64-shippable-qr | e10s fission stylo webrender | 208.42 -> 173.52 |
| 12% | damp source-map-loader.init.DAMP | windows11-64-24h2-shippable | e10s fission stylo webrender | 51.58 -> 45.37 |
| 6% | damp source-map.simple.DAMP | windows11-64-24h2-shippable | e10s fission stylo webrender | 92.67 -> 87.39 |
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 44986
The following documentation link provides more information about this command.
Comment 13•5 months ago
|
||
(In reply to Sebastian Hengst [:aryx] (needinfo me if it's about an intermittent or backout) from comment #9)
Perfherder has detected a mozperftest performance change from push 9618824194c55ecf89f162b1044e637171067a7b.
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) |
|---|---|---|---|---|
| 44% | browser_translations_perf_es_en.js peak-memory-usage | windows11-64-24h2-shippable | 564.99 -> 318.53 | |
| 42% | browser_translations_perf_es_en.js peak-memory-usage | linux1804-64-shippable | 479.39 -> 278.16 | |
| 42% | browser_translations_perf_es_en.js peak-memory-usage | macosx1015-64-shippable-qr | 484.70 -> 283.45 | |
| 9% | browser_translations_perf_es_en.js engine-init-time | linux1804-64-shippable | 299.11 -> 271.91 | |
| 7% | browser_translations_perf_es_en.js stabilized-memory-usage | linux1804-64-shippable | 293.92 -> 274.15 | |
| ... | ... | ... | ... | ... |
| 6% | browser_translations_perf_es_en.js stabilized-memory-usage | windows11-64-24h2-shippable | 331.89 -> 311.60 |
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 44982
The following documentation link provides more information about this command.
Updated•5 months ago
|
Description
•