[Lazarus] Profiling with Valgrind and KCacheGrind

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] Profiling with Valgrind and KCacheGrind

Free Pascal - Lazarus mailing list
I am profiling and optimizing code in Lazarus IDE.
Valgrind profiler + KCacheGrind visualizer tool make a very nice combination.
A picture of KCacheGrind in real action :

KCacheGrind is part of KDE project and thus integrates well with KDE Plasma desktop.
Its authors have clearly profiled and optimized their own project. It opens super-fast although it processes megabytes of complex data and draws fancy graphics. Wow!
There are lists for callers and callees.
Data can be sorted by cumulative time, self time, number of calls, caller's distance from the function etc.
Playing with it gives a good view of what is going on, and sometimes unexpected surprises.
Usage instructions :

KCacheGrind opens by clicking the default output file, at least with my KDE + Dolphin.
No need to generate any human readable text files. KCacheGrind makes it human readable.

I built Lazarus with "-gw3 -gl -gv"
Martin builds without debug info with optimization. I will do the same thing. Optimization does not do harm for profiling as it does for debugging.
-gv is the important flag for Valgrind profiler.

Recommended!

Juha


--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus