General

Profile

alanwu (Alan Wu)

  • Login: alanwu
  • Registered on: 10/28/2018
  • Last sign in: 10/21/2026

Issues

open closed Total
Assigned issues 2 33 35
Reported issues 3 51 54

Projects

Project Roles Registered on
Ruby Committer 03/19/2021

Activity

11/10/2026

04:44 PM Ruby Revision 91a08e0a (git): ZJIT: A64: Add stable_disasm() for snapshot tests
Code that loads an address in the code region can't be snapshot as-is,
since the dummy CodeBlock is mapped at a different address every run and
the number of instructions it takes to load an address depends on it.
stable_disasm() collap...
alanwu (Alan Wu)
04:44 PM Ruby Revision ebc72e39 (git): ZJIT: A64: Load address, not offset for far jumps in emit_jmp_ptr
Since CodePtr became an offset into the code region, the fallback in
emit_jmp_ptr for targets out of the range of `b` loads that offset
instead of the address before `br`, so it jumps to a small address.
Every side exit ends with a jump...
alanwu (Alan Wu)
04:44 PM Ruby Revision 7be1ce89 (git): ZJIT: A64: Load address, not offset for far conditional jumps to a CodePtr
generate_branch takes the destination as an offset into the code region,
and its far path uses that offset both to size the load and as the value
to load before `br`. So it previously jumped to a small address
erroneously.
Nothing emits...
alanwu (Alan Wu)

11/07/2026

02:39 AM Ruby Bug #22465: Method lookup cache invalidation loop from Kernel#extend
WIP at <https://github.com/ruby/ruby/pull/19764>. Eyes welcome. alanwu (Alan Wu)

11/06/2026

09:30 PM Ruby Revision 3e79ec18 (git): ZJIT: A64: Remove unnecessary `reg=reg+0` from `IncrCounter`
alanwu (Alan Wu)

11/05/2026

12:05 AM Ruby Revision 9573399e (git): ZJIT: Set INSTA_WORKSPACE_ROOT to save ~15ms per snapshot test
Without this it shells out to `cargo metadata` which takes about ~15ms
per snapshot test. The costs add up quickly considering we give each
test a dedicated process. Setting this variable saves ~1.5s in a full
test run on my laptop.
alanwu (Alan Wu)

11/04/2026

08:09 PM Ruby Revision 9f6a9d0a (git): ZJIT: A64: Use STADD for counters when LSE is available
Use a single-instruction relaxed add instead of a retry loop (!) for
counters when Large System Extensions (LSE) are available. For
reference, Apple's M series chips all have LSE.
Implementation is straightforward thanks to Rust's
`is_a...
alanwu (Alan Wu)

11/03/2026

10:38 PM Ruby Revision 70ad14ae (git): ZJIT: Make `side_exit_count` a default counter
Previously, ZJIT required --zjit-stats for showing how many side exits
had been taken. As the first point of contact for ZJIT performance
observability, this info was too hidden, not least because --zjit-stats
has a significant probe eff...
alanwu (Alan Wu)
10:38 PM Ruby Revision 26d140fc (git): ZJIT: Add --zjit-no-exit-counting
alanwu (Alan Wu)

11/02/2026

08:50 PM Ruby Revision b51db981 (git): ZJIT: Bitstream encoding for stack map unwind code (GH-19570)
Use a simple `tag,payload` scheme with a variable length integer scheme
for the opcodes in zjit_jit_frame_t. The integer scheme (`varint`)
uses a set high bit to signal to read more.
This is setup work for having locals in the stack map...
alanwu (Alan Wu)

Also available in: Atom