Measuring Memory using valgrind CSCE 221H Parasol Lab, Texas A&M University.

Slides:



Advertisements
Similar presentations
Dynamic Memory Allocation (also see pointers lectures) -L. Grewe.
Advertisements

Comprehensive Kernel Instrumentation via Dynamic Binary Translation Peter Feiner, Angela Demke Brown, Ashvin Goel University of Toronto Presenter: Chuong.
CIS 415 – Operating System (Lab) CIS 415 Lab 5 Valgrind (memcheck) Dave Tian.
Carnegie Mellon 1 Debugging : Introduction to Computer Systems Recitation 12: Monday, Nov. 9 th, 2013 Yixun Xu Section K.
Tools for applications improvement George Bosilca.
Profiling Tools 1 Profiling tools By Vitaly Kroivets for Software Design Seminar.
Korey Breshears. Overview  What are automated security tools?  Why do we need them?  What types of tools are there?  What problems do these tools.
Exercise Exercise3.1 8 Exercise3.1 9 Exercise
Exercise Exercise Exercise Exercise
Exercise Exercise Exercise Exercise
Exercise Exercise6.1 7 Exercise6.1 8 Exercise6.1 9.
1 Algorithm Design Techniques Greedy algorithms Divide and conquer Dynamic programming Randomized algorithms Backtracking.
Qin Zhao (MIT) Derek Bruening (VMware) Saman Amarasinghe (MIT) Efficient Memory Shadowing for 64-bit Architectures ISMM 2010, Toronto, Canada June 6, 2010.
Qin Zhao (MIT) Derek Bruening (VMware) Saman Amarasinghe (MIT) Umbra: Efficient and Scalable Memory Shadowing CGO 2010, Toronto, Canada April 26, 2010.
1 1 Profiling & Optimization David Geldreich (DREAM)
Prospector : A Toolchain To Help Parallel Programming Minjang Kim, Hyesoon Kim, HPArch Lab, and Chi-Keung Luk Intel This work will be also supported by.
A Framework for Tracking Memory Accesses in Scientific Applications Antonio J. Peña Pavan Balaji Argonne National Laboratory
UNIX Introduction CSCE 221H Texas A&M University.
INTRODUCTION TO CSCE LAB BASIC OF COMPUTERS, C++, UNIX, AND HELLO WORLD.
1 BIM304: Algorithm Design Time: Friday 9-12am Location: B4 Instructor: Cuneyt Akinlar Grading –2 Midterms – 20% and 30% respectively –Final – 30% –Projects.
Virtual Application Profiler (VAPP) Problem – Increasing hardware complexity – Programmers need to understand interactions between architecture and their.
Chapter 6: Repetition Continued. 2 Validity Checks What’s weak about the following code ? do { s1 = JOptionPane.showInputDialog (“Enter a number: ”);
CSE 598c – Virtual Machines Survey Proposal: Improving Performance for the JVM Sandra Rueda.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. C H A P T E R F I V E Memory Management.
A Region-Based Compilation Technique for a Java Just-In-Time Compiler Toshio Suganuma, Toshiaki Yasue and Toshio Nakatani Presenter: Ioana Burcea.
Language-Based Security. Outline CQUAL CQUAL CCured CCured Valgrind Valgrind Memcheck, AddrcheckMemcheck, Addrcheck HelgrindHelgrind Applying on PttBBS.
1 C Basics Monday, August 30, 2010 CS 241. Announcements MP1, a short machine problem, will be released today. Due: Tuesday, Sept. 7 th at 11:59pm via.
HP-SEE Valgrind Usage Josip Jakić Scientific Computing Laboratory Institute of Physics Belgrade The HP-SEE initiative.
Instrumenting CernVM-FS Code José Molina Colmenero CERN PH-SFT 1June 29th 2015.
1 Programming Languages (CS 550) List Processing, Dynamic Memory Allocation and Garbage Collection Jeremy R. Johnson.
Tools and Techniques for Higher Reliability Software FOSDEM 2013 – Ada Developer Room Philippe Waroquiers Eurocontrol/DNM
CUDA-MEMCHECK. Cuda-memcheck is a functional correctness checking suite included in the CUDA toolkit contains multiple tools that can perform different.
Marian Ivanov, Anar Manafov
YAHMD - Yet Another Heap Memory Debugger
Debugging Memory Issues
Recitation 6: C Review 30 Sept 2016.
Midterm Review.
Valgrind, the anti-Alzheimer pill for your memory problems
Successful and not (yet?) successful optimisations in Valgrind
Advanced course of C/C++
Characterization of Parallel Scientific Simulations
Chapter 14: Dynamic Data Structures
Dynamic Memory CSCE 121 J. Michael Moore.
MSIS 655 Advanced Business Applications Programming
Artificial Intelligence
مدیریت استراتژيک منابع انسانی
Dynamic Memory Copy Challenge
أنماط الإدارة المدرسية وتفويض السلطة الدكتور أشرف الصايغ
The Project LennaGray.raw LennaEdge.raw
مدلسازي تجربي – تخمين پارامتر
Tail Recursion.
CSCI 380: Operating Systems Lecture #11 Instructor: William Killian
How Dynamic Memory Works with Memory Diagram
Dynamic Memory A whole heap of fun….
Essential Class Operations
CSCI 380: Operating Systems Instructor: William Killian
Ռազմավարական կառավարում
Measuring Experimental Performance
Address Spaces Physical Memory Virtual Memory Process Memory Layout
Exercise (10).
CSE 589 Applied Algorithms Spring 1999
Dynamic Memory Allocation
Dynamic Memory Copy Challenge
C H A P T E R F I V E Memory Management.
Essential Class Operations
How Dynamic Memory Works with Memory Diagram
Dynamic Memory CSCE 121.
How Memory Leaks Work with Memory Diagram
Types of Errors And Error Analysis.
Dynamic Binary Translators and Instrumenters
Presentation transcript:

Measuring Memory using valgrind CSCE 221H Parasol Lab, Texas A&M University

valgrind Instrumentation framework for dynamic analysis of programs ( memcheck – detecting memory errors cachegrind – profiling cache / branch prediction helgrind – detecting races in parallel programs massif – profile memory allocation in heap / stack 2

massif - heap valgrind --tool=massif --time-unit=B./a.out 3 ms_print massif.out.*

massif - stack valgrind --tool=massif --time-unit=B --stacks=yes./a.out 4 ms_print massif.out.*

Exercise 1.Write an iterative version of the all_true algorithm Measure memory consumption using massif of both the iterative and recursive versions 2.Plot peak memory consumption for the following: n = 10 1, 10 2, 10 3, 10 4,