Valgrind

Valgrind is an instrumentation framework for building dynamic analysis tools. It comes with a set of tools each of which performs some kind of debugging, profiling, or similar task that helps you improve your programs. Valgrind's architecture is modular, so new tools can be created easily and without disturbing the existing structure.

A number of useful tools are supplied as standard.

  1. Memcheck is a memory error detector. It helps you make your programs, particularly those written in C and C++, more correct.

  2. Cachegrind is a cache and branch-prediction profiler. It helps you make your programs run faster.

  3. Callgrind is a call-graph generating cache profiler. It has some overlap with Cachegrind, but also gathers some information that Cachegrind does not.

  4. Helgrind is a thread error detector. It helps you make your multi-threaded programs more correct.

  5. DRD is also a thread error detector. It is similar to Helgrind but uses different analysis techniques and so may find different problems.

  6. Massif is a heap profiler. It helps you make your programs use less memory.

  7. DHAT is a different kind of heap profiler. It helps you understand issues of block lifetimes, block utilisation, and layout inefficiencies.

  8. BBV is an experimental SimPoint basic block vector generator. It is useful to people doing computer architecture research and development.

Usage

Version

module

3.15.0

valgrind/3.15.0

See  2021 Programming Workshop for slides and recordings on using Valgrind.

For more detailed description, visit the Valgrind user manual at https://www.valgrind.org/docs/manual/manual-intro.html