Exit(ing) Through the YJIT
summary
Built a YJIT tracer that records every side‑exit backtrace and marshals dumps so stackprof can walk them, revealing the exact Ruby file and line causing exits. Implementation starts in C then is rewritten in Rust to target x86 and ARM. Running it on Rails surfaces concrete data (example: ops_without_block ≈ 43% of exits), lets engineers choose whether to implement missing instructions like check_match or refactor code, and it works end to end.
AI-written summary · about
chapters (6)
- 0:00Start
- 9:40Pre-requisites
- 11:11Configure Ruby: Set prefix
- 11:42Configure Ruby: Disable rdoc
- 12:57YJIT dev mode
- 22:46Fixing broken code
related talks
28mTracing your way through Ruby
31mPeeking into Ruby: Tracing Running Code
30mYJIT - Building a new JIT Compiler inside CRuby
38mDispelling the dark magic: Inside a Ruby debugger
20mBYOJ: Build your own JIT with Ruby
20mEvaluating YJIT’s Performance in a Production Context: A Pragmatic Approach
37mKeynote: YJIT's Three Languages: the Fun of Code that Writes Code
29mRuby Internals: A Guide For Rails Developers
