📄 arm-linux-gcov.1
字号:
.\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13.\".\" Standard preamble:.\" ========================================================================.de Sh \" Subsection heading.br.if t .Sp.ne 5.PP\fB\\$1\fR.PP...de Sp \" Vertical space (when we can't use .PP).if t .sp .5v.if n .sp...de Vb \" Begin verbatim text.ft CW.nf.ne \\$1...de Ve \" End verbatim text.ft R.fi...\" Set up some character translations and predefined strings. \*(-- will.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left.\" double quote, and \*(R" will give a right double quote. | will give a.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'.\" expand to `' in nroff, nothing in troff, for use with C<>..tr \(*W-|\(bv\*(Tr.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'.ie n \{\. ds -- \(*W-. ds PI pi. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch. ds L" "". ds R" "". ds C` "". ds C' ""'br\}.el\{\. ds -- \|\(em\|. ds PI \(*p. ds L" ``. ds R" '''br\}.\".\" If the F register is turned on, we'll generate index entries on stderr for.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index.\" entries marked with X<> in POD. Of course, you'll have to process the.\" output yourself in some meaningful fashion..if \nF \{\. de IX. tm Index:\\$1\t\\n%\t"\\$2"... nr % 0. rr F.\}.\".\" For nroff, turn off justification. Always turn off hyphenation; it makes.\" way too many mistakes in technical documents..hy 0.if n .na.\".\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2)..\" Fear. Run. Save yourself. No user-serviceable parts.. \" fudge factors for nroff and troff.if n \{\. ds #H 0. ds #V .8m. ds #F .3m. ds #[ \f1. ds #] \fP.\}.if t \{\. ds #H ((1u-(\\\\n(.fu%2u))*.13m). ds #V .6m. ds #F 0. ds #[ \&. ds #] \&.\}. \" simple accents for nroff and troff.if n \{\. ds ' \&. ds ` \&. ds ^ \&. ds , \&. ds ~ ~. ds /.\}.if t \{\. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u". ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'.\}. \" troff and (daisy-wheel) nroff accents.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'.ds 8 \h'\*(#H'\(*b\h'-\*(#H'.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#].ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#].ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#].ds ae a\h'-(\w'a'u*4/10)'e.ds Ae A\h'-(\w'A'u*4/10)'E. \" corrections for vroff.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'. \" for low resolution devices (crt and lpr).if \n(.H>23 .if \n(.V>19 \\{\. ds : e. ds 8 ss. ds o a. ds d- d\h'-1'\(ga. ds D- D\h'-1'\(hy. ds th \o'bp'. ds Th \o'LP'. ds ae ae. ds Ae AE.\}.rm #[ #] #H #V #F C.\" ========================================================================.\".IX Title "GCOV 1".TH GCOV 1 "2005-05-19" "gcc-3.4.4" "GNU".SH "NAME"gcov \- coverage testing tool.SH "SYNOPSIS".IX Header "SYNOPSIS"gcov [\fB\-v\fR|\fB\-\-version\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fB\-a\fR|\fB\-\-all\-blocks\fR] [\fB\-b\fR|\fB\-\-branch\-probabilities\fR] [\fB\-c\fR|\fB\-\-branch\-counts\fR] [\fB\-n\fR|\fB\-\-no\-output\fR] [\fB\-l\fR|\fB\-\-long\-file\-names\fR] [\fB\-p\fR|\fB\-\-preserve\-paths\fR] [\fB\-f\fR|\fB\-\-function\-summaries\fR] [\fB\-o\fR|\fB\-\-object\-directory\fR \fIdirectory|file\fR] \fIsourcefile\fR [\fB\-u\fR|\fB\-\-unconditional\-branches\fR].SH "DESCRIPTION".IX Header "DESCRIPTION"\&\fBgcov\fR is a test coverage program. Use it in concert with \s-1GCC\s0to analyze your programs to help create more efficient, faster runningcode and to discover untested parts of your program. You can use\&\fBgcov\fR as a profiling tool to help discover where youroptimization efforts will best affect your code. You can also use\&\fBgcov\fR along with the other profiling tool, \fBgprof\fR, toassess which parts of your code use the greatest amount of computingtime..PPProfiling tools help you analyze your code's performance. Using aprofiler such as \fBgcov\fR or \fBgprof\fR, you can find out somebasic performance statistics, such as:.IP "\(bu" 4how often each line of code executes.IP "\(bu" 4what lines of code are actually executed.IP "\(bu" 4how much computing time each section of code uses.PPOnce you know these things about how your code works when compiled, youcan look at each module to see which modules should be optimized.\&\fBgcov\fR helps you determine where to work on optimization..PPSoftware developers also use coverage testing in concert withtestsuites, to make sure software is actually good enough for a release.Testsuites can verify that a program works as expected; a coverageprogram tests to see how much of the program is exercised by thetestsuite. Developers can then determine what kinds of test cases needto be added to the testsuites to create both better testing and a betterfinal product..PPYou should compile your code without optimization if you plan to use\&\fBgcov\fR because the optimization, by combining some lines of codeinto one function, may not give you as much information as you need tolook for `hot spots' where the code is using a great deal of computertime. Likewise, because \fBgcov\fR accumulates statistics by line (atthe lowest resolution), it works best with a programming style thatplaces only one statement on each line. If you use complicated macrosthat expand to loops or to other control structures, the statistics areless helpful\-\-\-they only report on the line where the macro callappears. If your complex macros behave like functions, you can replacethem with inline functions to solve this problem..PP\&\fBgcov\fR creates a logfile called \fI\fIsourcefile\fI.gcov\fR whichindicates how many times each line of a source file \fI\fIsourcefile\fI.c\fRhas executed. You can use these logfiles along with \fBgprof\fR to aidin fine-tuning the performance of your programs. \fBgprof\fR givestiming information you can use along with the information you get from\&\fBgcov\fR..PP\&\fBgcov\fR works only on code compiled with \s-1GCC\s0. It is notcompatible with any other profiling or test coverage mechanism..SH "OPTIONS".IX Header "OPTIONS".IP "\fB\-h\fR" 4.IX Item "-h".PD 0.IP "\fB\-\-help\fR" 4.IX Item "--help".PDDisplay help about using \fBgcov\fR (on the standard output), andexit without doing any further processing..IP "\fB\-v\fR" 4.IX Item "-v".PD 0.IP "\fB\-\-version\fR" 4.IX Item "--version".PDDisplay the \fBgcov\fR version number (on the standard output),and exit without doing any further processing..IP "\fB\-a\fR" 4.IX Item "-a".PD 0.IP "\fB\-\-all\-blocks\fR" 4.IX Item "--all-blocks".PDWrite individual execution counts for every basic block. Normally gcovoutputs execution counts only for the main blocks of a line. With thisoption you can determine if blocks within a single line are not beingexecuted..IP "\fB\-b\fR" 4.IX Item "-b".PD 0.IP "\fB\-\-branch\-probabilities\fR" 4.IX Item "--branch-probabilities".PDWrite branch frequencies to the output file, and write branch summaryinfo to the standard output. This option allows you to see how ofteneach branch in your program was taken. Unconditional branches will notbe shown, unless the \fB\-u\fR option is given..IP "\fB\-c\fR" 4.IX Item "-c".PD 0.IP "\fB\-\-branch\-counts\fR" 4.IX Item "--branch-counts".PDWrite branch frequencies as the number of branches taken, rather thanthe percentage of branches taken..IP "\fB\-n\fR" 4.IX Item "-n".PD 0.IP "\fB\-\-no\-output\fR" 4.IX Item "--no-output".PDDo not create the \fBgcov\fR output file..IP "\fB\-l\fR" 4.IX Item "-l".PD 0.IP "\fB\-\-long\-file\-names\fR" 4.IX Item "--long-file-names".PDCreate long file names for included source files. For example, if theheader file \fIx.h\fR contains code, and was included in the file\&\fIa.c\fR, then running \fBgcov\fR on the file \fIa.c\fR will producean output file called \fIa.c##x.h.gcov\fR instead of \fIx.h.gcov\fR.This can be useful if \fIx.h\fR is included in multiple sourcefiles. If you uses the \fB\-p\fR option, both the including andincluded file names will be complete path names..IP "\fB\-p\fR" 4.IX Item "-p".PD 0.IP "\fB\-\-preserve\-paths\fR" 4.IX Item "--preserve-paths".PDPreserve complete path information in the names of generated\&\fI.gcov\fR files. Without this option, just the filename component isused. With this option, all directories are used, with '/' characterstranslated to '#' characters, '.' directory components removed and '..'components renamed to '^'. This is useful if sourcefiles are in severaldifferent directories. It also affects the \fB\-l\fR option..IP "\fB\-f\fR" 4.IX Item "-f".PD 0.IP "\fB\-\-function\-summaries\fR" 4.IX Item "--function-summaries".PDOutput summaries for each function in addition to the file level summary..IP "\fB\-o\fR \fIdirectory|file\fR" 4.IX Item "-o directory|file".PD 0.IP "\fB\-\-object\-directory\fR \fIdirectory\fR" 4.IX Item "--object-directory directory".IP "\fB\-\-object\-file\fR \fIfile\fR" 4.IX Item "--object-file file".PDSpecify either the directory containing the gcov data files, or theobject path name. The \fI.gcno\fR, and\&\fI.gcda\fR data files are searched for using this option. If a directoryis specified, the data files are in that directory and named after thesource file name, without its extension. If a file is specified here,the data files are named after that file, without its extension. If thisoption is not supplied, it defaults to the current directory..IP "\fB\-u\fR" 4.IX Item "-u".PD 0.IP "\fB\-\-unconditional\-branches\fR" 4
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -