Skip to content

Consider enabling perf trampoline on macOS #136459

Open
@canova

Description

@canova

Feature or enhancement

Proposal:

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.

Not related to Python, but we enabled the perf trampoline support for macOS on SpiderMonkey. Also, v8 enabled it on macOS recently. It would be great to have this for Python as well!

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-macinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy