Commit 2f360676 by Martin Liska Committed by Martin Liska

Sort options of gcov, gcov-dump and gcov-tool both in --help and documentation

2017-04-28  Martin Liska  <mliska@suse.cz>

	* doc/gcov.texi: Sort options in alphabetic order.
	* doc/gcov-dump.texi: Likewise.
	* doc/gcov-tool.texi: Likewise.
	* gcov.c (print_usage): Likewise.
	* gcov-dump.c (print_usage): Likewise.
	* gcov-tool.c (print_merge_usage_message): Likewise.
	(print_rewrite_usage_message): Likewise.
	(print_overlap_usage_message): Likewise.

From-SVN: r247376
parent 07ea19a7
2017-04-28 Martin Liska <mliska@suse.cz> 2017-04-28 Martin Liska <mliska@suse.cz>
* doc/gcov.texi: Sort options in alphabetic order.
* doc/gcov-dump.texi: Likewise.
* doc/gcov-tool.texi: Likewise.
* gcov.c (print_usage): Likewise.
* gcov-dump.c (print_usage): Likewise.
* gcov-tool.c (print_merge_usage_message): Likewise.
(print_rewrite_usage_message): Likewise.
(print_overlap_usage_message): Likewise.
2017-04-28 Martin Liska <mliska@suse.cz>
PR gcov-profile/53915 PR gcov-profile/53915
* gcov.c (format_gcov): Print 'NAN %' when top > bottom. * gcov.c (format_gcov): Print 'NAN %' when top > bottom.
......
...@@ -72,11 +72,6 @@ gcov-dump [@option{-v}|@option{--version}] ...@@ -72,11 +72,6 @@ gcov-dump [@option{-v}|@option{--version}]
Display help about using @command{gcov-dump} (on the standard output), and Display help about using @command{gcov-dump} (on the standard output), and
exit without doing any further processing. exit without doing any further processing.
@item -v
@itemx --version
Display the @command{gcov-dump} version number (on the standard output),
and exit without doing any further processing.
@item -l @item -l
@itemx --long @itemx --long
Dump content of records. Dump content of records.
...@@ -85,6 +80,11 @@ Dump content of records. ...@@ -85,6 +80,11 @@ Dump content of records.
@itemx --positions @itemx --positions
Dump positions of records. Dump positions of records.
@item -v
@itemx --version
Display the @command{gcov-dump} version number (on the standard output),
and exit without doing any further processing.
@item -w @item -w
@itemx --working-sets @itemx --working-sets
Dump working set computed from summary. Dump working set computed from summary.
......
...@@ -113,23 +113,23 @@ gcov-tool @r{[}@var{global-options}@r{]} SUB_COMMAND @r{[}@var{sub_command-optio ...@@ -113,23 +113,23 @@ gcov-tool @r{[}@var{global-options}@r{]} SUB_COMMAND @r{[}@var{sub_command-optio
gcov-tool [@option{-v}|@option{--version}] [@option{-h}|@option{--help}] gcov-tool [@option{-v}|@option{--version}] [@option{-h}|@option{--help}]
gcov-tool merge [merge-options] @var{directory1} @var{directory2} gcov-tool merge [merge-options] @var{directory1} @var{directory2}
[@option{-o}|@option{--output} @var{directory}]
[@option{-v}|@option{--verbose}] [@option{-v}|@option{--verbose}]
[@option{-o}|@option{ --output} @var{directory}]
[@option{-w}|@option{--weight} @var{w1,w2}] [@option{-w}|@option{--weight} @var{w1,w2}]
gcov-tool rewrite [rewrite-options] @var{directory} gcov-tool rewrite [rewrite-options] @var{directory}
[@option{-v}|@option{--verbose}] [@option{-n}|@option{--normalize} @var{long_long_value}]
[@option{-o}|@option{--output} @var{directory}] [@option{-o}|@option{--output} @var{directory}]
[@option{-s}|@option{--scale} @var{float_or_simple-frac_value}] [@option{-s}|@option{--scale} @var{float_or_simple-frac_value}]
[@option{-n}|@option{--normalize} @var{long_long_value}] [@option{-v}|@option{--verbose}]
gcov-tool overlap [overlap-options] @var{directory1} @var{directory2} gcov-tool overlap [overlap-options] @var{directory1} @var{directory2}
[@option{-v}|@option{--verbose}]
[@option{-h}|@option{--hotonly}]
[@option{-f}|@option{--function}] [@option{-f}|@option{--function}]
[@option{-F}|@option{--fullname}] [@option{-F}|@option{--fullname}]
[@option{-h}|@option{--hotonly}]
[@option{-o}|@option{--object}] [@option{-o}|@option{--object}]
[@option{-t}|@option{--hot_threshold}] @var{float} [@option{-t}|@option{--hot_threshold}] @var{float}
[@option{-v}|@option{--verbose}]
@c man end @c man end
@c man begin SEEALSO @c man begin SEEALSO
...@@ -152,17 +152,17 @@ and exit without doing any further processing. ...@@ -152,17 +152,17 @@ and exit without doing any further processing.
@item merge @item merge
Merge two profile directories. Merge two profile directories.
@table @gcctabopt @table @gcctabopt
@item -v
@itemx --verbose
Set the verbose mode.
@item -o @var{directory} @item -o @var{directory}
@itemx --output @var{directory} @itemx --output @var{directory}
Set the output profile directory. Default output directory name is Set the output profile directory. Default output directory name is
@var{merged_profile}. @var{merged_profile}.
@item -v
@itemx --verbose
Set the verbose mode.
@item -w @var{w1},@var{w2} @item -w @var{w1},@var{w2}
@itemx --weight @var{w1},@var{w2} @itemx --weight @var{w1},@var{w2}
Set the merge weights of the @var{directory1} and @var{directory2}, Set the merge weights of the @var{directory1} and @var{directory2},
...@@ -171,11 +171,12 @@ respectively. The default weights are 1 for both. ...@@ -171,11 +171,12 @@ respectively. The default weights are 1 for both.
@item rewrite @item rewrite
Read the specified profile directory and rewrite to a new directory. Read the specified profile directory and rewrite to a new directory.
@table @gcctabopt @table @gcctabopt
@item -v
@itemx --verbose @item -n @var{long_long_value}
Set the verbose mode. @itemx --normalize <long_long_value>
Normalize the profile. The specified value is the max counter value
in the new profile.
@item -o @var{directory} @item -o @var{directory}
@itemx --output @var{directory} @itemx --output @var{directory}
...@@ -186,10 +187,9 @@ Set the output profile directory. Default output name is @var{rewrite_profile}. ...@@ -186,10 +187,9 @@ Set the output profile directory. Default output name is @var{rewrite_profile}.
Scale the profile counters. The specified value can be in floating point value, Scale the profile counters. The specified value can be in floating point value,
or simple fraction value form, such 1, 2, 2/3, and 5/3. or simple fraction value form, such 1, 2, 2/3, and 5/3.
@item -n @var{long_long_value} @item -v
@itemx --normalize <long_long_value> @itemx --verbose
Normalize the profile. The specified value is the max counter value Set the verbose mode.
in the new profile.
@end table @end table
@item overlap @item overlap
...@@ -201,14 +201,6 @@ matched counters and p1_sum_all and p2_sum_all are the sum of counter ...@@ -201,14 +201,6 @@ matched counters and p1_sum_all and p2_sum_all are the sum of counter
values in profile 1 and profile 2, respectively. values in profile 1 and profile 2, respectively.
@table @gcctabopt @table @gcctabopt
@item -v
@itemx --verbose
Set the verbose mode.
@item -h
@itemx --hotonly
Only print info for hot objects/functions.
@item -f @item -f
@itemx --function @itemx --function
Print function level overlap score. Print function level overlap score.
...@@ -217,6 +209,10 @@ Print function level overlap score. ...@@ -217,6 +209,10 @@ Print function level overlap score.
@itemx --fullname @itemx --fullname
Print full gcda filename. Print full gcda filename.
@item -h
@itemx --hotonly
Only print info for hot objects/functions.
@item -o @item -o
@itemx --object @itemx --object
Print object level overlap score. Print object level overlap score.
...@@ -224,6 +220,10 @@ Print object level overlap score. ...@@ -224,6 +220,10 @@ Print object level overlap score.
@item -t @var{float} @item -t @var{float}
@itemx --hot_threshold <float> @itemx --hot_threshold <float>
Set the threshold for hot counter value. Set the threshold for hot counter value.
@item -v
@itemx --verbose
Set the verbose mode.
@end table @end table
@end table @end table
......
...@@ -143,15 +143,6 @@ gpl(7), gfdl(7), fsf-funding(7), gcc(1) and the Info entry for @file{gcc}. ...@@ -143,15 +143,6 @@ gpl(7), gfdl(7), fsf-funding(7), gcc(1) and the Info entry for @file{gcc}.
@c man begin OPTIONS @c man begin OPTIONS
@table @gcctabopt @table @gcctabopt
@item -h
@itemx --help
Display help about using @command{gcov} (on the standard output), and
exit without doing any further processing.
@item -v
@itemx --version
Display the @command{gcov} version number (on the standard output),
and exit without doing any further processing.
@item -a @item -a
@itemx --all-blocks @itemx --all-blocks
...@@ -172,68 +163,18 @@ be shown, unless the @option{-u} option is given. ...@@ -172,68 +163,18 @@ be shown, unless the @option{-u} option is given.
Write branch frequencies as the number of branches taken, rather than Write branch frequencies as the number of branches taken, rather than
the percentage of branches taken. the percentage of branches taken.
@item -n @item -d
@itemx --no-output @itemx --display-progress
Do not create the @command{gcov} output file. Display the progress on the standard output.
@item -l
@itemx --long-file-names
Create long file names for included source files. For example, if the
header file @file{x.h} contains code, and was included in the file
@file{a.c}, then running @command{gcov} on the file @file{a.c} will
produce an output file called @file{a.c##x.h.gcov} instead of
@file{x.h.gcov}. This can be useful if @file{x.h} is included in
multiple source files and you want to see the individual
contributions. If you use the @samp{-p} option, both the including
and included file names will be complete path names.
@item -p
@itemx --preserve-paths
Preserve complete path information in the names of generated
@file{.gcov} files. Without this option, just the filename component is
used. With this option, all directories are used, with @samp{/} characters
translated to @samp{#} characters, @file{.} directory components
removed and unremoveable @file{..}
components renamed to @samp{^}. This is useful if sourcefiles are in several
different directories.
@item -r
@itemx --relative-only
Only output information about source files with a relative pathname
(after source prefix elision). Absolute paths are usually system
header files and coverage of any inline functions therein is normally
uninteresting.
@item -f @item -f
@itemx --function-summaries @itemx --function-summaries
Output summaries for each function in addition to the file level summary. Output summaries for each function in addition to the file level summary.
@item -o @var{directory|file} @item -h
@itemx --object-directory @var{directory} @itemx --help
@itemx --object-file @var{file} Display help about using @command{gcov} (on the standard output), and
Specify either the directory containing the gcov data files, or the exit without doing any further processing.
object path name. The @file{.gcno}, and
@file{.gcda} data files are searched for using this option. If a directory
is specified, the data files are in that directory and named after the
input file name, without its extension. If a file is specified here,
the data files are named after that file, without its extension.
@item -s @var{directory}
@itemx --source-prefix @var{directory}
A prefix for source file names to remove when generating the output
coverage files. This option is useful when building in a separate
directory, and the pathname to the source directory is not wanted when
determining the output file names. Note that this prefix detection is
applied before determining whether the source file is absolute.
@item -u
@itemx --unconditional-branches
When branch probabilities are given, include those of unconditional branches.
Unconditional branches are normally not interesting.
@item -d
@itemx --display-progress
Display the progress on the standard output.
@item -i @item -i
@itemx --intermediate-format @itemx --intermediate-format
...@@ -274,11 +215,75 @@ lcount:26,1 ...@@ -274,11 +215,75 @@ lcount:26,1
branch:28,nottaken branch:28,nottaken
@end smallexample @end smallexample
@item -l
@itemx --long-file-names
Create long file names for included source files. For example, if the
header file @file{x.h} contains code, and was included in the file
@file{a.c}, then running @command{gcov} on the file @file{a.c} will
produce an output file called @file{a.c##x.h.gcov} instead of
@file{x.h.gcov}. This can be useful if @file{x.h} is included in
multiple source files and you want to see the individual
contributions. If you use the @samp{-p} option, both the including
and included file names will be complete path names.
@item -m @item -m
@itemx --demangled-names @itemx --demangled-names
Display demangled function names in output. The default is to show Display demangled function names in output. The default is to show
mangled function names. mangled function names.
@item -n
@itemx --no-output
Do not create the @command{gcov} output file.
@item -o @var{directory|file}
@itemx --object-directory @var{directory}
@itemx --object-file @var{file}
Specify either the directory containing the gcov data files, or the
object path name. The @file{.gcno}, and
@file{.gcda} data files are searched for using this option. If a directory
is specified, the data files are in that directory and named after the
input file name, without its extension. If a file is specified here,
the data files are named after that file, without its extension.
@item -p
@itemx --preserve-paths
Preserve complete path information in the names of generated
@file{.gcov} files. Without this option, just the filename component is
used. With this option, all directories are used, with @samp{/} characters
translated to @samp{#} characters, @file{.} directory components
removed and unremoveable @file{..}
components renamed to @samp{^}. This is useful if sourcefiles are in several
different directories.
@item -r
@itemx --relative-only
Only output information about source files with a relative pathname
(after source prefix elision). Absolute paths are usually system
header files and coverage of any inline functions therein is normally
uninteresting.
@item -s @var{directory}
@itemx --source-prefix @var{directory}
A prefix for source file names to remove when generating the output
coverage files. This option is useful when building in a separate
directory, and the pathname to the source directory is not wanted when
determining the output file names. Note that this prefix detection is
applied before determining whether the source file is absolute.
@item -u
@itemx --unconditional-branches
When branch probabilities are given, include those of unconditional branches.
Unconditional branches are normally not interesting.
@item -v
@itemx --version
Display the @command{gcov} version number (on the standard output),
and exit without doing any further processing.
@item -w
@itemx --verbose
Print verbose informations related to basic blocks and arcs.
@item -x @item -x
@itemx --hash-filenames @itemx --hash-filenames
By default, gcov uses the full pathname of the source files to to create By default, gcov uses the full pathname of the source files to to create
...@@ -289,10 +294,6 @@ where the @var{source-file} component is the final filename part and ...@@ -289,10 +294,6 @@ where the @var{source-file} component is the final filename part and
the @var{md5} component is calculated from the full mangled name that the @var{md5} component is calculated from the full mangled name that
would have been used otherwise. would have been used otherwise.
@item -w
@itemx --verbose
Print verbose informations related to basic blocks and arcs.
@end table @end table
@command{gcov} should be run with the current directory the same as that @command{gcov} should be run with the current directory the same as that
......
...@@ -136,9 +136,9 @@ print_usage (void) ...@@ -136,9 +136,9 @@ print_usage (void)
printf ("Usage: gcov-dump [OPTION] ... gcovfiles\n"); printf ("Usage: gcov-dump [OPTION] ... gcovfiles\n");
printf ("Print coverage file contents\n"); printf ("Print coverage file contents\n");
printf (" -h, --help Print this help\n"); printf (" -h, --help Print this help\n");
printf (" -v, --version Print version number\n");
printf (" -l, --long Dump record contents too\n"); printf (" -l, --long Dump record contents too\n");
printf (" -p, --positions Dump record positions\n"); printf (" -p, --positions Dump record positions\n");
printf (" -v, --version Print version number\n");
printf (" -w, --working-sets Dump working set computed from summary\n"); printf (" -w, --working-sets Dump working set computed from summary\n");
printf ("\nFor bug reporting instructions, please see:\n%s.\n", printf ("\nFor bug reporting instructions, please see:\n%s.\n",
bug_report_url); bug_report_url);
......
...@@ -173,8 +173,8 @@ print_merge_usage_message (int error_p) ...@@ -173,8 +173,8 @@ print_merge_usage_message (int error_p)
FILE *file = error_p ? stderr : stdout; FILE *file = error_p ? stderr : stdout;
fnotice (file, " merge [options] <dir1> <dir2> Merge coverage file contents\n"); fnotice (file, " merge [options] <dir1> <dir2> Merge coverage file contents\n");
fnotice (file, " -v, --verbose Verbose mode\n");
fnotice (file, " -o, --output <dir> Output directory\n"); fnotice (file, " -o, --output <dir> Output directory\n");
fnotice (file, " -v, --verbose Verbose mode\n");
fnotice (file, " -w, --weight <w1,w2> Set weights (float point values)\n"); fnotice (file, " -w, --weight <w1,w2> Set weights (float point values)\n");
} }
...@@ -267,10 +267,10 @@ print_rewrite_usage_message (int error_p) ...@@ -267,10 +267,10 @@ print_rewrite_usage_message (int error_p)
FILE *file = error_p ? stderr : stdout; FILE *file = error_p ? stderr : stdout;
fnotice (file, " rewrite [options] <dir> Rewrite coverage file contents\n"); fnotice (file, " rewrite [options] <dir> Rewrite coverage file contents\n");
fnotice (file, " -v, --verbose Verbose mode\n"); fnotice (file, " -n, --normalize <int64_t> Normalize the profile\n");
fnotice (file, " -o, --output <dir> Output directory\n"); fnotice (file, " -o, --output <dir> Output directory\n");
fnotice (file, " -s, --scale <float or simple-frac> Scale the profile counters\n"); fnotice (file, " -s, --scale <float or simple-frac> Scale the profile counters\n");
fnotice (file, " -n, --normalize <int64_t> Normalize the profile\n"); fnotice (file, " -v, --verbose Verbose mode\n");
} }
static const struct option rewrite_options[] = static const struct option rewrite_options[] =
...@@ -417,12 +417,12 @@ print_overlap_usage_message (int error_p) ...@@ -417,12 +417,12 @@ print_overlap_usage_message (int error_p)
FILE *file = error_p ? stderr : stdout; FILE *file = error_p ? stderr : stdout;
fnotice (file, " overlap [options] <dir1> <dir2> Compute the overlap of two profiles\n"); fnotice (file, " overlap [options] <dir1> <dir2> Compute the overlap of two profiles\n");
fnotice (file, " -v, --verbose Verbose mode\n");
fnotice (file, " -h, --hotonly Only print info for hot objects/functions\n");
fnotice (file, " -f, --function Print function level info\n"); fnotice (file, " -f, --function Print function level info\n");
fnotice (file, " -F, --fullname Print full filename\n"); fnotice (file, " -F, --fullname Print full filename\n");
fnotice (file, " -h, --hotonly Only print info for hot objects/functions\n");
fnotice (file, " -o, --object Print object level info\n"); fnotice (file, " -o, --object Print object level info\n");
fnotice (file, " -t <float>, --hot_threshold <float> Set the threshold for hotness\n"); fnotice (file, " -t <float>, --hot_threshold <float> Set the threshold for hotness\n");
fnotice (file, " -v, --verbose Verbose mode\n");
} }
......
...@@ -683,13 +683,13 @@ print_usage (int error_p) ...@@ -683,13 +683,13 @@ print_usage (int error_p)
fnotice (file, "Usage: gcov [OPTION...] SOURCE|OBJ...\n\n"); fnotice (file, "Usage: gcov [OPTION...] SOURCE|OBJ...\n\n");
fnotice (file, "Print code coverage information.\n\n"); fnotice (file, "Print code coverage information.\n\n");
fnotice (file, " -h, --help Print this help, then exit\n");
fnotice (file, " -a, --all-blocks Show information for every basic block\n"); fnotice (file, " -a, --all-blocks Show information for every basic block\n");
fnotice (file, " -b, --branch-probabilities Include branch probabilities in output\n"); fnotice (file, " -b, --branch-probabilities Include branch probabilities in output\n");
fnotice (file, " -c, --branch-counts Output counts of branches taken\n\ fnotice (file, " -c, --branch-counts Output counts of branches taken\n\
rather than percentages\n"); rather than percentages\n");
fnotice (file, " -d, --display-progress Display progress information\n"); fnotice (file, " -d, --display-progress Display progress information\n");
fnotice (file, " -f, --function-summaries Output summaries for each function\n"); fnotice (file, " -f, --function-summaries Output summaries for each function\n");
fnotice (file, " -h, --help Print this help, then exit\n");
fnotice (file, " -i, --intermediate-format Output .gcov file in intermediate text format\n"); fnotice (file, " -i, --intermediate-format Output .gcov file in intermediate text format\n");
fnotice (file, " -l, --long-file-names Use long output file names for included\n\ fnotice (file, " -l, --long-file-names Use long output file names for included\n\
source files\n"); source files\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment