-
Notifications
You must be signed in to change notification settings - Fork 241
/
geninfo.1
1224 lines (1002 loc) · 30.6 KB
/
geninfo.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
\" Define path to scripts
.ds scriptdir bin
\" Define project URL
.ds lcovurl https://github.com/linux\-test\-project/lcov
.TH geninfo 1 "LCOV 2.0" 2023\-05\-17 "User Manuals"
.SH NAME
geninfo \- Generate tracefiles from GCOV coverage data files
.SH SYNOPSIS
.B geninfo
.RB [ \-h | \-\-help ]
.RB [ \-\-version ]
.RB [ \-q | \-\-quiet ]
.RB [ \-v | \-\-verbose ]
.RB [ \-\-debug ]
.br
.RS 8
.RB [ \-\-comment
.IR comment-string ]
.br
.RB [ \-i | \-\-initial ]
.RB [ \-t | \-\-test\-name
.IR test\-name ]
.br
.RB [ \-o | \-\-output\-filename
.IR filename ]
.RB [ \-f | \-\-follow ]
.br
.RB [ \-b | \-\-base\-directory
.IR directory ]
.br
.RB [ \-\-build\-directory
.IR directory ]
.br
.RB [ \-\-branch\-coverage ]
.br
.RB [ \-\-checksum ]
.RB [ \-\-no\-checksum ]
.br
.RB [ \-\-compat\-libtool ]
.RB [ \-\-no\-compat\-libtool ]
.br
.RB [ \-\-gcov\-tool
.IR tool ]
.br
.RB [ \-\-parallel | -j
.IR [integer] ]
.br
.RB [ \-\-memory
.IR integer_num_Mb ]
.br
.RB [ \-\-ignore\-errors
.IR errors ]
.br
.RB [ \-\-keep\-going ]
.br
.RB [ \-\-preserve ]
.br
.RB [ \-\-filter
.IR type ]
.br
.RB [ \-\-demangle\-cpp [param]]
.br
.RB [ \-\-no\-recursion ]
.RB [ \-\-external ]
.RB [ \-\-no\-external ]
.br
.RB [ \-\-config\-file
.IR config\-file ]
.RB [ \-\-no\-markers ]
.br
.RB [ \-\-derive\-func\-data ]
.RB [ \-\-compat
.IR mode =on|off|auto]
.br
.RB [ \-\-rc
.IR keyword = value ]
.br
.RB [ \-\-include
.IR glob_pattern ]
.br
.RB [ \-\-exclude
.IR glob_pattern ]
.br
.RB [ \-\-erase\-functions
.IR regexp_pattern ]
.br
.RB [ \-\-substitute
.IR regexp_pattern ]
.br
.RB [ \-\-omit\-lines
.IR regexp_pattern ]
.br
.RB [ \-\-forget\-test\-names ]
.br
.RB [ \-\-version\-script
.IR script_file ]
.br
.RB [ \-\-tempdir
.IR dirname ]
.br
.IR directory
.RE
.SH DESCRIPTION
Use
.B geninfo
to create LCOV tracefiles from GCC and LLVM/Clang coverage data files (see
.B --gcov-tool
for considerations when working with LLVM). You can use
.B genhtml
to create an HTML report from a tracefile.
.br
Note that
.B geninfo
is called by
.BR "lcov --capture" ,
so there is typically no need to call it directly.
.br
Unless the
.B --output-filename
option is specified
.B geninfo
writes its output to one file with .info filename extension per input file.
.br
Note also that the current user needs write access to both
.I directory
as well as to the original source code location. This is necessary because some temporary files have to be created there during the conversion process.
.br
By default,
.B geninfo
collects line and function coverage data.
Branch data is not collected; you can use the
.B --branch-coverage
option to enable branch coverage - or you can permanently enable branch coverage by adding the appropriate
settings to your personal, group, or site lcov configuration file. See the
.B lcovrc
man page for details.
.SS "File types"
A
.B tracefile
is a coverage data file in the format used by all LCOV tools such as
.BR geninfo ", " lcov ", and " genhtml .
By convention, tracefiles have a .info filename extension. See "Tracefile format" below for a description of the file format.
.br
A
.B .gcda file
is a compiler-specific file containing run-time coverage data. It is created and updated when a program compiled with GCC/LLVM's
.B --coverage
option is run to completion.
.B geninfo
reads .gcda files in its default mode of operation. Note: earlier compiler versions used the .da filename extension for this file type.
.br
A
.B .gcno file
is a compiler-specific file containing static, compile-time coverage data. It is created when source code is compiled with GCC/LLVM's
.B --coverage
option.
.B geninfo
reads .gcno files when option
.B --initial
is specified. Note: earlier compiler versions used .bb and .bbg filename extensions for this file type.
.br
A
.B .gcov file
is a textual or JSON representation of the data found in .gcda and .gcno files. It is created by the
.BR gcov
tools that is part of GCC (see
.B --gcov-tool
for LLVM considerations).
There are multiple gcov file format versions, including textual, intermediate, and JSON format.
.B geninfo
internally uses
.B gcov
to extract coverage data from .gcda and .gcno files using the best supported gcov file format.
.br
See the
.B gcov
man page for more information on .gcda, .gcno and .gcov output formats.
.br
.SS "Exclusion markers"
To exclude specific lines of code from a tracefile, you can add exclusion
markers to the source code. Additionally you can exclude specific branches from
branch coverage without excluding the involved lines from line and function
coverage. Exclusion markers are keywords which can for example be added in the
form of a comment.
See
.BR lcovrc (5)
how to override some of them.
The following markers are recognized by geninfo:
.B LCOV_EXCL_LINE
.br
.RS
Lines containing this marker will be excluded.
.br
.RE
.B LCOV_EXCL_START
.br
.RS
Marks the beginning of an excluded section. The current line is part of this
section.
.br
.RE
.B LCOV_EXCL_STOP
.br
.RS
Marks the end of an excluded section. The current line not part of this
section.
.br
.RE
.B LCOV_EXCL_BR_LINE
.br
.RS
Lines containing this marker will be excluded from branch coverage.
.br
.RE
.B LCOV_EXCL_BR_START
.br
.RS
Marks the beginning of a section which is excluded from branch coverage. The
current line is part of this section.
.br
.RE
.B LCOV_EXCL_BR_STOP
.br
.RS
Marks the end of a section which is excluded from branch coverage. The current
line not part of this section.
.br
.RE
.B LCOV_EXCL_EXCEPTION_BR_LINE
.br
.RS
Lines containing this marker will be excluded from exception branch coverage:
Exception branches will be ignored, but non-exception branches will not be
affected.
.br
.RE
.B LCOV_EXCL_EXCEPTION_BR_START
.br
.RS
Marks the beginning of a section which is excluded from exception branch
coverage. The current line is part of this section.
.br
.RE
.B LCOV_EXCL_EXCEPTION_BR_STOP
.br
.RS
Marks the end of a section which is excluded from exception branch coverage.
The current line not part of this section
.br
.RE
.SH OPTIONS
.B \-b
.I directory
.br
.B \-\-base\-directory
.I directory
.br
.RS
.RI "Use " directory
as base directory for relative paths.
Use this option to specify the base directory of a build\-environment
when geninfo produces error messages like:
.RS
ERROR: could not read source file /home/user/project/subdir1/subdir2/subdir1/subdir2/file.c
.RE
In this example, use /home/user/project as base directory.
This option is required when using geninfo on projects built with libtool or
similar build environments that work with a base directory, i.e. environments,
where the current working directory when invoking the compiler is not the same
directory in which the source code file is located.
Note that this option will not work in environments where multiple base
directories are used. In that case use configuration file setting
.B geninfo_auto_base=1
(see
.BR lcovrc (5)).
.RE
.B \-\-build\-directory
.I build_dir
.br
.RS
Search for .gcno data files from
.I build_dir
rather finding them only adjacent to the corresponding .o and/or .gcda file.
By default, geninfo expects to find the .gcno and .gcda files (compile-
and run-time data, respectively) in the same directory.
.br
When this option is used:
.br
.RS
geninfo path1 \-\-build\-directory path2 ...
.RE
.br
then geninfo will look for .gcno file
.br
.RS
path2/relative/path/to/da_base.gcno
.RE
.br
when it finds .gcda file
.br
.RS
path1/relative/path/to/da_base.gcda.
.RE
Use this option when you have used the
.I GCOV_PREFIX
environment variable to direct the gcc or llvm runtime environment to write
coverage data files to somewhere other than the directory where the code
was originally compiled.
See
.BR gcc (1)
and/or search for
.I GCOV_PREFIX
and
.I GCOV_PREFIX_STRIP.
This option can be used several times to specify multiple alternate directories to look for .gcno files. This may be useful if your application uses code which is compiled in many separate locations - for example, common libraries that are shared between teams.
.RE
.B \-\-branch\-coverage
.br
.RS
Collect retain branch coverage data.
This is equivalent to using the option "\-\-rc branch_coverage=1"; the option was added to better match the genhml interface.
.RE
.B \-\-checksum
.br
.B \-\-no\-checksum
.br
.RS
Specify whether to generate checksum data when writing tracefiles.
Use
.B \-\-checksum
to enable checksum generation or
.B \-\-no\-checksum
to disable it. Checksum generation is
.B disabled
by default.
When checksum generation is enabled, a checksum will be generated for each
source code line and stored along with the coverage data. This checksum will
be used to prevent attempts to combine coverage data from different source
code versions.
If you don't work with different source code versions, disable this option
to speed up coverage data processing and to reduce the size of tracefiles.
Note that this options is somewhat subsumed by the
.B \-\-version\-script
option - which does something similar, but at the 'whole file' level.
.RE
.B \-\-compat
.IR mode = value [, mode = value ,...]
.br
.RS
Set compatibility mode.
Use
.B \-\-compat
to specify that geninfo should enable one or more compatibility
modes when capturing coverage data. You can provide a comma-separated list
of mode=value pairs to specify the values for multiple modes.
Valid
.I values
are:
.B on
.RS
Enable compatibility mode.
.RE
.B off
.RS
Disable compatibility mode.
.RE
.B auto
.RS
Apply auto-detection to determine if compatibility mode is required. Note that
auto-detection is not available for all compatibility modes.
.RE
If no value is specified, 'on' is assumed as default value.
Valid
.I modes
are:
.B libtool
.RS
Enable this mode if you are capturing coverage data for a project that
was built using the libtool mechanism. See also
.BR \-\-compat\-libtool .
The default value for this setting is 'on'.
.RE
.B hammer
.RS
Enable this mode if you are capturing coverage data for a project that
was built using a version of GCC 3.3 that contains a modification
(hammer patch) of later GCC versions. You can identify a modified GCC 3.3
by checking the build directory of your project for files ending in the
extension .bbg. Unmodified versions of GCC 3.3 name these files .bb.
The default value for this setting is 'auto'.
.RE
.B split_crc
.RS
Enable this mode if you are capturing coverage data for a project that
was built using a version of GCC 4.6 that contains a modification
(split function checksums) of later GCC versions. Typical error messages
when running geninfo on coverage data produced by such GCC versions are
\'out of memory' and 'reached unexpected end of file'.
The default value for this setting is 'auto'
.RE
.RE
.B \-\-compat\-libtool
.br
.B \-\-no\-compat\-libtool
.br
.RS
Specify whether to enable libtool compatibility mode.
Use
.B \-\-compat\-libtool
to enable libtool compatibility mode or
.B \-\-no\-compat\-libtool
to disable it. The libtool compatibility mode is
.B enabled
by default.
When libtool compatibility mode is enabled, geninfo will assume that the source
code relating to a .gcda file located in a directory named ".libs" can be
found in its parent directory.
If you have directories named ".libs" in your build environment but don't use
libtool, disable this option to prevent problems when capturing coverage data.
.RE
.B \-\-config\-file
.I config\-file
.br
.RS
Specify a configuration file to use.
See the lcovrc man page for details of the file format and options.
When this option is specified, neither the system\-wide configuration file
/etc/lcovrc, nor the per\-user configuration file ~/.lcovrc is read.
This option may be useful when there is a need to run several
instances of
.B geninfo
with different configuration file options in parallel.
Note that this option must be specified in full - abbreviations are not supported.
.RE
.B \-\-derive\-func\-data
.br
.RS
Calculate function coverage data from line coverage data.
Use this option to collect function coverage data, even if the version of the
gcov tool installed on the test system does not provide this data. lcov will
instead derive function coverage data from line coverage data and
information about which lines belong to a function.
.RE
.B \-\-external
.br
.B \-\-no\-external
.br
.RS
Specify whether to capture coverage data for external source files.
External source files are files which are not located in one of the directories
specified by
.I directory
or
.BR \-\-base\-directory .
Use
.B \-\-external
to include external source files while capturing coverage data or
.B \-\-no\-external
to ignore this data.
Data for external source files is
.B included
by default.
.RE
.B \-f
.br
.B \-\-follow
.RS
Follow links when searching .gcda files.
.RE
.B \-\-gcov\-tool
.I tool
.br
.RS
Specify the location of the gcov tool.
If the
.B \-\-gcov\-tool
option is used multiple times, then the arguments are concatenated when the callback
is executed - similar to how the gcc
.B \-Xlinker
parameter works. This provides a possibly easier way to pass arguments to
your tool, without requiring a wrapper script.
In that case, your callback will be executed as:
.I tool\-0 'tool\-1; ... 'filename'.
Note that the second and subsequent arguments are quoted when passed to
the shell, in order to handle parameters which contain spaces.
A common use for this option is to enable LLVM:
.br
.RS
.BR "geninfo \-\-gcov-tool " "llvm-cov " "\-\-gcov-tool " "gcov ..."
.RE
.br
Note: 'llvm-cov gcov da_file_name' will generate output in gcov-compatible format as required by lcov.
If not specified, 'gcov' is used by default.
.RE
.B \-h
.br
.B \-\-help
.RS
Print a short help text, then exit.
.RE
.B \-\-include
.I pattern
.br
.RS
Include source files matching
.IR pattern .
Use this switch if you want to include coverage data for only a particular set
of source files matching any of the given patterns. Multiple patterns can be
specified by using multiple
.B \-\-include
command line switches. The
.I patterns
will be interpreted as shell wildcard patterns (note that they may need to be
escaped accordingly to prevent the shell from expanding them first).
See the lcov man page for details
.RE
.B \-\-exclude
.I pattern
.br
.RS
Exclude source files matching
.IR pattern .
Use this switch if you want to exclude coverage data from a particular set
of source files matching any of the given patterns. Multiple patterns can be
specified by using multiple
.B \-\-exclude
command line switches. The
.I patterns
will be interpreted as shell wildcard patterns (note that they may need to be
escaped accordingly to prevent the shell from expanding them first).
Note: The pattern must be specified to match the
.B absolute
path of each source file.
Can be combined with the
.B \-\-include
command line switch. If a given file matches both the include pattern and the
exclude pattern, the exclude pattern will take precedence.
See the lcov man page for details.
.RE
.B \-\-erase\-functions
.I regexp
.br
.RS
Exclude coverage data from lines which fall within a function whose name matches the supplied regexp. Note that this is a mangled or demangled name, depending on whether the \-\-demangle\-cpp option is used or not.
Note that this option requires that you use a gcc version which is new enough to support function begin/end line reports or that you configure the tool to derive the required dta - see the
.BI derive_function_end_line
discussion in the
.B lcovrc
man page.
.RE
.B \-\-substitute
.I regexp_pattern
.br
.RS
Apply Perl regexp
.IR regexp_pattern
to source file names found during processing. This is useful when the path name reported by gcov does not match your source layout and the file is not found. See the lcov man page for more details.
.RE
.B \-\-omit\-lines
.I regexp
.br
.RS
Exclude coverage data from lines whose content matches
.IR regexp .
Use this switch if you want to exclude line and branch coverage data for some particular constructs in your code (e.g., some complicated macro).
See the lcov man page for details.
.RE
.B \-\-forget\-test\-names
.br
.RS
If non\-zero, ignore testcase names in tracefile -
.I i.e.,
treat all coverage data as if it came from the same testcase.
This may improve performance and reduce memory consumption if user does
not need per-testcase coverage summary in coverage reports.
This option can also be configured permanently using the configuration file
option
.IR forget_testcase_names .
.RE
.B \-\-ignore\-errors
.I errors
.br
.RS
Specify a list of errors after which to continue processing.
Use this option to specify a list of one or more classes of errors after which
.B geninfo
should continue processing instead of aborting.
Note that the tool will generate a warning (rather than a fatal error) unless you ignore the error two (or more) times:
.br
.RS
geninfo ... \-\-ignore\-errors unused,unused
.RE
.I errors
can be a comma\-separated list of the following keywords:
.B branch:
branch ID (2nd field in the .info file 'BRDA' entry) does not follow expected integer sequence.
.B callback:
Version script error.
.br
.B corrupt:
corrupt/unreadable file found.
.B count:
An excessive number of messages of some class have been reported - subsequent messages of that type will be suppressed.
The limit can be controlled by the 'max_message_count' variable. See the lcovrc man page.
.B deprecated:
You are using a deprecated option.
This option will be removed in an upcoming release - so you should change your
scripts now.
.B empty:
the .info data file is empty (e.g., because all the code was 'removed' or excluded.
.B format:
unexpected syntax found in .info file.
.B gcov:
the gcov tool returned with a non\-zero return code.
.B graph:
the graph file could not be found or is corrupted.
.B mismatch:
Inconsistent entries found in trace file:
.IP \(bu 3
branch expression (3rd field in the .info file 'BRDA' entry) of merge data does not match, or
.br
.PP
.IP \(bu 3
function execution count (FNDA:...) but no function declaration (FN:...).
.br
.PP
.B negative:
negative 'hit' count found.
.br
Note that negative counts may be caused by a known GCC bug - see
.br
.RS
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68080
.RE
.br
and try compiling with "-fprofile-update=atomic". You will need to recompile, re-run your tests, and re-capture coverage data.
.br
.B package:
a required perl package is not installed on your system. In some cases, it is possible to ignore this message and continue - however, certain features will be disabled in that case.
.B parallel:
various types of errors related to parallelism - e.g., child process died due to some error. If you see an error related to parallel execution, it may be a good idea to remove the
.B \-\-parallel
flag and try again.
.B source:
the source code file for a data set could not be found.
.B unsupported:
the requested feature is not supported for this tool configuration. For example, function begin/end line range exclusions use some GCOV features that are not available in older GCC releases.
.B unused:
the include/exclude/erase/omit/substitute pattern did not match any file pathnames.
.B version:
revision control IDs of the file which we are trying to merge are not the same - line numbering and other information may be incorrect.
.br
Also see man lcovrc for a discussion of the 'max_message_count' parameter which can be used to control the number of warnings which are emitted before all subsequent messages are suppressed. This can be used to reduce log file volume.
.RE
.BI "\-\-keep\-going "
.RS
Do not stop if error occurs: attempt to generate a result, however flawed.
This command line option corresponds to the
.I stop_on_error [0|1]
lcovrc option. See the lcovrc man page for more details.
.RE
.BI "\-\-preserve "
.RS
Preserve intermediate data files (e.g., for debugging).
By default, intermediate files are deleted.
.RE
.BI "\-\-filter "
.I filters
.RS
Specify a list of coverpoint filters to apply to input data.
See the genhtml man page for details.
.RE
.BI "\-\-demangle\-cpp " [param]
.RS
Demangle C++ method and function names in captured output.
See the genhtml man page for details.
.RE
.B \-i
.br
.B \-\-initial
.RS
Capture initial zero coverage data.
Run geninfo with this option on the directories containing .bb, .bbg or .gcno
files before running any test case. The result is a "baseline" coverage data
file that contains zero coverage for every instrumented line and function.
Combine this data file (using lcov \-a) with coverage data files captured
after a test run to ensure that the percentage of total lines covered is
correct even when not all object code files were loaded during the test.
Note: currently, the
.B \-\-initial
option does not generate branch coverage information.
.RE
.B \-\-no\-markers
.br
.RS
Use this option if you want to get coverage data without regard to exclusion
markers in the source code file.
.RE
.B \-\-no\-recursion
.br
.RS
Use this option if you want to get coverage data for the specified directory
only without processing subdirectories.
.RE
.BI "\-o " output\-filename
.br
.BI "\-\-output\-filename " output\-filename
.RS
Write all data to
.IR output\-filename .
If you want to have all data written to a single file (for easier
handling), use this option to specify the respective filename. By default,
one tracefile will be created for each processed .gcda file.
.RE
.RE
.B \-\-version\-script
.I script
.br
.RS
Use
.I script
to get a source file's version ID from revision control when
extracting data. The ID is used for error checking when merging .info files.
.br
See the genhtml man page for more details on the version script.
.RE
.B \-v
.br
.B \-\-verbose
.RS
Increment informational message verbosity. This is mainly used for script and/or flow debugging - e.g., to figure out which data file are found, where.
Also see the
.B \-\-quiet
flag.
Messages are sent to stdout unless there is no output file (i.e., if the coverage data is written to stdout rather than to a file) and to stderr otherwise.
.RE
.B \-q
.br
.B \-\-quiet
.RS
Decrement informational message verbosity.
Decreased verbosity will suppress 'progress' messages for example - while error and warning messages will continue to be printed.
.RE
.B \-\-debug
.RS
Increment 'debug messages' verbosity. This is useful primarily to developers who want to enhance the lcov tool suite.
.RE
.B \-\-comment comment_string
.RS
Append
.I comment_string
to list of comments emitted into output result file.
This option may be specified multiple times.
Comments are printed at the top of the file, in the order they were specified.
Comments can be useful to document the conditions under which the trace file was
generated: host, date, environment,
.I etc.
.RE
.BI "\-\-parallel "
.I [ integer ]
.br
.BI "\-j "
.I [ integer ]
.RS
Specify parallelism to use during processing (maximum number of forked child processes). If the optional integer parallelism parameter is zero or is missing, then use to use up the number of cores on the machine. Default is not to use a single process (no parallelism).
See the
.I geninfo_chunk_size
and
.I geninfo_interval_update
enttries in the
.B lcovrc
man page for a description of some options which may aid in paramter tuning and performance optiminzation.
.RE
.BI "\-\-memory "
.I integer
.RS
Specify the maximum amount of memory to use during parallel processing, in Mb. Effectively, the process will not fork() if this limit would be exceeded. Default is 0 (zero) - which means that there is no limit.
This option may be useful if the compute farm environment imposes strict limits on resource utilization such that the job will be killed if it tries to use too many parallel children - but the user does now know a priori what the permissible maximum is. This option enables the tool to use maximum parallelism - up to the limit imposed by the memory restriction.
.RE
.B \-\-rc
.IR keyword = value
.br
.RS
Override a configuration directive.
Use this option to specify a
.IR keyword = value
statement which overrides the corresponding configuration statement in
the lcovrc configuration file. You can specify this option more than once
to override multiple configuration statements.
See
.BR lcovrc (5)
for a list of available keywords and their meaning.
.RE
.BI "\-t " testname
.br
.BI "\-\-test\-name " testname
.RS
Use test case name
.I testname
for resulting data. Valid test case names can consist of letters, decimal
digits and the underscore character ('_').
This proves useful when data from several test cases is merged (i.e. by
simply concatenating the respective tracefiles) in which case a test
name can be used to differentiate between data from each test case.
.RE
.B \-\-version
.RS
Print version number, then exit.
.RE
.B \-\-tempdir
.I dirname
.br
.RS
Write temporary and intermediate data to indicated directory. Default is "/tmp".
.RE
.SH "TRACEFILE FORMAT"
Following is a quick description of the tracefile format as used by
.BR genhtml ", " geninfo " and " lcov .
A tracefile is made up of several human\-readable lines of text,
divided into sections. If the
.BI "--\-comment\ comment_string"
option is supplied, then
.RS
#comment_string