Skip to content

Perf profiling without frame pointers doesn't show the Python functions on the Linux 6.18.0 kernel #139544

@stratakis

Description

@stratakis

Bug report

Bug description:

When trying to use Perf without frame pointers on the latest kernel 6.18.0-0.rc0 the Python functions are not shown in the Perf output.

After compiling with a simple ./configure && make

Using:

def foo(n):
    result = 0
    for _ in range(n):
        result += 1
    return result

def bar(n):
    foo(n)

def baz(n):
    bar(n)

if __name__ == "__main__":
    baz(1000000)

$ perf record -F 9999 -g -k 1 --call-graph dwarf -o perf.data ./python -Xperf_jit script.py
$ perf inject -i perf.data --jit --output perf.jit.data
$ perf report -g -i perf.jit.data

Outputs:

python jitted-6004-170.so [.] py::BufferedIncrementalDecoder.init:
python jitted-6004-171.so [.] py::BufferedIncrementalDecoder.init:
python jitted-6004-172.so [.] py::BufferedIncrementalDecoder.init:
python jitted-6004-173.so [.] py::BufferedIncrementalDecoder.init:

Instead of e.g:
python jitted-329740-171.so [.] py:::/home/user/dev/cpython/script.py
python jitted-329740-172.so [.] py::baz:/home/user/dev/cpython/script.py
python jitted-329740-173.so [.] py::bar:/home/user/dev/cpython/script.py
python jitted-329740-174.so [.] py::foo:/home/user/dev/cpython/script.py

The kernel version 6.16.8 works fine. Haven't tested the 6.17 one.

Reproduced on the Fedora Rawhide x86_64 buildbot and also on aarch64.

CPython versions tested on:

3.14, 3.13

Operating systems tested on:

Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-linuxtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions