*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->NetBSD man pages -> gcov (1)              
Title
Content
Arch
Section
 

GCOV(1)

Contents


NAME    [Toc]    [Back]

     gcov - display basic block profile / coverage data

SYNOPSIS    [Toc]    [Back]

     gcov [-bflnv] [-o dir] source.c

DESCRIPTION    [Toc]    [Back]

     The C compiler gcc(1) supports the command line options -fprofile-arcs
     and -ftest-coverage.  These options cause the compiler to insert instrumentation
 into the object files it generates which measure how often each
     basic block is executed; in addition, when compiling a file named (for
     instance) source.c, in addition to generating the object file source.o,
     the compiler also generates source.bb and source.bbg; these files
     describe the control flow graph of the program.

     When executed, the program will update execution counts for each basic
     block in a file named source.da.  This file will be created if it doesn't
     exist.  If the program is run multiple times, the execution counts will
     reflect all runs of the program since the file was first created.  The
     gcov(1) program can then be used to display the collected data in humanreadable
 form.  When the command
           gcov source.c
     is run, a copy of the source file with execution counts prepended to each
     line is created in source.c.gcov, and some summary statistics are printed
     to standard output.

     The following options are available:

     -b      Include information about branch frequencies in the output file
             and on standard output.

     -f      Output function-level summaries in addition to a summary for the
             whole source file.

     -l      Create longer unambiguous names when executable code in the
             object comes from an included header file rather than the main
             file.  If, for example, source.c includes one or more header
             files header.h which include instrumented code, the report for
             this code will be put in source.c.header.h.gcov instead of the
             default header.h.gcov.

     -n      Do not create output files (but still display summaries to standard
 output).

     -v      Display the version number of gcov(1)

     -o dir  Find .bb, .bbg, and .da files in the directory dir.

SEE ALSO    [Toc]    [Back]

      
      
     gcc(1), gprof(1)
     The `gcc' entry in info(1)

HISTORY    [Toc]    [Back]

     gcov appeared in NetBSD 1.4.

BSD                             March 13, 1999                             BSD
[ Back ]
 Similar pages
Name OS Title
kernbb FreeBSD generate a dump of the kernels basic-block profile buffers
prof HP-UX display profile data
dprofpp Linux display perl profile data
dprofpp OpenBSD display perl profile data
gprof OpenBSD display call graph profile data
gprof HP-UX display call graph profile data
gprof NetBSD display call graph profile data
gprof Linux display call graph profile data
gprof FreeBSD display call graph profile data
inttypes HP-UX basic integer data types
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service