You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Consider enabling perf trampoline on macOS #136459
Currently perf trampoline (with PYTHONPERFSUPPORT=1) is Linux only. I assume it's mainly because perf is a Linux-only tool. But since then more non-Linux only profilers added support for Linux perf maps. For example samply supports perf maps for a while now that's availabe both on Linux and macOS. I think there is no reason to keep it Linux only, especially since we now have tools that can use it.
I would be interested to work on this if there are no objections or concerns. I actually already have a working prototype, so I will polish it and submit a PR soon.
For example this currently works on Linux:
samply record PYTHONPERFSUPPORT=1 python test.py
But it doesn't output this perf map file for samply to use on macOS. It could be super useful to have it for macOS profiling.
Activity
StanFromIreland commentedon Jul 9, 2025
cc @pablogsal
pythongh-136459: Use frame pointers in the x86_64 perf trampolines
pythongh-136459: Use frame pointers in the x86_64 perf trampolines
gh-136459: Add perf trampoline support for macOS (#136461)
encukou commentedon Jul 23, 2025
The macOS trampoline support broke Fedora buildbots, for example: https://buildbot.python.org/all/#/builders/543/builds/8303
Working on a fix.
pythongh-136459: Use platform-specific type in perf_jit_trampoline
gh-136459: Use platform-specific type in perf_jit_trampoline (GH-137031)
encukou commentedon Jul 23, 2025
Merged without review to unbreak tier-1 buildbots.
pythongh-136459: Add perf trampoline support for macOS (python#136461)
pythongh-136459: Use platform-specific type in perf_jit_trampoline (p…
pythongh-136459: Add perf trampoline support for macOS (python#136461)
pythongh-136459: Use platform-specific type in perf_jit_trampoline (p…