Skip to content

bench: record the measured jit-stats for three synthetic baselines - #1011

Merged
youknowone merged 1 commit into
mainfrom
fix/jitstats-measured-baselines
Aug 4, 2026
Merged

bench: record the measured jit-stats for three synthetic baselines#1011
youknowone merged 1 commit into
mainfrom
fix/jitstats-measured-baselines

Conversation

@youknowone

@youknowone youknowone commented Aug 3, 2026

Copy link
Copy Markdown
Owner

pyre/check.py is red on origin/main on all three OS runners (run 30830792937, sha 2c86af5). The same failures are present one commit earlier at c1e2c01 (run 30829934758), so they are not caused by the tip commit.

What fails

failure platforms
cranelift exception_try_call_inlined_callee_raiseloops_compiled 3 -> 2 ubuntu, macos, windows
wasm exception_try_call_inlined_callee_raiseloops_compiled 3 -> 2 ubuntu
wasm exc_in_loop_divzero_continueguard_failures 360 -> 603 ubuntu

All three reproduce locally and are byte-stable across repeated runs, so none of them is runner noise.

Why the recorded values are wrong

exception_try_call_inlined_callee_raise — the recorded loops_compiled=3 is a value no runner produces. The cranelift baseline was loops_compiled=2, guard_failures=201 until #1003 raised it to 3 / 402; every platform, and every local run, reads 2 / 201. This commit returns that file to the exact blob #1003 replaced. The wasm baseline for the same fixture gained its loops_compiled field in #1009, recorded as 3, and CI has never observed that value — the field's first CI run (30820619419, sha a031486) already failed on it. Both files now hold the same content, which the two backends measure independently.

loops_compiled is the sole member of JITSTATS_FALL_FIELDS and fails on any fall, so lowering it deserves the scrutiny: this is not a loop that stopped being compiled, it is a number that was never reproduced.

exc_in_loop_divzero_continue — this one is a real change, and the numbers say it is an improvement rather than a regression:

              committed   measured (3/3 runs)
loops_compiled        3   3
bridges_compiled      0   3
loops_aborted         0   0
guard_failures      360   603

#960 compiles bridges for this fixture where none were compiled before. The new bridges carry their own guards, so guard_failures rises alongside them. loops_compiled is unchanged, so no loop was lost. The gate flagged the rise because a guard_failures rise is a regression by default; here it is the cost of bridges that now exist.

Verification

python pyre/check.py --synthetic-only, run per backend on this branch:

  • cranelift 356/356
  • wasm 355/355

Individual fixtures were also measured directly against pyre-cranelift and pyre-wasm-runner (3–5 runs each, identical every time) before the baselines were written, rather than only through check.py's snapshot path.

Not addressed here

The CPython suite (gate) job is also red: test.test_asyncio: PASS -> TIMEOUT. It starts at #1003 and is a behaviour change, not a recorded value, so raising the timeout would hide it. It needs its own investigation and is left untouched by this PR — main stays red on that job after this merges, while the three pyre/check.py jobs go green.

authored by Claude

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • Updated JIT benchmark expectations to reflect current bridge compilation, guard failure, and loop compilation statistics.
    • Corrected reported aborted-loop counts in exception-handling scenarios.

check.py fails on origin/main across all three OS runners. Three recorded
baselines do not match what any platform measures.

  exception_try_call_inlined_callee_raise.cranelift
    loops_compiled 3 -> 2, guard_failures 402 -> 201
  exception_try_call_inlined_callee_raise.wasm
    loops_compiled 3 -> 2, loops_aborted 1 -> 0, guard_failures 821 -> 201
  exc_in_loop_divzero_continue.wasm
    bridges_compiled 0 -> 3, guard_failures 360 -> 603

The first two record the values every runner reads. The cranelift file
returns to the content #1003 replaced, and the wasm file, whose fields
#1009 first recorded, converges on that same content. Measured over
repeated runs of pyre-cranelift and pyre-wasm-runner, identical each time,
and CI reads 2 on ubuntu, macos and windows alike.

The third records a bridge count that rose from zero. #960 compiles
bridges for this fixture where none were compiled before; the new bridges
carry their own guards, so guard_failures rises with them. loops_compiled
stays at 3, so no loop was lost.

check.py --synthetic-only: cranelift 356/356, wasm 355/355.

The CPython suite gate is red for an unrelated reason and is untouched
here: test.test_asyncio went PASS -> TIMEOUT starting at #1003 and is a
behaviour change, not a recorded value.

Assisted-by: Claude
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 0d0d4334-cdf1-43f4-8141-f9a8bf9581d0

📥 Commits

Reviewing files that changed from the base of the PR and between 2c86af5 and 6c3ac5c.

📒 Files selected for processing (3)
  • pyre/bench/synth/exc_in_loop_divzero_continue.wasm.jitstats
  • pyre/bench/synth/exception_try_call_inlined_callee_raise.cranelift.jitstats
  • pyre/bench/synth/exception_try_call_inlined_callee_raise.wasm.jitstats

Walkthrough

The PR updates three benchmark JIT-statistics baselines. The changes record revised compiled bridges, guard failures, compiled loops, and aborted loops. No public declarations change.

Changes

JIT statistics

Layer / File(s) Summary
Benchmark baseline updates
pyre/bench/synth/*.jitstats
The benchmark baselines record revised bridge, guard-failure, compiled-loop, and aborted-loop counters for wasm and cranelift scenarios.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Possibly related PRs

Poem

I’m a rabbit with stats in my ear,
Three bridges now compile clear.
Guard counts hop and loops settle low,
Aborted paths find nowhere to go.
Baselines align—off we go! 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the measured JIT-stat baseline updates described in the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/jitstats-measured-baselines

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

🤖 Codex parity review

Static analysis of this diff vs the local RPython/PyPy sources (commit 6c3ac5c).
Updated: 2026-08-03T20:32:47.198Z

The diff against the review base changes only generated jit-stats baselines (3 file(s)); nothing to review.

@youknowone
youknowone merged commit 711ab52 into main Aug 4, 2026
17 of 19 checks passed
@youknowone
youknowone deleted the fix/jitstats-measured-baselines branch August 4, 2026 03:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant