CSE306 Software Quality in Practice Dr. Carl Alphonce - - PowerPoint PPT Presentation

cse306 software quality in practice
SMART_READER_LITE
LIVE PREVIEW

CSE306 Software Quality in Practice Dr. Carl Alphonce - - PowerPoint PPT Presentation

CSE306 Software Quality in Practice Dr. Carl Alphonce alphonce@buffalo.edu 343 Davis Hall LEX13 file size Data files should not have been included - I forgot that file00 was quite large. I believe you all submitted via private post in


slide-1
SLIDE 1

CSE306 Software Quality in Practice

  • Dr. Carl Alphonce

alphonce@buffalo.edu 343 Davis Hall

slide-2
SLIDE 2

LEX13 file size

Data files should not have been included - I forgot that file00 was quite large. I believe you all submitted via private post in Piazza - we'll sort it

  • ut on our end.
slide-3
SLIDE 3

Grading

We WILL have LEX01 - LEX06 graded by Monday.

slide-4
SLIDE 4

gcov/gprof vs Valgrind

instrumentation vs simulation

gcov and gprof - instrumentation approach

  • instrumentation: code is added to the

executable to gather runtime data

  • executable runs as usual on hardware

Valgrind - simulation approach

  • no code is added to the executable (though

more human-readable output is produced by compiling with -g flag)

  • executable runs in a simulated

environment

slide-5
SLIDE 5

Valgrind

"val-grinned" - the gate to Valhalla

A suite of tools (see http:/ /valgrind.org/info/tools.html) Memcheck "detects memory-management problems" Cachegrind "is a cache profiler" Callgrind "is an extension to Cachegrind. It provides all the information that Cachegrind does, plus extra information about callgraphs." Massif "is a heap profiler" Helgrind "is a thread debugger which finds data races in multithreaded programs" DRD "is a tool for detecting errors in multithreaded C and C++ programs"

slide-6
SLIDE 6

callgrind

valgrind --tool=callgrind [opts] prog [opts] [opts] callgrind options [opts] program options

slide-7
SLIDE 7

callgrind_annotate

Helps to make sense of callgrind data. callgrind_annotate --inclusive=yes -- tree=both --auto=yes callgrind.out.<PID> https:/ /web.stanford.edu/class/cs107 /guide/ callgrind.html