There are several hooks in the pypyjit module that may help you with understanding what's pypy's JIT doing while running your program. There are three functions related to that coming from the pypyjit module:
A class describing current snapshot. Usable attributes:
- counters - internal JIT integer counters
- counter_times - internal JIT float counters, notably time spent TRACING and in the JIT BACKEND
- loop_run_times - counters for number of times loops are run, only works when enable_debug is called.