Update ChangeLog and version files for release
[official-gcc.git] / gcc / doc / gcov.texi
blobd728444e1e71fca5b3cc663cdf2088f8b033337e
1 @c Copyright (C) 1996-2017 Free Software Foundation, Inc.
2 @c This is part of the GCC manual.
3 @c For copying conditions, see the file gcc.texi.
5 @ignore
6 @c man begin COPYRIGHT
7 Copyright @copyright{} 1996-2017 Free Software Foundation, Inc.
9 Permission is granted to copy, distribute and/or modify this document
10 under the terms of the GNU Free Documentation License, Version 1.3 or
11 any later version published by the Free Software Foundation; with the
12 Invariant Sections being ``GNU General Public License'' and ``Funding
13 Free Software'', the Front-Cover texts being (a) (see below), and with
14 the Back-Cover Texts being (b) (see below).  A copy of the license is
15 included in the gfdl(7) man page.
17 (a) The FSF's Front-Cover Text is:
19      A GNU Manual
21 (b) The FSF's Back-Cover Text is:
23      You have freedom to copy and modify this GNU Manual, like GNU
24      software.  Copies published by the Free Software Foundation raise
25      funds for GNU development.
26 @c man end
27 @c Set file name and title for the man page.
28 @setfilename gcov
29 @settitle coverage testing tool
30 @end ignore
32 @node Gcov
33 @chapter @command{gcov}---a Test Coverage Program
35 @command{gcov} is a tool you can use in conjunction with GCC to
36 test code coverage in your programs.
38 @menu
39 * Gcov Intro::                  Introduction to gcov.
40 * Invoking Gcov::               How to use gcov.
41 * Gcov and Optimization::       Using gcov with GCC optimization.
42 * Gcov Data Files::             The files used by gcov.
43 * Cross-profiling::             Data file relocation.
44 @end menu
46 @node Gcov Intro
47 @section Introduction to @command{gcov}
48 @c man begin DESCRIPTION
50 @command{gcov} is a test coverage program.  Use it in concert with GCC
51 to analyze your programs to help create more efficient, faster running
52 code and to discover untested parts of your program.  You can use
53 @command{gcov} as a profiling tool to help discover where your
54 optimization efforts will best affect your code.  You can also use
55 @command{gcov} along with the other profiling tool, @command{gprof}, to
56 assess which parts of your code use the greatest amount of computing
57 time.
59 Profiling tools help you analyze your code's performance.  Using a
60 profiler such as @command{gcov} or @command{gprof}, you can find out some
61 basic performance statistics, such as:
63 @itemize @bullet
64 @item
65 how often each line of code executes
67 @item
68 what lines of code are actually executed
70 @item
71 how much computing time each section of code uses
72 @end itemize
74 Once you know these things about how your code works when compiled, you
75 can look at each module to see which modules should be optimized.
76 @command{gcov} helps you determine where to work on optimization.
78 Software developers also use coverage testing in concert with
79 testsuites, to make sure software is actually good enough for a release.
80 Testsuites can verify that a program works as expected; a coverage
81 program tests to see how much of the program is exercised by the
82 testsuite.  Developers can then determine what kinds of test cases need
83 to be added to the testsuites to create both better testing and a better
84 final product.
86 You should compile your code without optimization if you plan to use
87 @command{gcov} because the optimization, by combining some lines of code
88 into one function, may not give you as much information as you need to
89 look for `hot spots' where the code is using a great deal of computer
90 time.  Likewise, because @command{gcov} accumulates statistics by line (at
91 the lowest resolution), it works best with a programming style that
92 places only one statement on each line.  If you use complicated macros
93 that expand to loops or to other control structures, the statistics are
94 less helpful---they only report on the line where the macro call
95 appears.  If your complex macros behave like functions, you can replace
96 them with inline functions to solve this problem.
98 @command{gcov} creates a logfile called @file{@var{sourcefile}.gcov} which
99 indicates how many times each line of a source file @file{@var{sourcefile}.c}
100 has executed.  You can use these logfiles along with @command{gprof} to aid
101 in fine-tuning the performance of your programs.  @command{gprof} gives
102 timing information you can use along with the information you get from
103 @command{gcov}.
105 @command{gcov} works only on code compiled with GCC@.  It is not
106 compatible with any other profiling or test coverage mechanism.
108 @c man end
110 @node Invoking Gcov
111 @section Invoking @command{gcov}
113 @smallexample
114 gcov @r{[}@var{options}@r{]} @var{files}
115 @end smallexample
117 @command{gcov} accepts the following options:
119 @ignore
120 @c man begin SYNOPSIS
121 gcov [@option{-v}|@option{--version}] [@option{-h}|@option{--help}]
122      [@option{-a}|@option{--all-blocks}]
123      [@option{-b}|@option{--branch-probabilities}]
124      [@option{-c}|@option{--branch-counts}]
125      [@option{-d}|@option{--display-progress}]
126      [@option{-f}|@option{--function-summaries}]
127      [@option{-i}|@option{--intermediate-format}]
128      [@option{-l}|@option{--long-file-names}]
129      [@option{-m}|@option{--demangled-names}]
130      [@option{-n}|@option{--no-output}]
131      [@option{-o}|@option{--object-directory} @var{directory|file}]
132      [@option{-p}|@option{--preserve-paths}]
133      [@option{-r}|@option{--relative-only}]
134      [@option{-s}|@option{--source-prefix} @var{directory}]
135      [@option{-u}|@option{--unconditional-branches}]
136      [@option{-x}|@option{--hash-filenames}]
137      @var{files}
138 @c man end
139 @c man begin SEEALSO
140 gpl(7), gfdl(7), fsf-funding(7), gcc(1) and the Info entry for @file{gcc}.
141 @c man end
142 @end ignore
144 @c man begin OPTIONS
145 @table @gcctabopt
146 @item -h
147 @itemx --help
148 Display help about using @command{gcov} (on the standard output), and
149 exit without doing any further processing.
151 @item -v
152 @itemx --version
153 Display the @command{gcov} version number (on the standard output),
154 and exit without doing any further processing.
156 @item -a
157 @itemx --all-blocks
158 Write individual execution counts for every basic block.  Normally gcov
159 outputs execution counts only for the main blocks of a line.  With this
160 option you can determine if blocks within a single line are not being
161 executed.
163 @item -b
164 @itemx --branch-probabilities
165 Write branch frequencies to the output file, and write branch summary
166 info to the standard output.  This option allows you to see how often
167 each branch in your program was taken.  Unconditional branches will not
168 be shown, unless the @option{-u} option is given.
170 @item -c
171 @itemx --branch-counts
172 Write branch frequencies as the number of branches taken, rather than
173 the percentage of branches taken.
175 @item -n
176 @itemx --no-output
177 Do not create the @command{gcov} output file.
179 @item -l
180 @itemx --long-file-names
181 Create long file names for included source files.  For example, if the
182 header file @file{x.h} contains code, and was included in the file
183 @file{a.c}, then running @command{gcov} on the file @file{a.c} will
184 produce an output file called @file{a.c##x.h.gcov} instead of
185 @file{x.h.gcov}.  This can be useful if @file{x.h} is included in
186 multiple source files and you want to see the individual
187 contributions.  If you use the @samp{-p} option, both the including
188 and included file names will be complete path names.
190 @item -p
191 @itemx --preserve-paths
192 Preserve complete path information in the names of generated
193 @file{.gcov} files.  Without this option, just the filename component is
194 used.  With this option, all directories are used, with @samp{/} characters
195 translated to @samp{#} characters, @file{.} directory components
196 removed and unremoveable @file{..}
197 components renamed to @samp{^}.  This is useful if sourcefiles are in several
198 different directories.
200 @item -r
201 @itemx --relative-only
202 Only output information about source files with a relative pathname
203 (after source prefix elision).  Absolute paths are usually system
204 header files and coverage of any inline functions therein is normally
205 uninteresting.
207 @item -f
208 @itemx --function-summaries
209 Output summaries for each function in addition to the file level summary.
211 @item -o @var{directory|file}
212 @itemx --object-directory @var{directory}
213 @itemx --object-file @var{file}
214 Specify either the directory containing the gcov data files, or the
215 object path name.  The @file{.gcno}, and
216 @file{.gcda} data files are searched for using this option.  If a directory
217 is specified, the data files are in that directory and named after the
218 input file name, without its extension.  If a file is specified here,
219 the data files are named after that file, without its extension.
221 @item -s @var{directory}
222 @itemx --source-prefix @var{directory}
223 A prefix for source file names to remove when generating the output
224 coverage files.  This option is useful when building in a separate
225 directory, and the pathname to the source directory is not wanted when
226 determining the output file names.  Note that this prefix detection is
227 applied before determining whether the source file is absolute.
229 @item -u
230 @itemx --unconditional-branches
231 When branch probabilities are given, include those of unconditional branches.
232 Unconditional branches are normally not interesting.
234 @item -d
235 @itemx --display-progress
236 Display the progress on the standard output.
238 @item -i
239 @itemx --intermediate-format
240 Output gcov file in an easy-to-parse intermediate text format that can
241 be used by @command{lcov} or other tools. The output is a single
242 @file{.gcov} file per @file{.gcda} file. No source code is required.
244 The format of the intermediate @file{.gcov} file is plain text with
245 one entry per line
247 @smallexample
248 file:@var{source_file_name}
249 function:@var{line_number},@var{execution_count},@var{function_name}
250 lcount:@var{line number},@var{execution_count}
251 branch:@var{line_number},@var{branch_coverage_type}
253 Where the @var{branch_coverage_type} is
254    notexec (Branch not executed)
255    taken (Branch executed and taken)
256    nottaken (Branch executed, but not taken)
258 There can be multiple @var{file} entries in an intermediate gcov
259 file. All entries following a @var{file} pertain to that source file
260 until the next @var{file} entry.
261 @end smallexample
263 Here is a sample when @option{-i} is used in conjunction with @option{-b} option:
265 @smallexample
266 file:array.cc
267 function:11,1,_Z3sumRKSt6vectorIPiSaIS0_EE
268 function:22,1,main
269 lcount:11,1
270 lcount:12,1
271 lcount:14,1
272 branch:14,taken
273 lcount:26,1
274 branch:28,nottaken
275 @end smallexample
277 @item -m
278 @itemx --demangled-names
279 Display demangled function names in output. The default is to show
280 mangled function names.
282 @item -x
283 @itemx --hash-filenames
284 By default, gcov uses the full pathname of the source files to to create
285 an output filename.  This can lead to long filenames that can overflow
286 filesystem limits.  This option creates names of the form
287 @file{@var{source-file}##@var{md5}.gcov},
288 where the @var{source-file} component is the final filename part and
289 the @var{md5} component is calculated from the full mangled name that
290 would have been used otherwise.
292 @end table
294 @command{gcov} should be run with the current directory the same as that
295 when you invoked the compiler.  Otherwise it will not be able to locate
296 the source files.  @command{gcov} produces files called
297 @file{@var{mangledname}.gcov} in the current directory.  These contain
298 the coverage information of the source file they correspond to.
299 One @file{.gcov} file is produced for each source (or header) file
300 containing code,
301 which was compiled to produce the data files.  The @var{mangledname} part
302 of the output file name is usually simply the source file name, but can
303 be something more complicated if the @samp{-l} or @samp{-p} options are
304 given.  Refer to those options for details.
306 If you invoke @command{gcov} with multiple input files, the
307 contributions from each input file are summed.  Typically you would
308 invoke it with the same list of files as the final link of your executable.
310 The @file{.gcov} files contain the @samp{:} separated fields along with
311 program source code.  The format is
313 @smallexample
314 @var{execution_count}:@var{line_number}:@var{source line text}
315 @end smallexample
317 Additional block information may succeed each line, when requested by
318 command line option.  The @var{execution_count} is @samp{-} for lines
319 containing no code.  Unexecuted lines are marked @samp{#####} or
320 @samp{====}, depending on whether they are reachable by
321 non-exceptional paths or only exceptional paths such as C++ exception
322 handlers, respectively.
324 Some lines of information at the start have @var{line_number} of zero.
325 These preamble lines are of the form
327 @smallexample
328 -:0:@var{tag}:@var{value}
329 @end smallexample
331 The ordering and number of these preamble lines will be augmented as
332 @command{gcov} development progresses --- do not rely on them remaining
333 unchanged.  Use @var{tag} to locate a particular preamble line.
335 The additional block information is of the form
337 @smallexample
338 @var{tag} @var{information}
339 @end smallexample
341 The @var{information} is human readable, but designed to be simple
342 enough for machine parsing too.
344 When printing percentages, 0% and 100% are only printed when the values
345 are @emph{exactly} 0% and 100% respectively.  Other values which would
346 conventionally be rounded to 0% or 100% are instead printed as the
347 nearest non-boundary value.
349 When using @command{gcov}, you must first compile your program with two
350 special GCC options: @samp{-fprofile-arcs -ftest-coverage}.
351 This tells the compiler to generate additional information needed by
352 gcov (basically a flow graph of the program) and also includes
353 additional code in the object files for generating the extra profiling
354 information needed by gcov.  These additional files are placed in the
355 directory where the object file is located.
357 Running the program will cause profile output to be generated.  For each
358 source file compiled with @option{-fprofile-arcs}, an accompanying
359 @file{.gcda} file will be placed in the object file directory.
361 Running @command{gcov} with your program's source file names as arguments
362 will now produce a listing of the code along with frequency of execution
363 for each line.  For example, if your program is called @file{tmp.c}, this
364 is what you see when you use the basic @command{gcov} facility:
366 @smallexample
367 $ gcc -fprofile-arcs -ftest-coverage tmp.c
368 $ a.out
369 $ gcov tmp.c
370 File 'tmp.c'
371 Lines executed:90.00% of 10
372 Creating 'tmp.c.gcov'
373 @end smallexample
375 The file @file{tmp.c.gcov} contains output from @command{gcov}.
376 Here is a sample:
378 @smallexample
379         -:    0:Source:tmp.c
380         -:    0:Graph:tmp.gcno
381         -:    0:Data:tmp.gcda
382         -:    0:Runs:1
383         -:    0:Programs:1
384         -:    1:#include <stdio.h>
385         -:    2:
386         -:    3:int main (void)
387         1:    4:@{
388         1:    5:  int i, total;
389         -:    6:
390         1:    7:  total = 0;
391         -:    8:
392        11:    9:  for (i = 0; i < 10; i++)
393        10:   10:    total += i;
394         -:   11:
395         1:   12:  if (total != 45)
396     #####:   13:    printf ("Failure\n");
397         -:   14:  else
398         1:   15:    printf ("Success\n");
399         1:   16:  return 0;
400         -:   17:@}
401 @end smallexample
403 When you use the @option{-a} option, you will get individual block
404 counts, and the output looks like this:
406 @smallexample
407         -:    0:Source:tmp.c
408         -:    0:Graph:tmp.gcno
409         -:    0:Data:tmp.gcda
410         -:    0:Runs:1
411         -:    0:Programs:1
412         -:    1:#include <stdio.h>
413         -:    2:
414         -:    3:int main (void)
415         1:    4:@{
416         1:    4-block  0
417         1:    5:  int i, total;
418         -:    6:
419         1:    7:  total = 0;
420         -:    8:
421        11:    9:  for (i = 0; i < 10; i++)
422        11:    9-block  0
423        10:   10:    total += i;
424        10:   10-block  0
425         -:   11:
426         1:   12:  if (total != 45)
427         1:   12-block  0
428     #####:   13:    printf ("Failure\n");
429     $$$$$:   13-block  0
430         -:   14:  else
431         1:   15:    printf ("Success\n");
432         1:   15-block  0
433         1:   16:  return 0;
434         1:   16-block  0
435         -:   17:@}
436 @end smallexample
438 In this mode, each basic block is only shown on one line -- the last
439 line of the block.  A multi-line block will only contribute to the
440 execution count of that last line, and other lines will not be shown
441 to contain code, unless previous blocks end on those lines.
442 The total execution count of a line is shown and subsequent lines show
443 the execution counts for individual blocks that end on that line.  After each
444 block, the branch and call counts of the block will be shown, if the
445 @option{-b} option is given.
447 Because of the way GCC instruments calls, a call count can be shown
448 after a line with no individual blocks.
449 As you can see, line 13 contains a basic block that was not executed.
451 @need 450
452 When you use the @option{-b} option, your output looks like this:
454 @smallexample
455 $ gcov -b tmp.c
456 File 'tmp.c'
457 Lines executed:90.00% of 10
458 Branches executed:80.00% of 5
459 Taken at least once:80.00% of 5
460 Calls executed:50.00% of 2
461 Creating 'tmp.c.gcov'
462 @end smallexample
464 Here is a sample of a resulting @file{tmp.c.gcov} file:
466 @smallexample
467         -:    0:Source:tmp.c
468         -:    0:Graph:tmp.gcno
469         -:    0:Data:tmp.gcda
470         -:    0:Runs:1
471         -:    0:Programs:1
472         -:    1:#include <stdio.h>
473         -:    2:
474         -:    3:int main (void)
475 function main called 1 returned 1 blocks executed 75%
476         1:    4:@{
477         1:    5:  int i, total;
478         -:    6:
479         1:    7:  total = 0;
480         -:    8:
481        11:    9:  for (i = 0; i < 10; i++)
482 branch  0 taken 91% (fallthrough)
483 branch  1 taken 9%
484        10:   10:    total += i;
485         -:   11:
486         1:   12:  if (total != 45)
487 branch  0 taken 0% (fallthrough)
488 branch  1 taken 100%
489     #####:   13:    printf ("Failure\n");
490 call    0 never executed
491         -:   14:  else
492         1:   15:    printf ("Success\n");
493 call    0 called 1 returned 100%
494         1:   16:  return 0;
495         -:   17:@}
496 @end smallexample
498 For each function, a line is printed showing how many times the function
499 is called, how many times it returns and what percentage of the
500 function's blocks were executed.
502 For each basic block, a line is printed after the last line of the basic
503 block describing the branch or call that ends the basic block.  There can
504 be multiple branches and calls listed for a single source line if there
505 are multiple basic blocks that end on that line.  In this case, the
506 branches and calls are each given a number.  There is no simple way to map
507 these branches and calls back to source constructs.  In general, though,
508 the lowest numbered branch or call will correspond to the leftmost construct
509 on the source line.
511 For a branch, if it was executed at least once, then a percentage
512 indicating the number of times the branch was taken divided by the
513 number of times the branch was executed will be printed.  Otherwise, the
514 message ``never executed'' is printed.
516 For a call, if it was executed at least once, then a percentage
517 indicating the number of times the call returned divided by the number
518 of times the call was executed will be printed.  This will usually be
519 100%, but may be less for functions that call @code{exit} or @code{longjmp},
520 and thus may not return every time they are called.
522 The execution counts are cumulative.  If the example program were
523 executed again without removing the @file{.gcda} file, the count for the
524 number of times each line in the source was executed would be added to
525 the results of the previous run(s).  This is potentially useful in
526 several ways.  For example, it could be used to accumulate data over a
527 number of program runs as part of a test verification suite, or to
528 provide more accurate long-term information over a large number of
529 program runs.
531 The data in the @file{.gcda} files is saved immediately before the program
532 exits.  For each source file compiled with @option{-fprofile-arcs}, the
533 profiling code first attempts to read in an existing @file{.gcda} file; if
534 the file doesn't match the executable (differing number of basic block
535 counts) it will ignore the contents of the file.  It then adds in the
536 new execution counts and finally writes the data to the file.
538 @node Gcov and Optimization
539 @section Using @command{gcov} with GCC Optimization
541 If you plan to use @command{gcov} to help optimize your code, you must
542 first compile your program with two special GCC options:
543 @samp{-fprofile-arcs -ftest-coverage}.  Aside from that, you can use any
544 other GCC options; but if you want to prove that every single line
545 in your program was executed, you should not compile with optimization
546 at the same time.  On some machines the optimizer can eliminate some
547 simple code lines by combining them with other lines.  For example, code
548 like this:
550 @smallexample
551 if (a != b)
552   c = 1;
553 else
554   c = 0;
555 @end smallexample
557 @noindent
558 can be compiled into one instruction on some machines.  In this case,
559 there is no way for @command{gcov} to calculate separate execution counts
560 for each line because there isn't separate code for each line.  Hence
561 the @command{gcov} output looks like this if you compiled the program with
562 optimization:
564 @smallexample
565       100:   12:if (a != b)
566       100:   13:  c = 1;
567       100:   14:else
568       100:   15:  c = 0;
569 @end smallexample
571 The output shows that this block of code, combined by optimization,
572 executed 100 times.  In one sense this result is correct, because there
573 was only one instruction representing all four of these lines.  However,
574 the output does not indicate how many times the result was 0 and how
575 many times the result was 1.
577 Inlineable functions can create unexpected line counts.  Line counts are
578 shown for the source code of the inlineable function, but what is shown
579 depends on where the function is inlined, or if it is not inlined at all.
581 If the function is not inlined, the compiler must emit an out of line
582 copy of the function, in any object file that needs it.  If
583 @file{fileA.o} and @file{fileB.o} both contain out of line bodies of a
584 particular inlineable function, they will also both contain coverage
585 counts for that function.  When @file{fileA.o} and @file{fileB.o} are
586 linked together, the linker will, on many systems, select one of those
587 out of line bodies for all calls to that function, and remove or ignore
588 the other.  Unfortunately, it will not remove the coverage counters for
589 the unused function body.  Hence when instrumented, all but one use of
590 that function will show zero counts.
592 If the function is inlined in several places, the block structure in
593 each location might not be the same.  For instance, a condition might
594 now be calculable at compile time in some instances.  Because the
595 coverage of all the uses of the inline function will be shown for the
596 same source lines, the line counts themselves might seem inconsistent.
598 Long-running applications can use the @code{__gcov_reset} and @code{__gcov_dump}
599 facilities to restrict profile collection to the program region of
600 interest. Calling @code{__gcov_reset(void)} will clear all profile counters
601 to zero, and calling @code{__gcov_dump(void)} will cause the profile information
602 collected at that point to be dumped to @file{.gcda} output files.
603 Instrumented applications use a static destructor with priority 99
604 to invoke the @code{__gcov_dump} function. Thus @code{__gcov_dump}
605 is executed after all user defined static destructors,
606 as well as handlers registered with @code{atexit}.
608 @c man end
610 @node Gcov Data Files
611 @section Brief Description of @command{gcov} Data Files
613 @command{gcov} uses two files for profiling.  The names of these files
614 are derived from the original @emph{object} file by substituting the
615 file suffix with either @file{.gcno}, or @file{.gcda}.  The files
616 contain coverage and profile data stored in a platform-independent format.
617 The @file{.gcno} files are placed in the same directory as the object
618 file.  By default, the @file{.gcda} files are also stored in the same
619 directory as the object file, but the GCC @option{-fprofile-dir} option
620 may be used to store the @file{.gcda} files in a separate directory.
622 The @file{.gcno} notes file is generated when the source file is compiled
623 with the GCC @option{-ftest-coverage} option.  It contains information to
624 reconstruct the basic block graphs and assign source line numbers to
625 blocks.
627 The @file{.gcda} count data file is generated when a program containing
628 object files built with the GCC @option{-fprofile-arcs} option is executed.
629 A separate @file{.gcda} file is created for each object file compiled with
630 this option.  It contains arc transition counts, value profile counts, and
631 some summary information.
633 The full details of the file format is specified in @file{gcov-io.h},
634 and functions provided in that header file should be used to access the
635 coverage files.
637 @node Cross-profiling
638 @section Data File Relocation to Support Cross-Profiling
640 Running the program will cause profile output to be generated.  For each
641 source file compiled with @option{-fprofile-arcs}, an accompanying @file{.gcda}
642 file will be placed in the object file directory. That implicitly requires
643 running the program on the same system as it was built or having the same
644 absolute directory structure on the target system. The program will try
645 to create the needed directory structure, if it is not already present.
647 To support cross-profiling, a program compiled with @option{-fprofile-arcs}
648 can relocate the data files based on two environment variables:
650 @itemize @bullet
651 @item
652 GCOV_PREFIX contains the prefix to add to the absolute paths
653 in the object file. Prefix can be absolute, or relative.  The
654 default is no prefix.
656 @item
657 GCOV_PREFIX_STRIP indicates the how many initial directory names to strip off
658 the hardwired absolute paths. Default value is 0.
660 @emph{Note:} If GCOV_PREFIX_STRIP is set without GCOV_PREFIX is undefined,
661  then a relative path is made out of the hardwired absolute paths.
662 @end itemize
664 For example, if the object file @file{/user/build/foo.o} was built with
665 @option{-fprofile-arcs}, the final executable will try to create the data file
666 @file{/user/build/foo.gcda} when running on the target system.  This will
667 fail if the corresponding directory does not exist and it is unable to create
668 it.  This can be overcome by, for example, setting the environment as
669 @samp{GCOV_PREFIX=/target/run} and @samp{GCOV_PREFIX_STRIP=1}.  Such a
670 setting will name the data file @file{/target/run/build/foo.gcda}.
672 You must move the data files to the expected directory tree in order to
673 use them for profile directed optimizations (@option{--use-profile}), or to
674 use the @command{gcov} tool.