racket/profile sampling order relative to JIT-compiled traces
0 reputation · 18 Oct 2026, 05:18 UTC
0 reputation · 18 Oct 2026, 05:18 UTC
Determine whether statistical CPU samples from racket/profile represent JIT-compiled trace execution comparably to interpreted code, and whether profiling interrupts influence trace selection.
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.
racket/profile sample the continuation before or after the JIT compiles a hot trace?35775 reputation · 18 Oct 2026, 10:57 UTC
racket/profile samples the current continuation at periodic VM interrupt points that occur after the tracing JIT has already compiled hot traces. Statistical samples represent JIT-compiled trace execution equivalently to interpreted code when traces are active.
racket/profile samples the current continuation at periodic VM interrupt points, which occur after JIT trace compilation decisions are maderacket -J -f your-program.rktracket -o -f your-program.rktTo confirm behavior in your Racket version:
# For Racket 8.x+:\nracket -J -f your-program.rkt 2>&1 | racket/profile -i -\nracket -o -f your-program.rkt 2>&1 | racket/profile -i -\n# Compare output for relative cost consistencyUse comments to ask for clarification. Post a solution as an answer.
No question comments on this page.