Commit graph

7 commits

Author SHA1 Message Date
Max Bernstein
998be6b3a4
ZJIT: Add flag to disable the HIR optimizer (#14181)
Also add a check in the bisect script that can assign blame to the HIR
optimizer.
2025-08-12 13:00:22 -04:00
Max Bernstein
c6a27a0253 ZJII: Address review feedback 2025-08-08 08:15:18 -07:00
Max Bernstein
180469a3a7 ZJIT: Actually kill timed-out process in bisect 2025-08-08 08:15:18 -07:00
Max Bernstein
0782bd2826 ZJIT: Use OptionParser in bisect script 2025-08-08 08:15:18 -07:00
Max Bernstein
fd6d6a45cd ZJIT: Use shellwords in bisect script 2025-08-08 08:15:18 -07:00
Max Bernstein
0b30cf3b40 ZJIT: Print out command to repro in bisect script 2025-08-08 08:15:18 -07:00
Max Bernstein
039f4139f8
ZJIT: Create delta debugging script to narrow JIT failures (#14041)
Add support for `--zjit-allowed-iseqs=SomeFile` and
`--zjit-log-compiled-iseqs=SomeFile` so we can restrict and inspect
which ISEQs get compiled.

Then add `jit_bisect.rb` which we can run to try and narrow a failing
script. For example:

    plum% ../tool/zjit_bisect.rb ../build-dev/miniruby "test.rb"
    I, [2025-07-29T12:41:18.657177 #96899]  INFO -- : Starting with JIT list of 4 items.
    I, [2025-07-29T12:41:18.657229 #96899]  INFO -- : Verifying items
    I, [2025-07-29T12:41:18.726213 #96899]  INFO -- : step fixed[0] and items[4]
    I, [2025-07-29T12:41:18.726246 #96899]  INFO -- : 4 candidates
    I, [2025-07-29T12:41:18.797212 #96899]  INFO -- : 2 candidates
    Reduced JIT list:
    bar@test.rb:8
    plum%

We start with 4 compiled functions and shrink to just one.
2025-07-29 19:43:14 +00:00