Content-Length: 307048 | pFad | http://github.com/python/cpython/pull/136461/commits/3dac7a9d81642134ac3be54f5450fde0a7487725

82 gh-136459: Add perf trampoline support for macOS by canova · Pull Request #136461 · python/cpython · GitHub
Skip to content

gh-136459: Add perf trampoline support for macOS #136461

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jul 22, 2025
Prev Previous commit
Next Next commit
Update the docs for perfmaps to mention that macOS is supported
  • Loading branch information
canova committed Jul 17, 2025
commit 3dac7a9d81642134ac3be54f5450fde0a7487725
9 changes: 5 additions & 4 deletions Doc/c-api/perfmaps.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
Support for Perf Maps
----------------------

On supported platforms (as of this writing, only Linux), the runtime can take
On supported platforms (as of this writing, Linux and macOS), the runtime can take
advantage of *perf map files* to make Python functions visible to an external
profiling tool (such as `perf <https://perf.wiki.kernel.org/index.php/Main_Page>`_).
A running process may create a file in the ``/tmp`` directory, which contains entries
that can map a section of executable code to a name. This interface is described in the
profiling tool (such as `perf <https://perf.wiki.kernel.org/index.php/Main_Page>`_ or
`samply <https://github.com/mstange/samply/>`_). A running process may create a
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a shameless plug to samply 😄 Disclaimer: I'm not the maintainer of the project, but the maintainer is my colleague. But it doesn't change the fact that it's an awesome profiler! But I can revert it if you prefer not to include :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am happy with the plug, but this docs are going to need much more than this then. If samply is the main way to use this on macOS then we will need to update https://docs.python.org/3/howto/perf_profiling.html with full instructions for samply :)

file in the ``/tmp`` directory, which contains entries that can map a section
of executable code to a name. This interface is described in the
`documentation of the Linux Perf tool <https://git.kernel.org/pub/scm/linux/
kernel/git/torvalds/linux.git/tree/tools/perf/Documentation/jit-interface.txt>`_.

Expand Down








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/python/cpython/pull/136461/commits/3dac7a9d81642134ac3be54f5450fde0a7487725

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy