1 / 2

GNU gcov

GNU gcov. gcov is a test coverage program running with gcc . You can use gcov as a profiling tool to help discover where your optimization efforts will best affect your code.

maxima
Download Presentation

GNU gcov

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. GNU gcov • gcov is a test coverage program running with gcc. • You can use gcov as a profiling tool to help discover where your optimization efforts will best affect your code. • You can also use gcov along with the other profiling tool, gprof, to assess which parts of your code use the greatest amount of computing time. • You should compile your code without optimization • You can find out some basic performance statistics, such as: • how often each line of code executes • what lines of code are actually executed • gcov creates a logfile `sourcefile.gcov' which indicates how many times each line of a source file `sourcefile.c' has executed. • gcov [-b] [-c] [-v] [-n] [-l] [-f] [-o directory] sourcefile • b: Write branch frequencies to the output file • -c: Write branch frequencies as the number of branches taken • -f: Output summaries for each function in addition to the file level summary. • -o The directory where the object files live. Gcov will search for `.bb', `.bbg', and `.da' files in this directory

  2. HW2: Busybox testing (due Oct 20 23:59) • Busybox is a one-in-all utility for linux commands • Containing around 300 utilities • http://www.busybox.net/ • For the following 5 utilities (vi, expr, printf, grep, ls) , generate test cases through category-partitioning methods. You have to describe • Categories, the members in the categories, properties (including error), and constraints • Created test cases according to the all combination of the categories • Branch coverage of the target utilities through the set of test cases through gcov Note. Submit both hardcopy and softcopy to the TA (jerry88.kim@gmail.com

More Related