Skip to content

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

Closed as not planned

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

Activity

  1. added
    type-bug
    on Oct 3, 2025
  2. stratakis commented on Oct 3, 2025

    @stratakis
    ContributorAuthor
  3. changed the title [-]Perf profiling without frame pointers doesn't show the Python function on the 6.18.0 kernel[/-] on Oct 3, 2025
  4. changed the title [-]Perf profiling without frame pointers doesn't show the Python functions on the 6.18.0 kernel[/-] on Oct 3, 2025
  5. pablogsal commented on Oct 3, 2025

    @pablogsal
    Member

    Looks like a regression in perf to me. We have worked with the Linux people to implement the feature so I think is worth raising this to them.

  6. pablogsal commented on Oct 3, 2025

    @pablogsal
    Member
  7. added
    pending
    and removed
    pending
    on Oct 3, 2025
  8. stratakis commented on Oct 3, 2025

    @stratakis
    ContributorAuthor

    Maybe relevant commits, however my understanding of Perf internals is limited:

    torvalds/linux@53b00ff358dc
    torvalds/linux@5b11409b9246
    torvalds/linux@29be60c93d2d

  9. pablogsal commented on Oct 3, 2025

    @pablogsal
    Member

    Yeah this strongly suggest this is a regression: please report it to the Linux kernel perf tracker.

  10. added
    interpreter-core
    and removed
    interpreter-core
    on Oct 3, 2025
  11. picnixz commented on Oct 3, 2025

    @picnixz
    Member

    Yeah this strongly suggest this is a regression: please report it to the Linux kernel perf tracker.

    I'm going to close this issue for now.

  12. 27 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-linuxtype-bug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions