Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
| valgrind [2015/02/25 15:27] – [cachegrind] admin | valgrind [2015/02/27 13:28] (Version actuelle) – supprimée admin | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| - | ====== Valgrind ====== | ||
| - | Valgrind is a flexible system for debugging and profiling Linux executables for x86_64 (and some other) architectures. The functionality of Valgrind covers : | ||
| - | |||
| - | * **Memcheck/ | ||
| - | * **Cachegrind**: | ||
| - | * **Callgrind**: | ||
| - | * **Massif**: Memory consumption profiling. | ||
| - | * **Helgrind**: | ||
| - | |||
| - | ===== Installed version ===== | ||
| - | |||
| - | Check for available version : | ||
| - | <code bash>$ module avail valgrind</ | ||
| - | |||
| - | Load the software, from login nodes (mesologin1, | ||
| - | |||
| - | <code bash> | ||
| - | $ module load valgrind | ||
| - | </ | ||
| - | Which will provide suitable environment settings for using Valgrind. | ||
| - | |||
| - | <WRAP center round important 60%> | ||
| - | |||
| - | For most cases, Valgrind will run your program considerably slower than usual, and also may use more resources, so it is recommended to cut down on problem sizes for profiling. | ||
| - | </ | ||
| - | |||
| - | |||
| - | ===== Examples ===== | ||
| - | |||
| - | ==== Memcheck tool ==== | ||
| - | |||
| - | <code bash> | ||
| - | $ valgrind --tool=memcheck --leak-check=yes --show-reachable=yes ./leak1.exe | ||
| - | |||
| - | </ | ||
| - | ==== Massif tool==== | ||
| - | |||
| - | <code bash> | ||
| - | $ valgrind --tool=massif --format=html --depth=5 | ||
| - | </ | ||
| - | ==== Cachegrind tool ==== | ||
| - | |||
| - | <code bash> | ||
| - | $ valgrind --tool=cachegrind | ||
| - | |||
| - | </ | ||
| - | |||
| - | ===== Links ===== | ||
| - | |||
| - | * http:// | ||