Repository navigation
fix(runner-shared): always set PYTHONPERFSUPPORT - #577
not-matthias merged 1 commit into
Conversation
c2dfd4b to
dfe96fc
Compare
Merging this PR will not alter performance
|
The runtime env only set PYTHONPERFSUPPORT=1 in memory mode. Since exec-harness 1.4.0 relies on that env, Python exec targets in simulation mode write no /tmp/perf-<pid>.map, and valgrind callgraphs lose every Python frame. exec-harness 1.3.0 set it per command in simulation mode. Set it in every mode. In walltime, PYTHON_PERF_JIT_SUPPORT=1 takes precedence in CPython, so Linux still uses jitdump. On macOS walltime, where jitdump stays off, Python now emits the perf map. The perf trampoline adds instructions: a Python exec benchmark measured under callgrind goes from 2.22e9 to 2.51e9 Ir (+13%), back to the 1.3.0 level. Closes COD-3820
dfe96fc to
aecc796
Compare
|
GuillaumeLagrange
left a comment
There was a problem hiding this comment.
I could have caught this during review sorry
Also completely missed it. I'm a bit surprised Greptile didn't catch this too 🙃 |
TLDR: Since exec-harness 1.4.0, Python exec benchmarks in simulation mode have no Python frames in their callgraphs. The runtime env now sets
PYTHONPERFSUPPORT=1in every mode.PYTHONPERFSUPPORT=1in memory mode. Without it, Python writes no/tmp/perf-<pid>.map, so valgrind can't name Python frames. exec-harness 1.3.0 set it per command in simulation mode.PYTHON_PERF_JIT_SUPPORT=1takes precedence in CPython, so jitdump is still used.Review notes
Closes COD-3820