Sampling Optimized Code for Type Feedback
summary
Prototype integrates sampling into the Ř JIT to recover type feedback lost in optimized tiers and triggers recompiles when samples contradict interpreter-collected types. It extracts native stack-layout mappings, uses PMU-based sampling of top frames to detect narrowing (e.g. a slot previously mixed now only doubles), and feeds sampled types back to reoptimize. Prototype runs with typical overhead <10% but lacks robust bail-out heuristics and can still cause deopts if samples mislead.
AI-written summary · about
chapters (9)
- 0:00JIT 101
- 3:16Problem
- 3:50Sampling
- 4:36Strategy
- 5:45Our Approach
- 9:47Success
- 12:36Uncooperative Environment
- 14:19Measurement Issues
- 15:38Profiling Optimized Code?
related talks
28mReducing Feedback Pollution
19mReusing Just-in-Time Compiled Code
27mTowards Type Debugging using Partial Evaluation
24mDecoupling Resolution from Type Inference
26mAn Analysis of Compiled Code Reusability in Dynamic Compilation
24mFormally Verified Native Code Generation in an Effectful JIT: Turning the CompCe...
16mGradually Typing Strategies
40mJoy of Meta-Tracing Just-in-Time Compilation: More Than Just a VM Generator
