Profiling with Valgrind-callgrind lazarus / 21-General ---------------------------------------------------------------------- hakelm · 2021-10-24 13:20 I am trying to profile a Lazarus application with valgrind, callgind and kcachegrind using for instance   valgrind --tool=callgrind --dump-instr=yes --collect-jumps=yes ./matrixtest and kcachegrind to evaluate the result. KCachegrind doesnt show me the names of my functions nor their source in the callgraph but of many of the Lazarus unit-files. KCachegrind also tells me: There is no source available for the following function: 'FPREADPNC$_$TFPREADERPNG_$ $$_DODECOMPRESS' This is because no debug information is present. Recompile source and redo the profile run. The function is located in this ELF object: 'matrixtest' The KCachegrind Configuration however says: General Annotations Context lines in annotations: Source Folders Object / Related Source Base (always) /dok/ny/p/hep/test/matrix/matrixtest /lib/x86_64-linux-gnu/ld-2.23.so /lib/x86_64-linux-gnu/libc-2.23.so /lib/x86_64-linux-gnu/libdbus-1.so.3.14.6 /lib/x86_64-linux-gnu/libdl-2.23.so ...... My Lazarus project options are: l -vewnhibq -Filib/x86_64-linux -Fu/E/ny/p/hep/helib -Fu/E/ny/p/hep/lib -Fu/usr/local/share/lazarus/lcl/units/x86_64-linux/gtk2 -Fu/usr/local/share/lazarus/lcl/units/x86_64-linux -Fu/usr/local/share/lazarus/components/lazutils/lib/x86_64-linux -Fu/usr/local/share/lazarus/packager/units/x86_64-linux -Fu. -FUlib/x86_64-linux -FE. -omaxwelltest -dLCL -dLCLgtk2 What can I do? H ---------------------------------------------------------------------- Martin_fr · 2021-10-24 13:31 FPReadPNM is a unit in the RTL. This is part of fpc (the fpc installation). Lazarus does not recompile this. You need to rebuild the RTL with debug info. (dwarf) ---------------------------------------------------------------------- hakelm · 2021-10-24 18:15 Thanks but how do I do that? H