Performance Bugs and Low-level Ruby Observability APIs
summary
Explains how Ruby C APIs produce concrete tools: a published low-level toolkit gem shows C examples for track_objects_created (captures allocations but must filter internal and hidden objects), uses the postpone job API to safely call Ruby from low-level callbacks (32 slots total, effectively 31), exposes frame profiling and debug inspector for cheap backtraces and mutable bindings, and implements a 107‑line release JVL profiler that finds per-thread JVL waits (example threads wait ~1.88s each, directory reads release JVL 180 times)
AI-written summary · about
chapters (10)
- 0:00Introduction and motivation
- 6:46Ruby observability APIs overview
- 11:21Tracking object allocation with trace points
- 16:25Garbage collection event monitoring
- 21:29Postpone job APIs for safe execution
- 27:50Frame profiling for back traces
- 33:08Debug inspector for deep introspection
- 37:20Global VM lock instrumentation
- 44:01Building a release JVL profiler
- 51:08Performance bugs and next steps








