Valgrind is an instrumentation framework for building dynamic analysis tools. There are Valgrind tools that can automatically detect many memory management and threading bugs, and profile your programs in detail. For more information, visit the developer's website: http://www.valgrind.org

KCachegrind is a visualization tool for the profiling data generated by Cachegrind and Calltree (they profile data file format is upwards compatible). For more information, visit the developer's website: https://kcachegrind.github.io