Closed Bug 1664786 Opened 4 years ago Closed 4 years ago

Warp: tweak inlining heuristics

Categories

(Core :: JavaScript Engine: JIT, task, P2)

task

Tracking

()

RESOLVED FIXED
82 Branch
Tracking Status
firefox82 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

(Blocks 1 open bug, Regressed 1 open bug)

Details

Attachments

(8 files)

I have some patches to improve trial inlining.

To prevent getting stuck in Baseline because we can't tier up in trial-inlined
scripts.

Depends on D90225

This makes inlining more effective because we can inline more before Warp compilation
happens.

Depends on D90226

To help prevent badness (security, perf, memory usage) in pathological cases.

Depends on D90228

Later on we could remove the BytecodeLocation/JSOp use too and replace it with a
tag/flag on trial-inliable stubs.

Depends on D90229

Keywords: leave-open
Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e124e2c9e4ca
part 1 - Be more conservative with trial inlining depth and recursion. r=iain
https://hg.mozilla.org/integration/autoland/rev/c4379a121a32
part 2 - Don't trigger Ion compilation or OSR in trial-inlined scripts. r=iain
https://hg.mozilla.org/integration/autoland/rev/149d67f2d77c
part 3 - Don't trial inline scripts that entered Warp via OSR. r=iain
https://hg.mozilla.org/integration/autoland/rev/cfb6ef22174c
part 4 - Set initial warm-up threshold for trial-inlined scripts. r=iain
https://hg.mozilla.org/integration/autoland/rev/84cc1114fc4f
part 5 - Reset warm-up counts in inlined ICScripts too. r=iain
https://hg.mozilla.org/integration/autoland/rev/f5f7119a80ac
part 6 - Limit total bytecode size when trial inlining. r=iain
https://hg.mozilla.org/integration/autoland/rev/d8078e1dea25
part 7 - Iterate over IC entries list. r=iain

This patch adds an enum class to track the inlining state per fallback stub and
uses it for the following:

  • Don't scan CacheIR of stubs we definitely can't inline (will matter more for getters/setters).
  • Similarly, optimize the check for trial-inlined stubs in WarpOracle.
  • Assert in WarpOracle that we didn't trial-inline a stub the transpiler doesn't support.
  • Ensure we never attempt a second trial-inlining at the same location.
Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/924265487b20
part 8 - Add TrialInliningState to the fallback stub. r=iain
Keywords: leave-open
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch
No longer regressions: CVE-2020-26952
Regressions: 1692856
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: