arts of your program.  You can use
\&\fBgcov\fR as a profiling tool to help discover where your
optimization efforts will best affect your code.  You can also use
\&\fBgcov\fR along with the other profiling tool, \fBgprof\fR, to
assess which parts of your code use the greatest amount of computing
time.
.PP
Profiling tools help you analyze your code's performance.  Using a
profiler such as \fBgcov\fR or \fBgprof\fR, you can find out some
basic performance statistics, such as:
.IP "*" 4
how often each line of code executes
.IP "*" 4
what lines of code are actually executed
.IP "*" 4
how much computing time each section of code uses
.PP
Once you know these things about how your code works when compiled, you
can look at each module to see which modules should be optimized.
\&\fBgcov\fR helps you determine where to work on optimization.
.PP
Software developers also use coverage testing in concert with
testsuites, to make sure software is actually good enough for a release.
Testsuites can verify that a program works as expected; a coverage
program tests to see how much of the program is exercised by the
testsuite.  Developers can then determine what kinds of test cases need
to be added to the testsuites to create both better testing and a better
final product.
.PP
You should compile your code without optimization if you plan to use
\&\fBgcov\fR because the optimization, by combining some lines of code
into one function, may not give you as much information as you need to
look for `hot spots' where the code is using a great deal of computer
time.  Likewise, because \fBgcov\fR accumulates statistics by line (at
the lowest resolution), it works best with a programming style that
places only one statement on each line.  If you use complicated macros
that expand to loops or to other control structures, the statistics are
less helpful\-\-\-they only report on the line where the macro call
appears.  If your complex macros behave like functions, you can replace
them with inline functions to solve this problem.
.PP
\&\fBgcov\fR creates a logfile called \fI\fIsourcefile\fI.gcov\fR which
indicates how many times each line of a source file \fI\fIsourcefile\fI.c\fR
has executed.  You can use these logfiles along with \fBgprof\fR to aid
in fine-tuning the performance of your programs.  \fBgprof\fR gives
timing information you can use along with the information you get from
\&\fBgcov\fR.
.PP
\&\fBgcov\fR works only on code compiled with \s-1GCC. \s0 It is not
compatible with any other profiling or test coverage mechanism.
.SH "OPTIONS"
.IX Header "OPTIONS"
.IP "\fB\-a\fR" 4
.IX Item "-a"
.PD 0
.IP "\fB\-\-all\-blocks\fR" 4
.IX Item "--all-blocks"
.PD
Write individual execution counts for every basic block.  Normally gcov
outputs execution counts only for the main blocks of a line.  With this
option you can determine if blocks within a single line are not being
executed.
.IP "\fB\-b\fR" 4
.IX Item "-b"
.PD 0
.IP "\fB\-\-branch\-probabilities\fR" 4
.IX Item "--branch-probabilities"
.PD
Write branch frequencies to the output file, and write