This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH 7/8] Sort options of gcov, gcov-dump and gcov-tool both in --help and documentation
- From: marxin <mliska at suse dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Cc: hubicka at ucw dot cz, nathan at acm dot org
- Date: Thu, 27 Apr 2017 11:02:09 +0200
- Subject: [PATCH 7/8] Sort options of gcov, gcov-dump and gcov-tool both in --help and documentation
- Authentication-results: sourceware.org; auth=none
- References: <cover.1493371589.git.mliska@suse.cz>
- Resent-user-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
gcc/ChangeLog:
2017-04-27 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.
---
gcc/doc/gcov-dump.texi | 10 ++--
gcc/doc/gcov-tool.texi | 50 +++++++++---------
gcc/doc/gcov.texi | 141 +++++++++++++++++++++++++------------------------
gcc/gcov-dump.c | 2 +-
gcc/gcov-tool.c | 10 ++--
gcc/gcov.c | 2 +-
6 files changed, 108 insertions(+), 107 deletions(-)
diff --git a/gcc/doc/gcov-dump.texi b/gcc/doc/gcov-dump.texi
index d7931fd3a19..26653d28def 100644
--- a/gcc/doc/gcov-dump.texi
+++ b/gcc/doc/gcov-dump.texi
@@ -72,11 +72,6 @@ gcov-dump [@option{-v}|@option{--version}]
Display help about using @command{gcov-dump} (on the standard output), and
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
@itemx --long
Dump content of records.
@@ -85,6 +80,11 @@ Dump content of records.
@itemx --positions
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
@itemx --working-sets
Dump working set computed from summary.
diff --git a/gcc/doc/gcov-tool.texi b/gcc/doc/gcov-tool.texi
index 86044fc1c0b..79f6d96f5ce 100644
--- a/gcc/doc/gcov-tool.texi
+++ b/gcc/doc/gcov-tool.texi
@@ -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 merge [merge-options] @var{directory1} @var{directory2}
+ [@option{-o}|@option{--output} @var{directory}]
[@option{-v}|@option{--verbose}]
- [@option{-o}|@option{ --output} @var{directory}]
[@option{-w}|@option{--weight} @var{w1,w2}]
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{-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}
- [@option{-v}|@option{--verbose}]
- [@option{-h}|@option{--hotonly}]
[@option{-f}|@option{--function}]
[@option{-F}|@option{--fullname}]
+ [@option{-h}|@option{--hotonly}]
[@option{-o}|@option{--object}]
[@option{-t}|@option{--hot_threshold}] @var{float}
+ [@option{-v}|@option{--verbose}]
@c man end
@c man begin SEEALSO
@@ -152,17 +152,17 @@ and exit without doing any further processing.
@item merge
Merge two profile directories.
-
@table @gcctabopt
-@item -v
-@itemx --verbose
-Set the verbose mode.
@item -o @var{directory}
@itemx --output @var{directory}
Set the output profile directory. Default output directory name is
@var{merged_profile}.
+@item -v
+@itemx --verbose
+Set the verbose mode.
+
@item -w @var{w1},@var{w2}
@itemx --weight @var{w1},@var{w2}
Set the merge weights of the @var{directory1} and @var{directory2},
@@ -171,11 +171,12 @@ respectively. The default weights are 1 for both.
@item rewrite
Read the specified profile directory and rewrite to a new directory.
-
@table @gcctabopt
-@item -v
-@itemx --verbose
-Set the verbose mode.
+
+@item -n @var{long_long_value}
+@itemx --normalize <long_long_value>
+Normalize the profile. The specified value is the max counter value
+in the new profile.
@item -o @var{directory}
@itemx --output @var{directory}
@@ -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,
or simple fraction value form, such 1, 2, 2/3, and 5/3.
-@item -n @var{long_long_value}
-@itemx --normalize <long_long_value>
-Normalize the profile. The specified value is the max counter value
-in the new profile.
+@item -v
+@itemx --verbose
+Set the verbose mode.
@end table
@item overlap
@@ -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.
@table @gcctabopt
-@item -v
-@itemx --verbose
-Set the verbose mode.
-
-@item -h
-@itemx --hotonly
-Only print info for hot objects/functions.
-
@item -f
@itemx --function
Print function level overlap score.
@@ -217,6 +209,10 @@ Print function level overlap score.
@itemx --fullname
Print full gcda filename.
+@item -h
+@itemx --hotonly
+Only print info for hot objects/functions.
+
@item -o
@itemx --object
Print object level overlap score.
@@ -224,6 +220,10 @@ Print object level overlap score.
@item -t @var{float}
@itemx --hot_threshold <float>
Set the threshold for hot counter value.
+
+@item -v
+@itemx --verbose
+Set the verbose mode.
@end table
@end table
diff --git a/gcc/doc/gcov.texi b/gcc/doc/gcov.texi
index 2b4101018a2..1befb5a3e08 100644
--- a/gcc/doc/gcov.texi
+++ b/gcc/doc/gcov.texi
@@ -143,15 +143,6 @@ gpl(7), gfdl(7), fsf-funding(7), gcc(1) and the Info entry for @file{gcc}.
@c man begin OPTIONS
@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
@itemx --all-blocks
@@ -172,68 +163,18 @@ be shown, unless the @option{-u} option is given.
Write branch frequencies as the number of branches taken, rather than
the percentage of branches taken.
-@item -n
-@itemx --no-output
-Do not create the @command{gcov} output file.
-
-@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 -d
+@itemx --display-progress
+Display the progress on the standard output.
@item -f
@itemx --function-summaries
Output summaries for each function in addition to the file level summary.
-@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 -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 -h
+@itemx --help
+Display help about using @command{gcov} (on the standard output), and
+exit without doing any further processing.
@item -i
@itemx --intermediate-format
@@ -274,11 +215,75 @@ lcount:26,1
branch:28,nottaken
@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
@itemx --demangled-names
Display demangled function names in output. The default is to show
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
@itemx --hash-filenames
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
the @var{md5} component is calculated from the full mangled name that
would have been used otherwise.
-@item -w
-@itemx --verbose
-Print verbose informations related to basic blocks and arcs.
-
@end table
@command{gcov} should be run with the current directory the same as that
diff --git a/gcc/gcov-dump.c b/gcc/gcov-dump.c
index f2522577e9d..d24e72ac4a1 100644
--- a/gcc/gcov-dump.c
+++ b/gcc/gcov-dump.c
@@ -136,9 +136,9 @@ print_usage (void)
printf ("Usage: gcov-dump [OPTION] ... gcovfiles\n");
printf ("Print coverage file contents\n");
printf (" -h, --help Print this help\n");
- printf (" -v, --version Print version number\n");
printf (" -l, --long Dump record contents too\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 ("\nFor bug reporting instructions, please see:\n%s.\n",
bug_report_url);
diff --git a/gcc/gcov-tool.c b/gcc/gcov-tool.c
index 80c08354857..74e77b90d72 100644
--- a/gcc/gcov-tool.c
+++ b/gcc/gcov-tool.c
@@ -173,8 +173,8 @@ print_merge_usage_message (int error_p)
FILE *file = error_p ? stderr : stdout;
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, " -v, --verbose Verbose mode\n");
fnotice (file, " -w, --weight <w1,w2> Set weights (float point values)\n");
}
@@ -267,10 +267,10 @@ print_rewrite_usage_message (int error_p)
FILE *file = error_p ? stderr : stdout;
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, " -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[] =
@@ -417,12 +417,12 @@ print_overlap_usage_message (int error_p)
FILE *file = error_p ? stderr : stdout;
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, --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, " -t <float>, --hot_threshold <float> Set the threshold for hotness\n");
+ fnotice (file, " -v, --verbose Verbose mode\n");
}
diff --git a/gcc/gcov.c b/gcc/gcov.c
index 22378583c5c..2798009e713 100644
--- a/gcc/gcov.c
+++ b/gcc/gcov.c
@@ -679,13 +679,13 @@ print_usage (int error_p)
fnotice (file, "Usage: gcov [OPTION...] SOURCE|OBJ...\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, " -b, --branch-probabilities Include branch probabilities in output\n");
fnotice (file, " -c, --branch-counts Output counts of branches taken\n\
rather than percentages\n");
fnotice (file, " -d, --display-progress Display progress information\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, " -l, --long-file-names Use long output file names for included\n\
source files\n");
--
2.12.2