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

memory profiling using valgrind s massif
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

Memory Profiling using Valgrind’s Massif

Tools for Software Development

Andreas Buhr

  • 23. Oktober 2013

living knowledge WWU Münster

WESTFÄLISCHE WILHELMS-UNIVERSITÄT MÜNSTER

slide-2
SLIDE 2

living knowledge WWU Münster

WESTFÄLISCHE WILHELMS-UNIVERSITÄT MÜNSTER

Using Massif 2 /6

What is Valgrind?

www.valgrind.org

, , Andreas Buhr

slide-3
SLIDE 3

living knowledge WWU Münster

WESTFÄLISCHE WILHELMS-UNIVERSITÄ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 ◮ ... has a tool to find memory leaks ◮ ... has a tool to profile memory usage (tool massif)

, , Andreas Buhr

slide-4
SLIDE 4

living knowledge WWU Münster

WESTFÄLISCHE WILHELMS-UNIVERSITÄ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 ◮ ms_print massif.out.<pid>

, , Andreas Buhr

slide-5
SLIDE 5

living knowledge WWU Münster

WESTFÄLISCHE WILHELMS-UNIVERSITÄT MÜNSTER

Using Massif 5 /6

Live Demo

, , Andreas Buhr

slide-6
SLIDE 6

living knowledge WWU Münster

WESTFÄLISCHE WILHELMS-UNIVERSITÄT MÜNSTER

Using Massif 6 /6

Homework: try it

◮ take any executable with debug symbols ◮ run “valgrind --tool=massif ./myprog” ◮ ms_print massif.out.<pid>

, , Andreas Buhr