GCOV(1)

๐Ÿ“ฆ
version 9.5.0 ยท 2 versions
, in ubuntu jammy, ubuntu noble

๐ŸŽ€ GCOV(1) ๐ŸŽ€

๐Ÿ“– This page is from the GNU manual, so it's the official gcov tea ๐Ÿ’…

โœจ NAME โœจ

gcov - coverage testing tool ๐Ÿฆ‹ It's a whole coverage testing tool, bestie.

๐Ÿ’– SYNOPSIS ๐Ÿ’–

gcov [-v|--version] [-h|--help]
     [-a|--all-blocks]
     [-b|--branch-probabilities]
     [-c|--branch-counts]
     [-d|--display-progress]
     [-f|--function-summaries]
     [-i|--json-format]
     [-j|--human-readable]
     [-k|--use-colors]
     [-l|--long-file-names]
     [-m|--demangled-names]
     [-n|--no-output]
     [-o|--object-directory directory|file]
     [-p|--preserve-paths]
     [-q|--use-hotness-colors]
     [-r|--relative-only]
     [-s|--source-prefix directory]
     [-t|--stdout]
     [-u|--unconditional-branches]
     [-x|--hash-filenames]
     files

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

Okay so gcov is a test coverage program ๐Ÿง You use it with GCC to analyze your programs so they run more efficiently and faster, and to find the parts of your program nobody has tested yet. It's also a profiling tool, so you can figure out where your optimization efforts will actually slay. You can pair it with the other profiling tool, gprof, to see which parts of your code eat up the most computing time. โœจ

Profiling tools help you analyze your code's performance ๐Ÿ“Š With a profiler like gcov or gprof, you can find out basic performance stats, like:

  • how often each line of code runs
  • which lines of code actually get executed
  • how much computing time each section of code uses

Once you know these things about how your code works when compiled, you can look at each module and see which ones need optimizing. gcov helps you figure out where to put your optimization energy ๐Ÿ’…

Software devs also use coverage testing alongside testsuites, to make sure software is actually good enough to release ๐Ÿš€ Testsuites check that a program works as expected. A coverage program checks how much of the program the testsuite actually exercises. Devs can then see what kinds of test cases to add to the testsuites, for better testing and a better final product ๐Ÿซถ

Compile without optimization if you plan to use gcov ๐Ÿ™ˆ Optimization can combine some lines of code into one function, which may not give you enough info to find the hot spots' where your code is using a ton of computer time. Also, gcov` collects stats by line (at the lowest resolution), so it works best with a style that puts only one statement on each line. If you use complicated macros that expand to loops or other control structures, the stats are less helpful, because they only report on the line where the macro call appears. If your complex macros act like functions, swap them for inline functions to fix this ๐ŸŽ€

gcov creates a logfile called sourcefile.gcov that shows how many times each line of a source file sourcefile.c has executed ๐Ÿ“ You can use these logfiles with gprof to fine-tune your program's performance. gprof gives timing info you can use alongside what you get from gcov.

gcov only works on code compiled with GCC.

โš ๏ธ It is not compatible with any other profiling or test coverage mechanism, so don't try to mix it with those.

๐Ÿ‘‘ OPTIONS ๐Ÿ‘‘

  • -a, --all-blocks โ€” Writes individual execution counts for every basic block ๐Ÿงฉ Normally gcov only outputs counts for the main blocks of a line. With this option, you can tell if blocks inside a single line aren't being executed.
  • -b, --branch-probabilities โ€” Writes branch frequencies to the output file and branch summary info to standard output ๐ŸŒฟ This lets you see how often each branch in your program was taken. Unconditional branches won't show up unless you pass -u.
  • -c, --branch-counts โ€” Writes branch frequencies as the number of branches taken, instead of the percentage of branches taken ๐Ÿ”ข
  • -d, --display-progress โ€” Shows the progress on standard output โณ
  • -f, --function-summaries โ€” Outputs summaries for each function, on top of the file-level summary ๐Ÿ’œ
  • -h, --help โ€” Shows help about using gcov (on standard output) and exits without doing any further processing ๐Ÿ™‹โ€โ™€๏ธ
  • -i, --json-format โ€” Outputs the gcov file in an easy-to-parse JSON intermediate format ๐Ÿงพ It doesn't need source code to generate. The JSON file is compressed with the gzip algorithm and has the .gcov.json.gz extension.

Here's the structure of the JSON, bestie ๐Ÿ‘‡

{
  "current_working_directory": <current_working_directory>,
  "data_file": <data_file>,
  "format_version": <format_version>,
  "gcc_version": <gcc_version>
  "files": [<file>]
}

The root element fields mean:

  • current_working_directory โ€” the working directory where a compilation unit was compiled
  • data_file โ€” name of the data file (GCDA)
  • format_version โ€” semantic version of the format
  • gcc_version โ€” version of the GCC compiler

๐ŸŒธ File element

Each file has this form:

{
  "file": <file_name>,
  "functions": [<function>],
  "lines": [<line>]
}

The file element fields mean:

  • file_name โ€” name of the source file

๐Ÿงฉ Function element

Each function has this form:

{
  "blocks": <blocks>,
  "blocks_executed": <blocks_executed>,
  "demangled_name": "<demangled_name>,
  "end_column": <end_column>,
  "end_line": <end_line>,
  "execution_count": <execution_count>,
  "name": <name>,
  "start_column": <start_column>
  "start_line": <start_line>
}

The function element fields mean:

  • blocks โ€” number of blocks that are in the function
  • blocks_executed โ€” number of executed blocks of the function
  • demangled_name โ€” demangled name of the function
  • end_column โ€” column in the source file where the function ends
  • end_line โ€” line in the source file where the function ends
  • execution_count โ€” number of executions of the function
  • name โ€” name of the function
  • start_column โ€” column in the source file where the function begins
  • start_line โ€” line in the source file where the function begins
๐Ÿ“Œ Line numbers and column numbers start counting from 1. In the current implementation, start_line and start_column do not include any template parameters or the leading return type, but that's likely to be fixed in the future.

๐Ÿงต Line element

Each line has this form:

{
  "branches": [<branch>],
  "count": <count>,
  "line_number": <line_number>,
  "unexecuted_block": <unexecuted_block>
  "function_name": <function_name>,
}

Branches only show up with the -b option. The line element fields mean:

  • count โ€” number of executions of the line
  • line_number โ€” line number
  • unexecuted_block โ€” flag for whether the line contains an unexecuted block (not all statements on the line are executed)
  • function_name โ€” name of a function this line belongs to (for a line with inlined statements, it can be unset)

๐ŸŒฟ Branch element

Each branch has this form:

{
  "count": <count>,
  "fallthrough": <fallthrough>,
  "throw": <throw>
}

The branch element fields mean:

  • count โ€” number of executions of the branch
  • fallthrough โ€” true when the branch is a fall through branch
  • throw โ€” true when the branch is an exceptional branch
  • -j, --human-readable โ€” Writes counts in a human-readable format, like 24.6k ๐Ÿ˜
  • -k, --use-colors โ€” Colors lines of code that have zero coverage ๐ŸŒˆ We use red for non-exceptional lines and cyan for exceptional ones. The same colors are used for basic blocks with -a.
  • -l, --long-file-names โ€” Creates long file names for included source files ๐Ÿงท For example, if the header x.h has code and was included in a.c, running gcov on a.c makes a file called a.c##x.h.gcov instead of x.h.gcov. This is great when x.h is included in multiple source files and you want to see each one's contribution. If you use -p, both the including and included file names will be complete path names.
  • -m, --demangled-names โ€” Displays demangled function names in the output. The default is to show mangled function names ๐Ÿ”ฎ
  • -n, --no-output โ€” Doesn't create the gcov output file ๐Ÿ™…โ€โ™€๏ธ
  • -o directory|file, --object-directory directory, --object-file file โ€” Tells gcov either the directory containing the gcov data files, or the object path name ๐Ÿ“ The .gcno and .gcda data files are searched for using this option. If you give a directory, the data files live in that directory and are named after the input file name, without its extension. If you give a file, the data files are named after that file, without its extension.
  • -p, --preserve-paths โ€” Keeps complete path info in the names of generated .gcov files ๐Ÿ—บ๏ธ Without this option, only the filename component is used. With it, all directories are used: / characters get translated to # characters, . directory components are removed, and unremoveable .. components are renamed to ^. This is super useful if your source files live in several different directories.
  • -q, --use-hotness-colors โ€” Emits perf-like colored output for hot lines ๐Ÿ”ฅ A legend for the color scale gets printed at the very beginning of the output file.
  • -r, --relative-only โ€” Only outputs info about source files with a relative pathname (after source prefix elision) ๐ŸŒท Absolute paths are usually system header files, and coverage of any inline functions in those is normally uninteresting.

โœจ Okay bestie, the rest of the flags โœจ

  • -s directory, --source-prefix directory โ€” this one lets you chop a prefix off source file names when gcov makes the coverage files ๐Ÿงš It's super handy if you build in a separate directory and don't want the path to your source folder crashing the party in your output file names ๐ŸŒธ ngl, the prefix check happens before gcov decides whether the source file is absolute ๐Ÿ’…
  • -t, --stdout โ€” spills the coverage info straight to standard output instead of writing output files ๐ŸŽ€
  • -u, --unconditional-branches โ€” when branch probabilities are given, this also includes the ones for unconditional branches ๐Ÿ™ˆ Those are normally not that interesting, so this is the flag that brings them in
  • -v, --version โ€” prints the gcov version number on standard output, then exits without doing any more processing ๐Ÿฆ‹
  • -w, --verbose โ€” prints verbose information about basic blocks and arcs โœจ
  • -x, --hash-filenames โ€” when you use --preserve-paths, gcov builds the output filename from the full pathname of the source files, and that can get so long it overflows filesystem limits ๐Ÿ˜ญ This option makes names like source-file##md5.gcov, where source-file is the final filename part and md5 is calculated from the full mangled name that would've been used otherwise ๐Ÿ”ฅ It's the alternative to --preserve-paths on systems that have a filesystem limit ๐Ÿซถ

Okay so gcov needs to be run from the same current directory you were in when you invoked the compiler, or it can't find your source files ๐Ÿ’€ It makes files called mangledname.gcov in the current directory, and those hold the coverage info for the source file they match ๐Ÿ’œ You get one .gcov file for each source (or header) file that had code compiled into the data files. The mangledname part is usually just the source file name, but it can get more complicated if -l or -p are given, so refer to those options for details ๐ŸŒˆ

If you invoke gcov with multiple input files, the contributions from each input file get summed together. Typically you'd pass it the same list of files as the final link of your executable โœจ

The .gcov files have the : separated fields along with your program's source code, and the format is:

<execution_count>:<line_number>:<source line text>

Additional block information may follow each line when you ask for it with a command line option. The execution_count is - for lines with no code. Unexecuted lines are marked ##### or =====, depending on whether they're reachable by non-exceptional paths or only exceptional paths (like C++ exception handlers), respectively. With the -a option, unexecuted blocks are marked $$$$$ or %%%%%, depending on whether a basic block is reachable via non-exceptional or exceptional paths. Executed basic blocks with a statement that has a zero execution_count end with a * character and get colored magenta when you use the -k option.

This functionality is not supported in Ada. ๐Ÿ’€

Note that GCC can completely remove the bodies of functions that aren't needed, for instance if they're inlined everywhere. Those functions get marked with -, which can be super confusing ๐Ÿ™ˆ Use the -fkeep-inline-functions and -fkeep-static-functions options to keep them around so gcov can properly show their execution_count ๐Ÿซถ

Some lines of information at the start have a line_number of zero. These preamble lines look like this:

-:0:<tag>:<value>
The ordering and number of these preamble lines will be augmented as gcov development progresses --- do not rely on them staying the same! Use tag to find a particular preamble line instead ๐Ÿ’…

The additional block information looks like this:

<tag> <information>

The information is human readable, but it's designed to be simple enough for machines to parse too ๐Ÿค–

When printing percentages, 0% and 100% only show up when the values are exactly 0% and 100% respectively. Any other values that would normally get rounded to 0% or 100% are printed as the nearest non-boundary value instead ๐ŸŽ€

When using gcov, you must first compile your program with the special GCC option --coverage ๐Ÿ‘‘ This tells the compiler to generate the extra info gcov needs (basically a flow graph of the program), and it also adds extra code to the object files that generates the extra profiling info gcov needs. These extra files get placed in the directory where the object file is located.

Running the program causes profile output to be generated. For each source file compiled with -fprofile-arcs, an accompanying .gcda file gets placed in the object file directory ๐Ÿ“

Running gcov with your program's source file names as arguments now produces a listing of the code along with how often each line was executed. For example, if your program is called tmp.cpp, this is what you see with the basic gcov facility:

$ g++ --coverage tmp.cpp
$ a.out
$ gcov tmp.cpp -m
File 'tmp.cpp'
Lines executed:92.86% of 14
Creating 'tmp.cpp.gcov'

The file tmp.cpp.gcov contains the output from gcov. Here's a sample ๐Ÿฆ‹

                -:    0:Source:tmp.cpp
                -:    0:Working directory:/home/gcc/testcase
                -:    0:Graph:tmp.gcno
                -:    0:Data:tmp.gcda
                -:    0:Runs:1
                -:    0:Programs:1
                -:    1:#include <stdio.h>
                -:    2:
                -:    3:template<class T>
                -:    4:class Foo
                -:    5:{
                -:    6:  public:
               1*:    7:  Foo(): b (1000) {}
        ------------------
        Foo<char>::Foo():
            #####:    7:  Foo(): b (1000) {}
        ------------------
        Foo<int>::Foo():
                1:    7:  Foo(): b (1000) {}
        ------------------
               2*:    8:  void inc () { b++; }
        ------------------
        Foo<char>::inc():
            #####:    8:  void inc () { b++; }
        ------------------
        Foo<int>::inc():
                2:    8:  void inc () { b++; }
        ------------------
                -:    9:
                -:   10:  private:
                -:   11:  int b;
                -:   12:};
                -:   13:
                -:   14:template class Foo<int>;
                -:   15:template class Foo<char>;
                -:   16:
                -:   17:int
                1:   18:main (void)
                -:   19:{
                -:   20:  int i, total;
                1:   21:  Foo<int> counter;
                -:   22:
                1:   23:  counter.inc();
                1:   24:  counter.inc();
                1:   25:  total = 0;
                -:   26:
               11:   27:  for (i = 0; i < 10; i++)
               10:   28:    total += i;
                -:   29:
               1*:   30:  int v = total > 100 ? 1 : 2;
                -:   31:
                1:   32:  if (total != 45)
            #####:   33:    printf ("Failure\n");
                -:   34:  else
                1:   35:    printf ("Success\n");
                1:   36:  return 0;
                -:   37:}

Note that line 7 is shown in the report multiple times. The first occurrence shows the total number of executions of the line, and the next two belong to the instances of the Foo class constructors. As you can also see, line 30 contains some unexecuted basic blocks, so its execution count has an asterisk symbol ๐ŸŒธ

When you use the -a option, you get individual block counts, and the output looks like this ๐Ÿ’–

                -:    0:Source:tmp.cpp
                -:    0:Working directory:/home/gcc/testcase
                -:    0:Graph:tmp.gcno
                -:    0:Data:tmp.gcda
                -:    0:Runs:1
                -:    0:Programs:1
                -:    1:#include <stdio.h>
                -:    2:
                -:    3:template<class T>
                -:    4:class Foo
                -:    5:{
                -:    6:  public:
               1*:    7:  Foo(): b (1000) {}
        ------------------
        Foo<char>::Foo():
            #####:    7:  Foo(): b (1000) {}
        ------------------
        Foo<int>::Foo():
                1:    7:  Foo(): b (1000) {}
        ------------------
               2*:    8:  void inc () { b++; }
        ------------------
        Foo<char>::inc():
            #####:    8:  void inc () { b++; }
        ------------------
        Foo<int>::inc():
                2:    8:  void inc () { b++; }
        ------------------
                -:    9:
                -:   10:  private:
                -:   11:  int b;
                -:   12:};
                -:   13:
                -:   14:template class Foo<int>;
                -:   15:template class Foo<char>;
                -:   16:
                -:   17:int
                1:   18:main (void)
                -:   19:{
                -:   20:  int i, total;
                1:   21:  Foo<int> counter;
                1:   21-block  0
                -:   22:
                1:   23:  counter.inc();
                1:   23-block  0
                1:   24:  counter.inc();
                1:   24-block  0
                1:   25:  total = 0;
                -:   26:
               11:   27:  for (i = 0; i < 10; i++)
                1:   27-block  0
               11:   27-block  1
               10:   28:    total += i;
               10:   28-block  0
                -:   29:
               1*:   30:  int v = total > 100 ? 1 : 2;
                1:   30-block  0
            %%%%%:   30-block  1
                1:   30-block  2
                -:   31:
                1:   32:  if (total != 45)
                1:   32-block  0
            #####:   33:    printf ("Failure\n");
            %%%%%:   33-block  0
                -:   34:  else
                1:   35:    printf ("Success\n");
                1:   35-block  0
                1:   36:  return 0;
                1:   36-block  0
                -:   37:}

In this mode, each basic block only gets shown on one line: the last line of the block ๐Ÿฆ‹. A multi-line block only adds to the execution count of that last line, and the other lines won't be shown as containing code unless an earlier block ends on them ๐Ÿ™ˆ. The total execution count of a line is shown, and the lines after it show the execution counts for the individual blocks that end on that line โœจ. After each block, the branch and call counts for that block get shown too, but only if you pass the -b option ๐Ÿ’–.

Because of the way GCC instruments calls ๐Ÿงš, a call count can show up after a line with no individual blocks ๐Ÿ’€. As you can see, line 33 has a basic block that was never executed ๐Ÿ˜ญ.

When you use the -b option, your output looks like this:

-:    0:Source:tmp.cpp
-:    0:Working directory:/home/gcc/testcase
-:    0:Graph:tmp.gcno
-:    0:Data:tmp.gcda
-:    0:Runs:1
-:    0:Programs:1
-:    1:#include <stdio.h>
-:    2:
-:    3:template<class T>
-:    4:class Foo
-:    5:{
-:    6:  public:
  1*:    7:  Foo(): b (1000) {}
        ------------------
        Foo<char>::Foo():
        function Foo<char>::Foo() called 0 returned 0% blocks executed 0%
            #####:    7:  Foo(): b (1000) {}
        ------------------
        Foo<int>::Foo():
        function Foo<int>::Foo() called 1 returned 100% blocks executed 100%
                1:    7:  Foo(): b (1000) {}
        ------------------
               2*:    8:  void inc () { b++; }
        ------------------
        Foo<char>::inc():
        function Foo<char>::inc() called 0 returned 0% blocks executed 0%
            #####:    8:  void inc () { b++; }
        ------------------
        Foo<int>::inc():
        function Foo<int>::inc() called 2 returned 100% blocks executed 100%
                2:    8:  void inc () { b++; }
        ------------------
                -:    9:
                -:   10:  private:
                -:   11:  int b;
                -:   12:};
                -:   13:
                -:   14:template class Foo<int>;
                -:   15:template class Foo<char>;
                -:   16:
                -:   17:int
function main called 1 returned 100% blocks executed 81%
                1:   18:main (void)
                -:   19:{
                -:   20:  int i, total;
                1:   21:  Foo<int> counter;
        call    0 returned 100%
        branch  1 taken 100% (fallthrough)
        branch  2 taken 0% (throw)
                -:   22:
                1:   23:  counter.inc();
        call    0 returned 100%
        branch  1 taken 100% (fallthrough)
        branch  2 taken 0% (throw)
                1:   24:  counter.inc();
        call    0 returned 100%
        branch  1 taken 100% (fallthrough)
        branch  2 taken 0% (throw)
                1:   25:  total = 0;
                -:   26:
               11:   27:  for (i = 0; i < 10; i++)
        branch  0 taken 91% (fallthrough)
        branch  1 taken 9%
               10:   28:    total += i;
                -:   29:
               1*:   30:  int v = total > 100 ? 1 : 2;
        branch  0 taken 0% (fallthrough)
        branch  1 taken 100%
                -:   31:
                1:   32:  if (total != 45)
        branch  0 taken 0% (fallthrough)
        branch  1 taken 100%
            #####:   33:    printf ("Failure\n");
        call    0 never executed
        branch  1 never executed
        branch  2 never executed
                -:   34:  else
                1:   35:    printf ("Success\n");
        call    0 returned 100%
        branch  1 taken 100% (fallthrough)
        branch  2 taken 0% (throw)
                1:   36:  return 0;
                -:   37:}

For each function, a line gets printed showing how many times the function is called ๐Ÿ“ž, how many times it returns ๐Ÿ”, and what percentage of the function's blocks were executed ๐ŸŒธ.

For each basic block, a line gets printed after the last line of that block, describing the branch or call that ends the block ๐Ÿ’œ. There can be multiple branches and calls listed for a single source line if multiple basic blocks end on that line ๐Ÿ”ฅ. In that case, each branch and call gets its own number. There's no simple way to map these branches and calls back to source constructs ๐Ÿ™ƒ. In general, though, the lowest numbered branch or call will correspond to the leftmost construct on the source line ๐Ÿ‘‘.

For a branch, if it was executed at least once, a percentage gets printed showing how many times the branch was taken divided by how many times it was executed. Otherwise, the message "never executed" gets printed.

For a call, if it was executed at least once, a percentage gets printed showing how many times the call returned divided by how many times the call was executed. This is usually 100%, but it may be lower for functions that call exit or longjmp, since they may not return every time they're called ๐Ÿ’….

The execution counts are cumulative ๐ŸŒˆ. If the example program ran again without removing the .gcda file, the execution count for each line in the source would get added to the results of the previous run(s). This is potentially useful in several ways. For example, it could be used to accumulate data over a number of program runs as part of a test verification suite, or to give more accurate long-term information over a large number of program runs ๐Ÿง.

The data in the .gcda files is saved right before the program exits ๐Ÿšช. For each source file compiled with -fprofile-arcs, the profiling code first tries to read in an existing .gcda file. If the file doesn't match the executable (differing number of basic block counts), it ignores the contents of the file. Then it adds in the new execution counts and finally writes the data back to the file ๐Ÿ’พ.

๐Ÿง Using gcov with GCC Optimization

If you plan to use gcov to help optimize your code, you must first compile your program with a special GCC option, --coverage. Aside from that, you can use any other GCC options. But if you want to prove that every single line in your program was executed, you should not compile with optimization at the same time ๐Ÿ™…โ€โ™€๏ธ. On some machines, the optimizer can eliminate some simple code lines by combining them with other lines. For example, code like this:

        if (a != b)
          c = 1;
        else
          c = 0;

can be compiled into one instruction on some machines. In that case, there's no way for gcov to calculate separate execution counts for each line, because there isn't separate code for each line ๐Ÿ˜ตโ€๐Ÿ’ซ. So the gcov output looks like this if you compiled the program with optimization:

              100:   12:if (a != b)
              100:   13:  c = 1;
              100:   14:else
              100:   15:  c = 0;

The output shows that this block of code, combined by optimization, executed 100 times. In one sense this result is correct, because there was only one instruction representing all four of these lines. However, the output doesn't tell you how many times the result was 0 and how many times it was 1 ๐Ÿคทโ€โ™€๏ธ.

Inlineable functions can create unexpected line counts ๐Ÿ™ˆ. Line counts are shown for the source code of the inlineable function, but what gets shown depends on where the function is inlined, or whether it isn't inlined at all.

If the function is not inlined, the compiler has to emit an out of line copy of the function in any object file that needs it. If fileA.o and fileB.o both contain out of line bodies of a particular inlineable function, they will also both contain coverage counts for that function. When fileA.o and fileB.o are linked together, the linker will, on many systems, select one of those out of line bodies for all calls to that function, and remove or ignore the other. Unfortunately, it will not remove the coverage counters for the unused function body. So when instrumented, all but one use of that function will show zero counts ๐Ÿฅฒ.

If the function is inlined in several places, the block structure in each location might not be the same. For instance, a condition might now be calculable at compile time in some instances. Because the coverage of all the uses of the inline function is shown for the same source lines, the line counts themselves might seem inconsistent ๐ŸŒ€.

Long-running applications can use the __gcov_reset and __gcov_dump facilities to restrict profile collection to the program region of interest ๐ŸŽฏ. Calling __gcov_reset(void) clears all profile counters to zero, and calling __gcov_dump(void) dumps the profile information collected at that point to .gcda output files. Instrumented applications use a static destructor with priority 99 to invoke the __gcov_dump function. So __gcov_dump runs after all user defined static destructors, as well as handlers registered with atexit. If an executable loads a dynamic shared object via dlopen functionality, -Wl,--dynamic-list-data is needed to dump all profile data ๐Ÿงš.

The profiling run-time library reports various errors related to profile manipulation and profile saving ๐Ÿšจ. Errors get printed to standard error output, or to the GCOV_ERROR_FILE file if that environment variable is set. If you want to terminate immediately after an error occurs, set the GCOV_EXIT_AT_ERROR environment variable ๐Ÿ›‘. That can help you find profile clashes, which lead to a misleading profile ๐Ÿซฃ.

๐ŸŽ€ SEE ALSO ๐ŸŽ€

gpl(7), gfdl(7), fsf-funding(7), gcc(1) and the Info entry for gcc ๐Ÿ“š.

Copyright (c) 1996-2019 Free Software Foundation, Inc. ๐Ÿ’œ

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation. The Invariant Sections are "GNU General Public License" and "Funding Free Software". The Front-Cover texts are (a) (see below), and the Back-Cover Texts are (b) (see below). A copy of the license is included in the gfdl(7) man page ๐Ÿ“œ.

(a) The FSF's Front-Cover Text is:

A GNU Manual

(b) The FSF's Back-Cover Text is:

You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development.

Okay bestie, that's the whole page ๐Ÿซถโœจ This one's from gcc-9.5.0, stamped 2022-05-27, filed under GCOV(1) ๐Ÿ’–๐Ÿ‘‘

๐Ÿ“ฆ where this page comes from