Dynamic analysis with Valgrind
Valgrind (https://www.valgrind.org) is an instrumentation framework that allows building dynamic analysis utilities – that is, analysis performed during a program's runtime. It offers an extensive tool suite that allows all kinds of investigations and checks. Some of the tools are as follows:
- Memcheck – detects memory-management problems
- Cachegrind – profiles CPU caches, and pinpoints cache misses and other cache issues
- Callgrind – an extension of Cachegrind with extra information on call graphs
- Massif – a heap profiler that shows which parts of the program use heap over time
- Helgrind – a thread debugger, which helps with data race issues
- DRD – a lighter, limited version of Helgrind
Every single tool from this list is extremely handy when the occasion is right. Most package managers know Valgrind and can install it on your OS with ease (it's possible that it...