alt.hn

5/19/2025 at 9:33:03 PM

Hotspot: Linux `perf` GUI for performance analysis

https://github.com/KDAB/hotspot

by jez

5/22/2025 at 8:29:33 AM

Fun fact: firefox also supports loading 'perf' reports: https://profiler.firefox.com/

by gue-ni

5/22/2025 at 9:27:52 AM

useful for small profiles, but it blows up on larger ones. hotspot handles multi-gigabytes recordings fine on the same hardware.

by the8472

5/22/2025 at 12:19:31 PM

I still think we should find a way to integrate the two somehow - i.e. analyze locally and then send the pre-analyzed data for visualization purposes to the remote firefox profiler. Does anyone know a good format we could use for that purpose? It needs to be non-verbose to not hit the infamous 2GB/4GB JSON heap size limitation on import e.g. Similarly, we also need something that can deal with the various cost types we support in hotspot, most notably off-CPU time.

by milianw

5/22/2025 at 1:14:49 PM

samply [0] does something to send data to Firefox Profiler that I've had better results with compared to the regular import.

[0]: https://github.com/mstange/samply

by pityJuke

5/22/2025 at 9:50:28 AM

From the same author, Heaptrack to investigate memory usage is also very helpful: https://invent.kde.org/sdk/heaptrack/

by ognarb

5/22/2025 at 11:04:17 AM

I just assumed they used the same gui toolkit. Awesome to hear they're from the same author.

by throwaway0665

5/22/2025 at 2:36:26 PM

(The toolkit is Qt.)

by mananaysiempre

5/22/2025 at 11:51:36 AM

I primarily do macOS development work and use Instruments for profiling, but have been working on Linux a lot lately and Hotspot has been pulled out a lot over the last few weeks. Highly recommended.

by directmusic

5/22/2025 at 8:56:01 AM

Great tool that has been really helpful in helping me find unexpected bottlenecks in the codebases I've been working on.

It's easy to use, and pairs beautifully with the unintrusive perf tool, which makes the combination a joy to use.

And, if combined with a codebase opened in QtCreator, you can click on a hotspot in the flamegraph, and it will bring you automagically to the correct file and line in QtCreator, without any explicit linking required between the two programs. I discovered that feature accidentally, and the fact that it just worked seamlessly really impressed me. (Tested on a Debian-based Linux).

A big thanks to KDAB for making this tool available to us!

by fransje26

5/22/2025 at 12:15:07 PM

You are welcome :)

And to people using other IDE/editors - you can configure which one gets opened when you click on a source line from the hotspot settings. QtCreator is just the default (when that is installed).

by milianw

5/22/2025 at 4:20:59 PM

And, of course, a big thanks to you for writing this tool! :-)

by fransje26

5/22/2025 at 1:24:40 PM

This is a fantastic tool and I recommend it! I use it every day to recursively solve bottlenecks in our code base.

by wizzledonker

5/22/2025 at 8:00:33 PM

I couldn't figure out how to use hotspot. I used speedscope instead: https://www.speedscope.app/

Maybe I should check out hotspot again.

by dustbunny

5/22/2025 at 5:44:53 PM

I'm on FreeBSD, so its a lot of overhead to check myself: But, does this have a source view like Vtune, that can attribute cycles / cache misses / etc, to a line of code? I see it has an assembly view..

by drewg123

5/22/2025 at 9:33:36 AM

Nice tool, thanks for the heads up.

by pjmlp

5/22/2025 at 1:56:38 PM

Wonderful tool. Has been incredibly useful in optimising LibreOffice.

by grandinj