KDAB / hotspot

The Linux perf GUI for performance analysis.
4.05k stars 250 forks source link

"Failed to export flamegraph: image is empty". #637

Closed RokeJulianLockhart closed 3 months ago

RokeJulianLockhart commented 3 months ago

Describe the bug

I'm unable to export a flamegraph .BMP.

To Reproduce

  1. Install https://kojipkgs.fedoraproject.org//packages/dolphin/24.02.2/2.fc40/x86_64/dolphin-24.02.2-2.fc40.x86_64.rpm from https://koji.fedoraproject.org/koji/rpminfo?rpmID=38381846

  2. cd "$HOME" # so that the last command works as expected
    perf record --call-graph dwarf dolphin && `
    hotspot '$HOME/perf.data'
  3. Attempt to export a flamgraph bitmap.

  4. Save the image via the KDE File Picker (I presume via the XDG portal).

Expected behavior

The .BMP should be saved.

Screenshots

  1. image

  2. Screenshot_20240513_154645

Version Info (please complete the following information):

Linux Kernel version https://kojipkgs.fedoraproject.org//packages/kernel/6.8.9/300.fc40/x86_64/kernel-6.8.9-300.fc40.x86_64.rpm from https://koji.fedoraproject.org/koji/rpminfo?rpmID=38509280
perf version https://kojipkgs.fedoraproject.org//packages/kernel-tools/6.5.4/300.fc39/x86_64/bpftool-6.5.4-300.fc39.x86_64.rpm from https://koji.fedoraproject.org/koji/rpminfo?rpmID=35951581
Hotspot version (AppImage? self-compiled?) https://kojipkgs.fedoraproject.org//packages/hotspot/1.4.1/5.fc40/x86_64/hotspot-1.4.1-5.fc40.x86_64.rpm from https://koji.fedoraproject.org/koji/rpminfo?rpmID=37327082
If self-compiled Hotspot, what version of elfutils Not self-compiled.

Additional context

  1. I need this feature for https://discuss.kde.org/t/dolphin-struggles-to-load-directories-which-contain-many-files/15450/10?u=rokejulianlockhart
  2. This feature appears to have been added in https://github.com/KDAB/hotspot/issues/45#event-2927708114
lievenhey commented 3 months ago

You need to open the flamegraph tab first, otherwise the image is not rendered and thus cannot be saved.

RokeJulianLockhart commented 3 months ago

https://github.com/KDAB/hotspot/issues/637#issuecomment-2111910858

@lievenhey, isn't that worth explaining in the relevant dialog window, then?

lievenhey commented 3 months ago

that is already done https://github.com/KDAB/hotspot/pull/588