Skip to content

Python frames unresolved with PYTHON_PERF_JIT_SUPPORT=1 on macOS #826

@not-matthias

Description

@not-matthias

On macOS, samply resolves Python frames from CPython's perf map
(PYTHONPERFSUPPORT=1) but not from its jitdump (PYTHON_PERF_JIT_SUPPORT=1):
in jitdump mode every py::… frame shows up as an unresolved 0x… address.

Setup

  • macOS (arm64)
  • Python 3.15
  • Samply

Reproduction

fib.py:

def fib(n):
    if n < 2:
        return n
    return fib(n - 1) + fib(n - 2)


print(fib(36))

Works: Just using the perf-map resolves py::fib:

PYTHONPERFSUPPORT=1 samply record -- python3.15 fib.py

However, when emitting the jitdumps, we see a ton of unresolved 0x... frames and no py::fib:

PYTHON_PERF_JIT_SUPPORT=1 samply record -- python3.15 fib.py

PR with the fix has been created: mstange/linux-perf-data#27, requires a bump in samply once it's been merged+released

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions