memory profiling using valgrind s massif
play

Memory Profiling using Valgrinds Massif Tools for Software - PowerPoint PPT Presentation

W ESTFLISCHE W ILHELMS -U NIVERSITT M NSTER Memory Profiling using Valgrinds Massif Tools for Software Development living knowledge WWU Mnster Andreas Buhr 23. Oktober 2013 W ESTFLISCHE W ILHELMS -U NIVERSITT M NSTER Using


  1. W ESTFÄLISCHE W ILHELMS -U NIVERSITÄT M ÜNSTER Memory Profiling using Valgrind’s Massif Tools for Software Development living knowledge WWU Münster Andreas Buhr 23. Oktober 2013

  2. W ESTFÄLISCHE W ILHELMS -U NIVERSITÄT M ÜNSTER Using Massif 2 /6 What is Valgrind? living knowledge WWU Münster www.valgrind.org , , Andreas Buhr

  3. W ESTFÄLISCHE W ILHELMS -U NIVERSITÄT M ÜNSTER Using Massif 3 /6 What is Valgrind? ◮ CPU simulator executing the program ◮ ... has a tool for runtime profiling ◮ ... has a tool to find race conditions living knowledge ◮ ... has a tool to find memory leaks WWU Münster ◮ ... has a tool to profile memory usage (tool massif) , , Andreas Buhr

  4. W ESTFÄLISCHE W ILHELMS -U NIVERSITÄT M ÜNSTER Using Massif 4 /6 How to profile memory usage ◮ sudo apt-get install valgrind ◮ g++ -g -o myprog myprog.cpp ◮ valgrind --tool=massif ./myprog living knowledge ◮ ms_print massif.out.<pid> WWU Münster , , Andreas Buhr

  5. W ESTFÄLISCHE W ILHELMS -U NIVERSITÄT M ÜNSTER Using Massif 5 /6 Live Demo living knowledge WWU Münster , , Andreas Buhr

  6. W ESTFÄLISCHE W ILHELMS -U NIVERSITÄT M ÜNSTER Using Massif 6 /6 Homework: try it ◮ take any executable with debug symbols ◮ run “valgrind --tool=massif ./myprog” living knowledge ◮ ms_print massif.out.<pid> WWU Münster , , Andreas Buhr

Recommend


More recommend