40 likes | 272 Views
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.
E N D
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
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