Bug 2334801 - perf annotate missing source code annotation
Summary: perf annotate missing source code annotation
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 41
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL: https://discussion.fedoraproject.org/...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-12-29 10:39 UTC by Letu Ren
Modified: 2024-12-29 11:26 UTC (History)
15 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Letu Ren 2024-12-29 10:39:34 UTC
1. Please describe the problem:
- Compiling main.cpp `g++ -ggdb main.cpp -o main`
- Record `perf record ./main`
- View `perf annotate main`
There is no source code annotation. I've tried to press `s`.
```
Samples: 2K of event 'cycles:Pu', 4000 Hz, Event count (approx.): 2895263961
main  /home/fanta/develop/cpp/main [Percent: local period]
Percent │    0x401136 <main>:
        │      pushq %rbp
        │      movq  %rsp,%rbp
        │      subq  $0x10,%rsp
        │      movq  $0x0,-0x8(%rbp)
        │      movl  $0x0,-0xc(%rbp)
        │    ↓ jmp   26
  15.73 │19:┌─→movl  -0xc(%rbp),%eax
   2.76 │   │  cltq
   8.92 │   │  addq  %rax,-0x8(%rbp)
  18.55 │   │  addl  $0x1,-0xc(%rbp)
   5.98 │26:├──cmpl  $0x3b9ac9ff,-0xc(%rbp)
  48.06 │   └──jle   19
        │      movq  -0x8(%rbp),%rax
        │      movq  %rax,%rsi
        │      movl  $0x404040,%edi
        │    → callq std::ostream::operator<<(unsigned long)@plt
        │      movl  $0x4022b8,%esi
        │      movq  %rax,%rdi
        │    → callq std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char co
        │      movl  $0x0,%eax
        │      leave
        │    ← retq
```
I've tried in a freshly installed VM. It can be reproduced.


2. What is the Version-Release number of the kernel:
perf-6.12.6-200.fc41.x86_64


3. Did it work previously in Fedora? If so, what kernel version did the issue
   *first* appear?  Old kernels are available for download at
   https://koji.fedoraproject.org/koji/packageinfo?packageID=8 :
I don't know. I just use Fedora for several days.

4. Can you reproduce this issue? If so, please provide the steps to reproduce
   the issue below:
Yes. Just like described above.


5. Does this problem occur with the latest Rawhide kernel? To install the
   Rawhide kernel, run ``sudo dnf install fedora-repos-rawhide`` followed by
   ``sudo dnf update --enablerepo=rawhide kernel``:


6. Are you running any modules that not shipped with directly Fedora's kernel?:
No


7. Please attach the kernel logs. You can get the complete kernel log
   for a boot with ``journalctl --no-hostname -k > dmesg.txt``. If the
   issue occurred on a previous boot, use the journalctl ``-b`` flag.

Reproducible: Always

Comment 1 Letu Ren 2024-12-29 11:26:02 UTC
This problem occur with the latest Rawhide kernel
```
uname -a
Linux bogon 6.13.0-0.rc4.20241227gitd6ef8b40d075.39.fc42.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Dec 27 14:44:03 UTC 2024 x86_64 GNU/Linux
```


Note You need to log in before you can comment on or make changes to this bug.