hotspot icon indicating copy to clipboard operation
hotspot copied to clipboard

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

Open Waqar144 opened this issue 1 year ago • 7 comments
trafficstars

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 avatar May 13 '24 07:05 Waqar144

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

GitMensch avatar May 17 '24 07:05 GitMensch

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

lievenhey avatar May 24 '24 08:05 lievenhey

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

lievenhey avatar May 28 '24 14:05 lievenhey

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

milianw avatar Jul 17 '24 13:07 milianw

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 avatar Jul 17 '24 14:07 Waqar144

Same result with the hotspot-continuous.AppImage

Waqar144 avatar Jul 17 '24 14:07 Waqar144

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

milianw avatar Jul 18 '24 13:07 milianw