Dynamic analysis with Valgrind
Valgrind
(https://www.valgrind.org) is an *nix instrumentation framework for building dynamic analysis utilities, which means it performs analysis during a program’s runtime. It comes with a wide range of tools for various types of investigations and checks. Some of the tools include:
Memcheck
: detects memory management problemsCachegrind
: profiles CPU caches, and identifies cache misses and other issuesCallgrind
: an extension ofCachegrind
that provides extra information on call graphsMassif
: a heap profiler that shows how different parts of the program use the heap over timeHelgrind
: a thread debugger for data race issuesDRD
: a lighter, more limited version ofHelgrind
Each tool on this list is highly useful when the situation calls for it. Most system package managers know Valgrind
and can install it on your OS with ease. If you’re using Linux, it may already be installed. Additionally...