1 / 5

Measuring Memory using valgrind

Measuring Memory using valgrind. CSCE 221H Parasol Lab, Texas A&M University. valgrind. Instrumentation framework for dynamic analysis of programs ( http://valgrind.org/ ) memcheck – detecting memory errors cachegrind – profiling cache / branch prediction

herne
Download Presentation

Measuring Memory using valgrind

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

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

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

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

  5. Exercise • Write an iterative version of the all_true algorithm • Measure memory consumption using massif of both the iterative and recursive versions • Plot peak memory consumption for the following: • n = 101, 102, 103, 104, 105

More Related