Closed Bug 1847258 Opened 2 years ago Closed 1 years ago

Use warmup counter of last attached IC stub as the Ion hint threshold

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
122 Branch
Tracking Status
firefox122 --- fixed

People

(Reporter: denispal, Assigned: denispal)

References

(Blocks 2 open bugs, Regressed 1 open bug)

Details

(Keywords: perf-alert, Whiteboard: [sp3])

Attachments

(2 files)

In bug 1837192, we used a value of 550 for the Ion hint threshold so that there was minimal impact on inlining decisions. However, it seems like SP3 could benefit from roughly another 1% improvement if we lower the threshold much more aggressively (I used 30 in this run) when there are no inlining candidates.

Whiteboard: [sp3]
Priority: -- → P3

"Perf" key word?

Pushed by dpalmeiro@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0f9bc02e30c3 Save the warm up counter when the last IC stub is attached. r=iain https://hg.mozilla.org/integration/autoland/rev/f24223382358 Use the warmup counter when the last IC is attached as the Ion hint threshold, and adjust inlining heuristics when the hint is used. r=iain
Status: NEW → RESOLVED
Closed: 1 years ago
Resolution: --- → FIXED
Target Milestone: --- → 122 Branch
Status: RESOLVED → REOPENED
Flags: needinfo?(dpalmeiro)
Resolution: FIXED → ---
Target Milestone: 122 Branch → ---

Still looking, but I think it may be possible for icScript->inliningRoot()->owningScript() not to have a jitScript, so we should probably guard against that case.

Flags: needinfo?(dpalmeiro)
Summary: Lower Ion hint threshold if there are no inlining candidates → Use warmup counter of last attached IC stub as the Ion hint threshold
Pushed by dpalmeiro@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d387ad455afc Save the warm up counter when the last IC stub is attached. r=iain https://hg.mozilla.org/integration/autoland/rev/7dc6122ebd68 Use the warmup counter when the last IC is attached as the Ion hint threshold, and adjust inlining heuristics when the hint is used. r=iain
Status: REOPENED → RESOLVED
Closed: 1 years ago1 years ago
Resolution: --- → FIXED
Target Milestone: --- → 122 Branch

The first time these patches had landed, there were some large improvements on some AWFY tests. However, when the patches were backed out (and then subsequently relanded), those perf improvements did not appear.

Example1 :AWFY-Jetstream2-3d-cube-SP-Average
Improvement(74%)
Backout which reverted the improvement too
Relanded with no improvement

Example2: AWFY-Jetstream2-ai-astar-Average
Improvement(15%)
Backout which reverted the improvement too
Relanded with no improvement

Not 100% sure if the improvements were from this bug or some other bug (e.g. bug 1863620 or infra issue etc.)

(In reply to Mayank Bansal from comment #11)

The first time these patches had landed, there were some large improvements on some AWFY tests. However, when the patches were backed out (and then subsequently relanded), those perf improvements did not appear.

Example1 :AWFY-Jetstream2-3d-cube-SP-Average
Improvement(74%)
Backout which reverted the improvement too
Relanded with no improvement

Example2: AWFY-Jetstream2-ai-astar-Average
Improvement(15%)
Backout which reverted the improvement too
Relanded with no improvement

Not 100% sure if the improvements were from this bug or some other bug (e.g. bug 1863620 or infra issue etc.)

Thanks for looking at this, I will try to find some time to see if these improvements can be recovered.

Flags: needinfo?(dpalmeiro)
Regressions: 1866502
Regressions: 1866612

(In reply to Pulsebot from comment #9)

Pushed by dpalmeiro@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d387ad455afc
Save the warm up counter when the last IC stub is attached. r=iain
https://hg.mozilla.org/integration/autoland/rev/7dc6122ebd68
Use the warmup counter when the last IC is attached as the Ion hint
threshold, and adjust inlining heuristics when the hint is used. r=iain

== Change summary for alert #40363 (as of Thu, 23 Nov 2023 05:15:03 GMT) ==

Improvements:

Ratio Test Platform Options Absolute values (old vs new) Performance Profiles
4% nytimes SpeedIndex macosx1015-64-shippable-qr fission warm webrender 822.58 -> 791.02 Before/After
3% nytimes loadtime macosx1015-64-shippable-qr fission warm webrender 730.50 -> 709.97 Before/After

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

(In reply to Pulsebot from comment #9)

Pushed by dpalmeiro@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d387ad455afc
Save the warm up counter when the last IC stub is attached. r=iain
https://hg.mozilla.org/integration/autoland/rev/7dc6122ebd68
Use the warmup counter when the last IC is attached as the Ion hint
threshold, and adjust inlining heuristics when the hint is used. r=iain

== Change summary for alert #40373 (as of Thu, 23 Nov 2023 12:37:32 GMT) ==

Improvements:

Ratio Test Platform Options Absolute values (old vs new) Performance Profiles
3% nytimes LastVisualChange macosx1015-64-shippable-qr fission warm webrender 1,032.56 -> 997.13 Before/After

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

== Change summary for alert #40354 (as of Thu, 23 Nov 2023 00:43:28 GMT) ==

Regressions:

Ratio Test Platform Options Absolute values (old vs new)
6% damp console.log-in-loop-content-process-longstring windows10-64-shippable-qr e10s fission stylo webrender 49.15 -> 51.96
6% damp console.log-in-loop-content-process-longstring windows10-64-shippable-qr e10s fission stylo webrender-sw 49.04 -> 51.79
4% damp console.log-in-loop-content-process-object windows10-64-shippable-qr e10s fission stylo webrender 205.02 -> 212.93
4% damp console.log-in-loop-content-process-object windows10-64-shippable-qr e10s fission stylo webrender-sw 205.02 -> 212.84
3% damp console.log-in-loop-content-process-document windows10-64-shippable-qr e10s fission stylo webrender-sw 76.29 -> 78.29
2% damp console.log-in-loop-content-process-nodelist windows10-64-shippable-qr e10s fission stylo webrender 201.55 -> 206.04

Improvements:

Ratio Test Platform Options Absolute values (old vs new)
18% damp console.log-in-loop-content-process-node windows10-64-shippable-qr e10s fission stylo webrender-sw 46.13 -> 37.66
18% damp console.log-in-loop-content-process-node windows10-64-shippable-qr e10s fission stylo webrender 45.84 -> 37.61

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

Flags: needinfo?(dpalmeiro)
No longer regressions: 1901664
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: