OLD | NEW |
1 .TH lcov 1 "LCOV 1.7" 2008\-11\-17 "User Manuals" | 1 .TH lcov 1 "LCOV 1.10" 2012\-10\-10 "User Manuals" |
2 .SH NAME | 2 .SH NAME |
3 lcov \- a graphical GCOV front\-end | 3 lcov \- a graphical GCOV front\-end |
4 .SH SYNOPSIS | 4 .SH SYNOPSIS |
5 .B lcov | 5 .B lcov |
6 .RB [ \-h | \-\-help ] | 6 .BR \-c | \-\-capture |
7 .RB [ \-v | \-\-version ] | |
8 .RB [ \-q | \-\-quiet ] | |
9 .RS 5 | 7 .RS 5 |
10 .br | 8 .br |
11 .RB [ \-z | \-\-zerocounters ] | 9 .RB [ \-d | \-\-directory |
12 .RB [ \-c | \-\-capture ] | 10 .IR directory ] |
| 11 .RB [ \-k | \-\-kernel\-directory |
| 12 .IR directory ] |
13 .br | 13 .br |
14 .RB [ \-a | \-\-add\-tracefile | 14 .RB [ \-o | \-\-output\-file |
15 .IR tracefile ] | 15 .IR tracefile ] |
16 .br | |
17 .RB [ \-e | \-\-extract | |
18 .IR tracefile ] | |
19 .br | |
20 .RB [ \-r | \-\-remove | |
21 .IR tracefile ] | |
22 .br | |
23 .RB [ \-l | \-\-list | |
24 .IR tracefile ] | |
25 .br | |
26 .RB [ \-\-diff | |
27 .IR "tracefile diff" ] | |
28 .br | |
29 .RB [ \-i | \-\-initial ] | |
30 .RB [ \-t | \-\-test\-name | 16 .RB [ \-t | \-\-test\-name |
31 .IR testname ] | 17 .IR testname ] |
32 .br | 18 .br |
33 .RB [ \-o | \-\-output\-file | 19 .RB [ \-b | \-\-base\-directory |
34 .IR filename ] | 20 .IR directory ] |
| 21 .RB [ \-i | \-\-initial ] |
| 22 .RB [ \-\-gcov\-tool |
| 23 .IR tool ] |
| 24 .br |
| 25 .RB [ \-\-checksum ] |
| 26 .RB [ \-\-no\-checksum ] |
| 27 .RB [ \-\-no\-recursion ] |
| 28 .RB [ \-f | \-\-follow ] |
| 29 .br |
| 30 .RB [ \-\-compat\-libtool ] |
| 31 .RB [ \-\-no\-compat\-libtool ] |
| 32 .RB [ \-\-ignore\-errors |
| 33 .IR errors ] |
| 34 .br |
| 35 .RB [ \-\-to\-package |
| 36 .IR package ] |
| 37 .RB [ \-\-from\-package |
| 38 .IR package ] |
| 39 .RB [ \-q | \-\-quiet ] |
| 40 .br |
| 41 .RB [ \-\-no\-markers ] |
| 42 .RB [ \-\-external ] |
| 43 .RB [ \-\-no\-external ] |
| 44 .br |
| 45 .RB [ \-\-config\-file |
| 46 .IR config\-file ] |
| 47 .RB [ \-\-rc |
| 48 .IR keyword = value ] |
| 49 .br |
| 50 .RB [ \-\-compat |
| 51 .IR mode =on|off|auto] |
| 52 .br |
| 53 .RE |
| 54 |
| 55 .B lcov |
| 56 .BR \-z | \-\-zerocounters |
| 57 .RS 5 |
35 .br | 58 .br |
36 .RB [ \-d | \-\-directory | 59 .RB [ \-d | \-\-directory |
37 .IR directory ] | 60 .IR directory ] |
38 .br | 61 .RB [ \-\-no\-recursion ] |
39 .RB [ \-f | \-\-follow ] | 62 .RB [ \-f | \-\-follow ] |
40 .br | 63 .br |
41 .RB [ \-k | \-\-kernel\-directory | 64 .RB [ \-q | \-\-quiet ] |
42 .IR directory ] | |
43 .br | 65 .br |
44 .RB [ \-b | \-\-base\-directory | 66 .RE |
45 .IR directory ] | 67 |
| 68 .B lcov |
| 69 .BR \-l | \-\-list |
| 70 .I tracefile |
| 71 .RS 5 |
| 72 .br |
| 73 .RB [ \-q | \-\-quiet ] |
| 74 .RB [ \-\-list\-full\-path ] |
| 75 .RB [ \-\-no\-list\-full\-path ] |
| 76 .br |
| 77 .RB [ \-\-config\-file |
| 78 .IR config\-file ] |
| 79 .RB [ \-\-rc |
| 80 .IR keyword = value ] |
| 81 .br |
| 82 .RE |
| 83 |
| 84 .B lcov |
| 85 .BR \-a | \-\-add\-tracefile |
| 86 .I tracefile |
| 87 .RS 5 |
| 88 .br |
| 89 .RB [ \-o | \-\-output\-file |
| 90 .IR tracefile ] |
| 91 .RB [ \-\-checksum ] |
| 92 .RB [ \-\-no\-checksum ] |
| 93 .br |
| 94 .RB [ \-q | \-\-quiet ] |
| 95 .RB [ \-\-config\-file |
| 96 .IR config\-file ] |
| 97 .RB [ \-\-rc |
| 98 .IR keyword = value ] |
| 99 .br |
| 100 .RE |
| 101 |
| 102 .B lcov |
| 103 .BR \-e | \-\-extract |
| 104 .I tracefile pattern |
| 105 .RS 5 |
| 106 .br |
| 107 .RB [ \-o | \-\-output\-file |
| 108 .IR tracefile ] |
| 109 .RB [ \-\-checksum ] |
| 110 .RB [ \-\-no\-checksum ] |
| 111 .br |
| 112 .RB [ \-q | \-\-quiet ] |
| 113 .RB [ \-\-config\-file |
| 114 .IR config\-file ] |
| 115 .RB [ \-\-rc |
| 116 .IR keyword = value ] |
| 117 .br |
| 118 .RE |
| 119 |
| 120 .B lcov |
| 121 .BR \-r | \-\-remove |
| 122 .I tracefile pattern |
| 123 .RS 5 |
| 124 .br |
| 125 .RB [ \-o | \-\-output\-file |
| 126 .IR tracefile ] |
| 127 .RB [ \-\-checksum ] |
| 128 .RB [ \-\-no\-checksum ] |
| 129 .br |
| 130 .RB [ \-q | \-\-quiet ] |
| 131 .RB [ \-\-config\-file |
| 132 .IR config\-file ] |
| 133 .RB [ \-\-rc |
| 134 .IR keyword = value ] |
| 135 .br |
| 136 .RE |
| 137 |
| 138 .B lcov |
| 139 .BR \-\-diff |
| 140 .IR "tracefile diff" |
| 141 .RS 5 |
| 142 .br |
| 143 .RB [ \-o | \-\-output\-file |
| 144 .IR tracefile ] |
| 145 .RB [ \-\-checksum ] |
| 146 .RB [ \-\-no\-checksum ] |
46 .br | 147 .br |
47 .RB [ \-\-convert\-filenames ] | 148 .RB [ \-\-convert\-filenames ] |
48 .RB [ \-\-strip | 149 .RB [ \-\-strip |
49 .IR depth ] | 150 .IR depth ] |
50 .RB [ \-\-path | 151 .RB [ \-\-path |
51 .IR path ] | 152 .IR path ] |
| 153 .RB [ \-q | \-\-quiet ] |
52 .br | 154 .br |
53 .RB [ \-\-checksum ] | 155 .RB [ \-\-config\-file |
54 .RB [ \-\-no\-checksum ] | 156 .IR config\-file ] |
| 157 .RB [ \-\-rc |
| 158 .IR keyword = value ] |
55 .br | 159 .br |
56 .RB [ \-\-compat\-libtool ] | 160 .RE |
57 .RB [ \-\-no\-compat\-libtool ] | 161 |
| 162 .B lcov |
| 163 .BR \-\-summary |
| 164 .I tracefile |
| 165 .RS 5 |
58 .br | 166 .br |
59 .RB [ \-\-gcov\-tool | 167 .RB [ \-q | \-\-quiet ] |
60 .IR tool ] | |
61 .RB [ \-\-ignore\-errors | |
62 .IR errors ] | |
63 .br | 168 .br |
64 .RB [ \-\-no\-recursion ] | 169 .RE |
| 170 |
| 171 .B lcov |
| 172 .RB [ \-h | \-\-help ] |
| 173 .RB [ \-v | \-\-version ] |
| 174 .RS 5 |
| 175 .br |
| 176 .RE |
| 177 |
65 .SH DESCRIPTION | 178 .SH DESCRIPTION |
66 .B lcov | 179 .B lcov |
67 is a graphical front\-end for GCC's coverage testing tool gcov. It collects | 180 is a graphical front\-end for GCC's coverage testing tool gcov. It collects |
68 gcov data for multiple source files and creates HTML pages containing the | 181 line, function and branch coverage data for multiple source files and creates |
69 source code annotated with coverage information. It also adds overview pages | 182 HTML pages containing the source code annotated with coverage information. |
70 for easy navigation within the file structure. | 183 It also adds overview pages for easy navigation within the file structure. |
71 | 184 |
72 Use | 185 Use |
73 .B lcov | 186 .B lcov |
74 to collect coverage data and | 187 to collect coverage data and |
75 .B genhtml | 188 .B genhtml |
76 to create HTML pages. Coverage data can either be collected from the | 189 to create HTML pages. Coverage data can either be collected from the |
77 currently running Linux kernel or from a user space application. To do this, | 190 currently running Linux kernel or from a user space application. To do this, |
78 you have to complete the following preparation steps: | 191 you have to complete the following preparation steps: |
79 | 192 |
80 For Linux kernel coverage: | 193 For Linux kernel coverage: |
81 .RS | 194 .RS |
82 Follow the installation instructions for the gcov\-kernel patch: | 195 Follow the setup instructions for the gcov\-kernel infrastructure: |
83 .I http://ltp.sourceforge.net/coverage/gcov.php | 196 .I http://ltp.sourceforge.net/coverage/gcov.php |
| 197 .br |
| 198 |
84 | 199 |
85 .RE | 200 .RE |
86 For user space application coverage: | 201 For user space application coverage: |
87 .RS | 202 .RS |
88 Compile the application with GCC using the options | 203 Compile the application with GCC using the options |
89 "\-fprofile\-arcs" and "\-ftest\-coverage". | 204 "\-fprofile\-arcs" and "\-ftest\-coverage". |
90 .RE | 205 .RE |
91 | 206 |
92 Please note that this man page refers to the output format of | 207 Please note that this man page refers to the output format of |
93 .B lcov | 208 .B lcov |
94 as ".info file" or "tracefile" and that the output of GCOV | 209 as ".info file" or "tracefile" and that the output of GCOV |
95 is called ".da file". | 210 is called ".da file". |
| 211 |
| 212 Also note that when printing percentages, 0% and 100% are only printed when |
| 213 the values are exactly 0% and 100% respectively. Other values which would |
| 214 conventionally be rounded to 0% or 100% are instead printed as nearest |
| 215 non-boundary value. This behavior is in accordance with that of the |
| 216 .BR gcov (1) |
| 217 tool. |
| 218 |
96 .SH OPTIONS | 219 .SH OPTIONS |
97 | 220 |
98 | 221 |
99 .B \-a | 222 .B \-a |
100 .I tracefile | 223 .I tracefile |
101 .br | 224 .br |
102 .B \-\-add\-tracefile | 225 .B \-\-add\-tracefile |
103 .I tracefile | 226 .I tracefile |
104 .br | 227 .br |
105 .RS | 228 .RS |
106 Add contents of | 229 Add contents of |
107 .IR tracefile . | 230 .IR tracefile . |
108 | 231 |
109 Specify several tracefiles using the \-a switch to combine the coverage data | 232 Specify several tracefiles using the \-a switch to combine the coverage data |
110 contained in these files by adding up execution counts for matching test and | 233 contained in these files by adding up execution counts for matching test and |
111 filename combinations. | 234 filename combinations. |
112 | 235 |
113 The result of the add operation will be written to stdout or the tracefile | 236 The result of the add operation will be written to stdout or the tracefile |
114 specified with \-o. | 237 specified with \-o. |
115 | 238 |
116 Only one of \-z, \-c, \-a, \-e, \-r, \-l and \-\-diff may be specified | 239 Only one of \-z, \-c, \-a, \-e, \-r, \-l, \-\-diff or \-\-summary may be |
117 at a time. | 240 specified at a time. |
118 | 241 |
119 .RE | 242 .RE |
120 | 243 |
121 .B \-b | 244 .B \-b |
122 .I directory | 245 .I directory |
123 .br | 246 .br |
124 .B \-\-base\-directory | 247 .B \-\-base\-directory |
125 .I directory | 248 .I directory |
126 .br | 249 .br |
127 .RS | 250 .RS |
128 .RI "Use " directory | 251 .RI "Use " directory |
129 as base directory for relative paths. | 252 as base directory for relative paths. |
130 | 253 |
131 Use this option to specify the base directory of a build\-environment | 254 Use this option to specify the base directory of a build\-environment |
132 when lcov produces error messages like: | 255 when lcov produces error messages like: |
133 | 256 |
134 .RS | 257 .RS |
135 ERROR: could not read source file /home/user/project/subdir1/subdir2/subdir1/sub
dir2/file.c | 258 ERROR: could not read source file /home/user/project/subdir1/subdir2/subdir1/sub
dir2/file.c |
136 .RE | 259 .RE |
137 | 260 |
138 In this example, use /home/user/project as base directory. | 261 In this example, use /home/user/project as base directory. |
139 | 262 |
140 This option is required when using lcov on projects built with libtool or | 263 This option is required when using lcov on projects built with libtool or |
141 similar build environments that work with a base directory, i.e. environments, | 264 similar build environments that work with a base directory, i.e. environments, |
142 where the current working directory when invoking the compiler is not the same | 265 where the current working directory when invoking the compiler is not the same |
143 directory in which the source code file is located. | 266 directory in which the source code file is located. |
144 | 267 |
145 Note that this option will not work in environments where multiple base | 268 Note that this option will not work in environments where multiple base |
146 directories are used. In that case repeat the lcov call for each base directory | 269 directories are used. In that case use configuration file setting |
147 while using the \-\-ignore\-errors option to prevent lcov from exiting when the | 270 .B geninfo_auto_base=1 |
148 first source code file could not be found. This way you can get partial coverage | 271 (see |
149 information for each base directory which can then be combined using the \-a | 272 .BR lcovrc (5)). |
150 option. | |
151 .RE | 273 .RE |
152 | 274 |
153 .B \-c | 275 .B \-c |
154 .br | 276 .br |
155 .B \-\-capture | 277 .B \-\-capture |
156 .br | 278 .br |
157 .RS | 279 .RS |
158 Capture coverage data. | 280 Capture coverage data. |
159 | 281 |
160 By default captures the current kernel execution counts and writes the | 282 By default captures the current kernel execution counts and writes the |
161 resulting coverage data to the standard output. Use the \-\-directory | 283 resulting coverage data to the standard output. Use the \-\-directory |
162 option to capture counts for a user space program. | 284 option to capture counts for a user space program. |
163 | 285 |
164 The result of the capture operation will be written to stdout or the tracefile | 286 The result of the capture operation will be written to stdout or the tracefile |
165 specified with \-o. | 287 specified with \-o. |
166 | 288 |
167 Only one of \-z, \-c, \-a, \-e, \-r, \-l and \-\-diff may be specified | 289 Only one of \-z, \-c, \-a, \-e, \-r, \-l, \-\-diff or \-\-summary may be |
168 at a time. | 290 specified at a time. |
169 .RE | 291 .RE |
170 | 292 |
171 .B \-\-checksum | 293 .B \-\-checksum |
172 .br | 294 .br |
173 .B \-\-no\-checksum | 295 .B \-\-no\-checksum |
174 .br | 296 .br |
175 .RS | 297 .RS |
176 Specify whether to generate checksum data when writing tracefiles. | 298 Specify whether to generate checksum data when writing tracefiles. |
177 | 299 |
178 Use \-\-checksum to enable checksum generation or \-\-no\-checksum to | 300 Use \-\-checksum to enable checksum generation or \-\-no\-checksum to |
179 disable it. Checksum generation is | 301 disable it. Checksum generation is |
180 .B disabled | 302 .B disabled |
181 by default. | 303 by default. |
182 | 304 |
183 When checksum generation is enabled, a checksum will be generated for each | 305 When checksum generation is enabled, a checksum will be generated for each |
184 source code line and stored along with the coverage data. This checksum will | 306 source code line and stored along with the coverage data. This checksum will |
185 be used to prevent attempts to combine coverage data from different source | 307 be used to prevent attempts to combine coverage data from different source |
186 code versions. | 308 code versions. |
187 | 309 |
188 If you don't work with different source code versions, disable this option | 310 If you don't work with different source code versions, disable this option |
189 to speed up coverage data processing and to reduce the size of tracefiles. | 311 to speed up coverage data processing and to reduce the size of tracefiles. |
190 .RE | 312 .RE |
191 | 313 |
| 314 .B \-\-compat |
| 315 .IR mode = value [, mode = value ,...] |
| 316 .br |
| 317 .RS |
| 318 Set compatibility mode. |
| 319 |
| 320 Use \-\-compat to specify that lcov should enable one or more compatibility |
| 321 modes when capturing coverage data. You can provide a comma-separated list |
| 322 of mode=value pairs to specify the values for multiple modes. |
| 323 |
| 324 Valid |
| 325 .I values |
| 326 are: |
| 327 |
| 328 .B on |
| 329 .RS |
| 330 Enable compatibility mode. |
| 331 .RE |
| 332 .B off |
| 333 .RS |
| 334 Disable compatibility mode. |
| 335 .RE |
| 336 .B auto |
| 337 .RS |
| 338 Apply auto-detection to determine if compatibility mode is required. Note that |
| 339 auto-detection is not available for all compatibility modes. |
| 340 .RE |
| 341 |
| 342 If no value is specified, 'on' is assumed as default value. |
| 343 |
| 344 Valid |
| 345 .I modes |
| 346 are: |
| 347 |
| 348 .B libtool |
| 349 .RS |
| 350 Enable this mode if you are capturing coverage data for a project that |
| 351 was built using the libtool mechanism. See also |
| 352 \-\-compat\-libtool. |
| 353 |
| 354 The default value for this setting is 'on'. |
| 355 |
| 356 .RE |
| 357 .B hammer |
| 358 .RS |
| 359 Enable this mode if you are capturing coverage data for a project that |
| 360 was built using a version of GCC 3.3 that contains a modification |
| 361 (hammer patch) of later GCC versions. You can identify a modified GCC 3.3 |
| 362 by checking the build directory of your project for files ending in the |
| 363 extension '.bbg'. Unmodified versions of GCC 3.3 name these files '.bb'. |
| 364 |
| 365 The default value for this setting is 'auto'. |
| 366 |
| 367 .RE |
| 368 .B split_crc |
| 369 .RS |
| 370 Enable this mode if you are capturing coverage data for a project that |
| 371 was built using a version of GCC 4.6 that contains a modification |
| 372 (split function checksums) of later GCC versions. Typical error messages |
| 373 when running lcov on coverage data produced by such GCC versions are |
| 374 \'out of memory' and 'reached unexpected end of file'. |
| 375 |
| 376 The default value for this setting is 'auto' |
| 377 .RE |
| 378 |
| 379 .RE |
| 380 |
192 .B \-\-compat\-libtool | 381 .B \-\-compat\-libtool |
193 .br | 382 .br |
194 .B \-\-no\-compat\-libtool | 383 .B \-\-no\-compat\-libtool |
195 .br | 384 .br |
196 .RS | 385 .RS |
197 Specify whether to enable libtool compatibility mode. | 386 Specify whether to enable libtool compatibility mode. |
198 | 387 |
199 Use \-\-compat\-libtool to enable libtool compatibility mode or \-\-no\-compat\-
libtool | 388 Use \-\-compat\-libtool to enable libtool compatibility mode or \-\-no\-compat\-
libtool |
200 to disable it. The libtool compatibility mode is | 389 to disable it. The libtool compatibility mode is |
201 .B enabled | 390 .B enabled |
202 by default. | 391 by default. |
203 | 392 |
204 When libtool compatibility mode is enabled, lcov will assume that the source | 393 When libtool compatibility mode is enabled, lcov will assume that the source |
205 code relating to a .da file located in a directory named ".libs" can be | 394 code relating to a .da file located in a directory named ".libs" can be |
206 found in its parent directory. | 395 found in its parent directory. |
207 | 396 |
208 If you have directories named ".libs" in your build environment but don't use | 397 If you have directories named ".libs" in your build environment but don't use |
209 libtool, disable this option to prevent problems when capturing coverage data. | 398 libtool, disable this option to prevent problems when capturing coverage data. |
210 .RE | 399 .RE |
211 | 400 |
| 401 .B \-\-config\-file |
| 402 .I config\-file |
| 403 .br |
| 404 .RS |
| 405 Specify a configuration file to use. |
| 406 |
| 407 When this option is specified, neither the system\-wide configuration file |
| 408 /etc/lcovrc, nor the per\-user configuration file ~/.lcovrc is read. |
| 409 |
| 410 This option may be useful when there is a need to run several |
| 411 instances of |
| 412 .B lcov |
| 413 with different configuration file options in parallel. |
| 414 .RE |
| 415 |
212 .B \-\-convert\-filenames | 416 .B \-\-convert\-filenames |
213 .br | 417 .br |
214 .RS | 418 .RS |
215 Convert filenames when applying diff. | 419 Convert filenames when applying diff. |
216 | 420 |
217 Use this option together with \-\-diff to rename the file names of processed | 421 Use this option together with \-\-diff to rename the file names of processed |
218 data sets according to the data provided by the diff. | 422 data sets according to the data provided by the diff. |
219 .RE | 423 .RE |
220 | 424 |
221 .B \-\-diff | 425 .B \-\-diff |
(...skipping 21 matching lines...) Expand all Loading... |
243 Note that lines which are not present in the old version will not be counted | 447 Note that lines which are not present in the old version will not be counted |
244 as instrumented, therefore tracefiles resulting from this operation should | 448 as instrumented, therefore tracefiles resulting from this operation should |
245 not be interpreted individually but together with other tracefiles taken | 449 not be interpreted individually but together with other tracefiles taken |
246 from the newer version. Also keep in mind that converted coverage data should | 450 from the newer version. Also keep in mind that converted coverage data should |
247 only be used for overview purposes as the process itself introduces a loss | 451 only be used for overview purposes as the process itself introduces a loss |
248 of accuracy. | 452 of accuracy. |
249 | 453 |
250 The result of the diff operation will be written to stdout or the tracefile | 454 The result of the diff operation will be written to stdout or the tracefile |
251 specified with \-o. | 455 specified with \-o. |
252 | 456 |
253 Only one of \-z, \-c, \-a, \-e, \-r, \-l and \-\-diff may be specified | 457 Only one of \-z, \-c, \-a, \-e, \-r, \-l, \-\-diff or \-\-summary may be |
254 at a time. | 458 specified at a time. |
255 .RE | 459 .RE |
256 | 460 |
257 .B \-d | 461 .B \-d |
258 .I directory | 462 .I directory |
259 .br | 463 .br |
260 .B \-\-directory | 464 .B \-\-directory |
261 .I directory | 465 .I directory |
262 .br | 466 .br |
263 .RS | 467 .RS |
264 Use .da files in | 468 Use .da files in |
265 .I directory | 469 .I directory |
266 instead of kernel. | 470 instead of kernel. |
267 | 471 |
268 If you want to work on coverage data for a user space program, use this | 472 If you want to work on coverage data for a user space program, use this |
269 option to specify the location where the program was compiled (that's | 473 option to specify the location where the program was compiled (that's |
270 where the counter files ending with .da will be stored). | 474 where the counter files ending with .da will be stored). |
271 | 475 |
272 Note that you may specify this option more than once. | 476 Note that you may specify this option more than once. |
273 .RE | 477 .RE |
274 | 478 |
| 479 .B \-\-external |
| 480 .br |
| 481 .B \-\-no\-external |
| 482 .br |
| 483 .RS |
| 484 Specify whether to capture coverage data for external source files. |
| 485 |
| 486 External source files are files which are not located in one of the directories |
| 487 specified by \-\-directory or \-\-base\-directory. Use \-\-external to include |
| 488 external source files while capturing coverage data or \-\-no\-external to |
| 489 ignore this data. |
| 490 |
| 491 Data for external source files is |
| 492 .B included |
| 493 by default. |
| 494 .RE |
| 495 |
275 .B \-e | 496 .B \-e |
276 .I tracefile | 497 .I tracefile |
277 .I pattern | 498 .I pattern |
278 .br | 499 .br |
279 .B \-\-extract | 500 .B \-\-extract |
280 .I tracefile | 501 .I tracefile |
281 .I pattern | 502 .I pattern |
282 .br | 503 .br |
283 .RS | 504 .RS |
284 Extract data from | 505 Extract data from |
285 .IR tracefile . | 506 .IR tracefile . |
286 | 507 |
287 Use this switch if you want to extract coverage data for only a particular | 508 Use this switch if you want to extract coverage data for only a particular |
288 set of files from a tracefile. Additional command line parameters will be | 509 set of files from a tracefile. Additional command line parameters will be |
289 interpreted as shell wildcard patterns (note that they may need to be | 510 interpreted as shell wildcard patterns (note that they may need to be |
290 escaped accordingly to prevent the shell from expanding them first). | 511 escaped accordingly to prevent the shell from expanding them first). |
291 Every file entry in | 512 Every file entry in |
292 .I tracefile | 513 .I tracefile |
293 which matches at least one of those patterns will be extracted. | 514 which matches at least one of those patterns will be extracted. |
294 | 515 |
295 The result of the extract operation will be written to stdout or the tracefile | 516 The result of the extract operation will be written to stdout or the tracefile |
296 specified with \-o. | 517 specified with \-o. |
297 | 518 |
298 Only one of \-z, \-c, \-a, \-e, \-r, \-l and \-\-diff may be specified | 519 Only one of \-z, \-c, \-a, \-e, \-r, \-l, \-\-diff or \-\-summary may be |
299 at a time. | 520 specified at a time. |
300 .RE | 521 .RE |
301 | 522 |
302 .B \-f | 523 .B \-f |
303 .br | 524 .br |
304 .B \-\-follow | 525 .B \-\-follow |
305 .br | 526 .br |
306 .RS | 527 .RS |
307 Follow links when searching for .da files. | 528 Follow links when searching for .da files. |
308 .RE | 529 .RE |
309 | 530 |
| 531 .B \-\-from\-package |
| 532 .I package |
| 533 .br |
| 534 .RS |
| 535 Use .da files in |
| 536 .I package |
| 537 instead of kernel or directory. |
| 538 |
| 539 Use this option if you have separate machines for build and test and |
| 540 want to perform the .info file creation on the build machine. See |
| 541 \-\-to\-package for more information. |
| 542 .RE |
| 543 |
310 .B \-\-gcov\-tool | 544 .B \-\-gcov\-tool |
311 .I tool | 545 .I tool |
312 .br | 546 .br |
313 .RS | 547 .RS |
314 Specify the location of the gcov tool. | 548 Specify the location of the gcov tool. |
315 .RE | 549 .RE |
316 | 550 |
317 .B \-h | 551 .B \-h |
318 .br | 552 .br |
319 .B \-\-help | 553 .B \-\-help |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 .I subdirectory | 620 .I subdirectory |
387 .br | 621 .br |
388 .B \-\-kernel\-directory | 622 .B \-\-kernel\-directory |
389 .I subdirectory | 623 .I subdirectory |
390 .br | 624 .br |
391 .RS | 625 .RS |
392 Capture kernel coverage data only from | 626 Capture kernel coverage data only from |
393 .IR subdirectory . | 627 .IR subdirectory . |
394 | 628 |
395 Use this option if you don't want to get coverage data for all of the | 629 Use this option if you don't want to get coverage data for all of the |
396 kernel, but only for specific subdirectories. | 630 kernel, but only for specific subdirectories. This option may be specified |
| 631 more than once. |
397 | 632 |
398 Note that you may specify this option more than once. | 633 Note that you may need to specify the full path to the kernel subdirectory |
| 634 depending on the version of the kernel gcov support. |
399 .RE | 635 .RE |
400 | 636 |
401 .B \-l | 637 .B \-l |
402 .I tracefile | 638 .I tracefile |
403 .br | 639 .br |
404 .B \-\-list | 640 .B \-\-list |
405 .I tracefile | 641 .I tracefile |
406 .br | 642 .br |
407 .RS | 643 .RS |
408 List the contents of the | 644 List the contents of the |
409 .IR tracefile . | 645 .IR tracefile . |
410 | 646 |
411 Only one of \-z, \-c, \-a, \-e, \-r, \-l and \-\-diff may be specified | 647 Only one of \-z, \-c, \-a, \-e, \-r, \-l, \-\-diff or \-\-summary may be |
412 at a time. | 648 specified at a time. |
| 649 .RE |
| 650 |
| 651 .B \-\-list\-full\-path |
| 652 .br |
| 653 .B \-\-no\-list\-full\-path |
| 654 .br |
| 655 .RS |
| 656 Specify whether to show full paths during list operation. |
| 657 |
| 658 Use \-\-list\-full\-path to show full paths during list operation |
| 659 or \-\-no\-list\-full\-path to show shortened paths. Paths are |
| 660 .B shortened |
| 661 by default. |
| 662 .RE |
| 663 |
| 664 .B \-\-no\-markers |
| 665 .br |
| 666 .RS |
| 667 Use this option if you want to get coverage data without regard to exclusion |
| 668 markers in the source code file. See |
| 669 .BR "geninfo " (1) |
| 670 for details on exclusion markers. |
413 .RE | 671 .RE |
414 | 672 |
415 .B \-\-no\-recursion | 673 .B \-\-no\-recursion |
416 .br | 674 .br |
417 .RS | 675 .RS |
418 Use this option if you want to get coverage data for the specified directory | 676 Use this option if you want to get coverage data for the specified directory |
419 only without processing subdirectories. | 677 only without processing subdirectories. |
420 .RE | 678 .RE |
421 | 679 |
422 .B \-o | 680 .B \-o |
(...skipping 28 matching lines...) Expand all Loading... |
451 .B \-\-quiet | 709 .B \-\-quiet |
452 .br | 710 .br |
453 .RS | 711 .RS |
454 Do not print progress messages. | 712 Do not print progress messages. |
455 | 713 |
456 This option is implied when no output filename is specified to prevent | 714 This option is implied when no output filename is specified to prevent |
457 progress messages to mess with coverage data which is also printed to | 715 progress messages to mess with coverage data which is also printed to |
458 the standard output. | 716 the standard output. |
459 .RE | 717 .RE |
460 | 718 |
| 719 .B \-\-rc |
| 720 .IR keyword = value |
| 721 .br |
| 722 .RS |
| 723 Override a configuration directive. |
| 724 |
| 725 Use this option to specify a |
| 726 .IR keyword = value |
| 727 statement which overrides the corresponding configuration statement in |
| 728 the lcovrc configuration file. You can specify this option more than once |
| 729 to override multiple configuration statements. |
| 730 See |
| 731 .BR lcovrc (5) |
| 732 for a list of available keywords and their meaning. |
| 733 .RE |
| 734 |
461 .B \-r | 735 .B \-r |
462 .I tracefile | 736 .I tracefile |
463 .I pattern | 737 .I pattern |
464 .br | 738 .br |
465 .B \-\-remove | 739 .B \-\-remove |
466 .I tracefile | 740 .I tracefile |
467 .I pattern | 741 .I pattern |
468 .br | 742 .br |
469 .RS | 743 .RS |
470 Remove data from | 744 Remove data from |
471 .IR tracefile . | 745 .IR tracefile . |
472 | 746 |
473 Use this switch if you want to remove coverage data for a particular | 747 Use this switch if you want to remove coverage data for a particular |
474 set of files from a tracefile. Additional command line parameters will be | 748 set of files from a tracefile. Additional command line parameters will be |
475 interpreted as shell wildcard patterns (note that they may need to be | 749 interpreted as shell wildcard patterns (note that they may need to be |
476 escaped accordingly to prevent the shell from expanding them first). | 750 escaped accordingly to prevent the shell from expanding them first). |
477 Every file entry in | 751 Every file entry in |
478 .I tracefile | 752 .I tracefile |
479 which matches at least one of those patterns will be removed. | 753 which matches at least one of those patterns will be removed. |
480 | 754 |
481 The result of the remove operation will be written to stdout or the tracefile | 755 The result of the remove operation will be written to stdout or the tracefile |
482 specified with \-o. | 756 specified with \-o. |
483 | 757 |
484 Only one of \-z, \-c, \-a, \-e, \-r, \-l and \-\-diff may be specified | 758 Only one of \-z, \-c, \-a, \-e, \-r, \-l, \-\-diff or \-\-summary may be |
485 at a time. | 759 specified at a time. |
486 .RE | 760 .RE |
487 | 761 |
488 .B \-\-strip | 762 .B \-\-strip |
489 .I depth | 763 .I depth |
490 .br | 764 .br |
491 .RS | 765 .RS |
492 Strip path components when applying diff. | 766 Strip path components when applying diff. |
493 | 767 |
494 Use this option together with \-\-diff to tell lcov to disregard the specified | 768 Use this option together with \-\-diff to tell lcov to disregard the specified |
495 number of initial directories when matching tracefile and diff filenames. | 769 number of initial directories when matching tracefile and diff filenames. |
496 .RE | 770 .RE |
497 | 771 |
| 772 .B \-\-summary |
| 773 .I tracefile |
| 774 .br |
| 775 .RS |
| 776 Show summary coverage information for the specified tracefile. |
| 777 |
| 778 Note that you may specify this option more than once. |
| 779 |
| 780 Only one of \-z, \-c, \-a, \-e, \-r, \-l, \-\-diff or \-\-summary may be |
| 781 specified at a time. |
| 782 .RE |
| 783 |
498 .B \-t | 784 .B \-t |
499 .I testname | 785 .I testname |
500 .br | 786 .br |
501 .B \-\-test\-name | 787 .B \-\-test\-name |
502 .I testname | 788 .I testname |
503 .br | 789 .br |
504 .RS | 790 .RS |
505 Specify test name to be stored in the tracefile. | 791 Specify test name to be stored in the tracefile. |
506 | 792 |
507 This name identifies a coverage data set when more than one data set is merged | 793 This name identifies a coverage data set when more than one data set is merged |
508 into a combined tracefile (see option \-a). | 794 into a combined tracefile (see option \-a). |
509 | 795 |
510 Valid test names can consist of letters, decimal digits and the underscore | 796 Valid test names can consist of letters, decimal digits and the underscore |
511 character ("_"). | 797 character ("_"). |
512 .RE | 798 .RE |
513 | 799 |
| 800 .B \-\-to\-package |
| 801 .I package |
| 802 .br |
| 803 .RS |
| 804 Store .da files for later processing. |
| 805 |
| 806 Use this option if you have separate machines for build and test and |
| 807 want to perform the .info file creation on the build machine. To do this, |
| 808 follow these steps: |
| 809 |
| 810 On the test machine: |
| 811 .RS |
| 812 .br |
| 813 \- run the test |
| 814 .br |
| 815 \- run lcov \-c [\-d directory] \-\-to-package |
| 816 .I file |
| 817 .br |
| 818 \- copy |
| 819 .I file |
| 820 to the build machine |
| 821 .RE |
| 822 .br |
| 823 |
| 824 On the build machine: |
| 825 .RS |
| 826 .br |
| 827 \- run lcov \-c \-\-from-package |
| 828 .I file |
| 829 [\-o and other options] |
| 830 .RE |
| 831 .br |
| 832 |
| 833 This works for both kernel and user space coverage data. Note that you might |
| 834 have to specify the path to the build directory using \-b with |
| 835 either \-\-to\-package or \-\-from-package. Note also that the package data |
| 836 must be converted to a .info file before recompiling the program or it will |
| 837 become invalid. |
| 838 .RE |
| 839 |
514 .B \-v | 840 .B \-v |
515 .br | 841 .br |
516 .B \-\-version | 842 .B \-\-version |
517 .br | 843 .br |
518 .RS | 844 .RS |
519 Print version number, then exit. | 845 Print version number, then exit. |
520 .RE | 846 .RE |
521 | 847 |
522 .B \-z | 848 .B \-z |
523 .br | 849 .br |
524 .B \-\-zerocounters | 850 .B \-\-zerocounters |
525 .br | 851 .br |
526 .RS | 852 .RS |
527 Reset all execution counts to zero. | 853 Reset all execution counts to zero. |
528 | 854 |
529 By default tries to reset kernel execution counts. Use the \-\-directory | 855 By default tries to reset kernel execution counts. Use the \-\-directory |
530 option to reset all counters of a user space program. | 856 option to reset all counters of a user space program. |
531 | 857 |
532 Only one of \-z, \-c, \-a, \-e, \-r, \-l and \-\-diff may be specified | 858 Only one of \-z, \-c, \-a, \-e, \-r, \-l, \-\-diff or \-\-summary may be |
533 at a time. | 859 specified at a time. |
534 .RE | 860 .RE |
535 | 861 |
536 .SH FILES | 862 .SH FILES |
537 | 863 |
538 .I /etc/lcovrc | 864 .I /etc/lcovrc |
539 .RS | 865 .RS |
540 The system\-wide configuration file. | 866 The system\-wide configuration file. |
541 .RE | 867 .RE |
542 | 868 |
543 .I ~/.lcovrc | 869 .I ~/.lcovrc |
544 .RS | 870 .RS |
545 The per\-user configuration file. | 871 The per\-user configuration file. |
546 .RE | 872 .RE |
547 | 873 |
548 .SH AUTHOR | 874 .SH AUTHOR |
549 Peter Oberparleiter <Peter.Oberparleiter@de.ibm.com> | 875 Peter Oberparleiter <Peter.Oberparleiter@de.ibm.com> |
550 | 876 |
551 .SH SEE ALSO | 877 .SH SEE ALSO |
552 .BR lcovrc (5), | 878 .BR lcovrc (5), |
553 .BR genhtml (1), | 879 .BR genhtml (1), |
554 .BR geninfo (1), | 880 .BR geninfo (1), |
555 .BR genpng (1), | 881 .BR genpng (1), |
556 .BR gendesc (1), | 882 .BR gendesc (1), |
557 .BR gcov (1) | 883 .BR gcov (1) |
OLD | NEW |