[fpc-pascal] Trying to use gprof profiler, but linking keeps failing

mailinglists at geldenhuys.co.uk mailinglists at geldenhuys.co.uk
Sun Mar 22 19:02:08 CET 2026


On 2026-03-22 07:28, Martin Frb via fpc-pascal wrote:
> 
> May I be so curious to ask how the results compared to valgrind?

I went back to the same commit and retested with Valgrind. The profiling 
results were very close: 84% (gprof) vs. 80% (Valgrind) of call time 
spent in one method. Both reported the same overall issue. Valgrind also 
listed other methods, but they primarily lead up to the actual 
performance culprit. Overall, I felt gprof provided clearer results.

The biggest difference, however, was performance. With gprof, the 
application runs normally; I couldn't visually observe a noticeable 
runtime difference compared to when profiling is disabled. With 
Valgrind, it’s like playing a game at 2 FPS vs. the normal 60 FPS. It is 
nearly unusable in comparison.

Regards,
   - Graeme -


More information about the fpc-pascal mailing list