racket/profile sampling order relative to JIT-compiled traces
0 reputation · 18 Oct 2026, 05:18 UTC
Goal
Determine whether statistical CPU samples from racket/profile represent JIT-compiled trace execution comparably to interpreted code, and whether profiling interrupts influence trace selection.
Constraints and uncertainty
racket/profile samples the current continuation through periodic VM interrupts, while Racket's tracing JIT dynamically compiles hot paths. Documentation does not specify whether sampling occurs before or after trace compilation, or whether profiling interrupts alter JIT heuristics. Version-specific behavior should be confirmed against the installed Racket release.
Questions
- Does
racket/profilesample the continuation before or after the JIT compiles a hot trace? - Can profile results from a JIT-enabled run be compared with a JIT-disabled run without adjustment?
- Is there a documented way to correlate profile samples with JIT compilation events?