Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After upgrading project to C++20, hotspot shows incorrect flamegraph/stacktrace #635

Open
Waqar144 opened this issue May 13, 2024 · 7 comments
Labels
bug needs_info not enough info

Comments

@Waqar144
Copy link

Waqar144 commented May 13, 2024

Describe the bug

Recently we updated Kate text editor to use C++20. After the switch, I noticed that the flamegraph being shown in hotspot was incorrect consistently. (I am not sure if this will be reproducible in any other C++20 app)

To Reproduce
Steps to reproduce the behavior:

  • Build kate using kdesrc-build (needs Qt6): kdesrc-build --include-dependencies kate
  • Source the prefix: source /path/to/kate/build/prefix.sh
  • start kate via perf: perf record --call-graph dwarf kate -b -n .
  • exit kate
  • open hotspot and see weird stacktraces

CMake flags used:

cmake-options -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_FLAGS="-fno-omit-frame-pointer" -DECM_ENABLE_SANITIZERS="address;leak" -DCMAKE_BUILD_TYPE=RelWithDebInfo

Expected behavior
The stacktrace is correct

Screenshots

image

output of perf report:

image

.perfparser file for the above screenshot: perf.data.perfparser.tar.gz

Version Info (please complete the following information):

  • Linux Kernel version: 6.6.26-1
  • perf version: 6.7-1
  • hotspot version: self-compiled, master branch
  • if self-compiled hotspot, what version of elfutils: 0.191-1
  • Qt version: 5.15.12
@Waqar144 Waqar144 added the bug label May 13, 2024
@GitMensch
Copy link
Contributor

Just to recheck: is it better if you have the full QT debug info (looks like some symbols were missing)?

@lievenhey
Copy link
Contributor

Can you share the orignal perf.data file? I tried reproducing the issue but I couldn't see those weird traces.

@lievenhey lievenhey added the needs_info not enough info label May 27, 2024
@lievenhey
Copy link
Contributor

Could you try again with the appimage release? We had some problems with an old elfutils version.

@milianw
Copy link
Member

milianw commented Jul 17, 2024

@Waqar144 do you still run into this? if so please reopen (and ideally provide a way to reproduce - we cannot so far)

@milianw milianw closed this as completed Jul 17, 2024
@Waqar144
Copy link
Author

Yes, I am still running into this issue. Tried the latest appImage (1.5.1) as well as the latest master. Attaching the perf.data file: perf.zip

@Waqar144
Copy link
Author

Waqar144 commented Jul 17, 2024

Same result with the hotspot-continuous.AppImage

@milianw
Copy link
Member

milianw commented Jul 18, 2024

the perf.data file is not relocatable, to analyze it we'd basically need your selfcompiled .so files too

@milianw milianw reopened this Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs_info not enough info
Projects
None yet
Development

No branches or pull requests

4 participants