From patchwork Thu Apr 27 09:02:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 756291 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wDpY60Tpyz9s7q for ; Fri, 28 Apr 2017 19:34:01 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="waT42OHB"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :resent-from:resent-to:resent-date:resent-message-id:message-id :in-reply-to:references:from:date:subject:to:cc; q=dns; s= default; b=n8Jr3Xh9DBtZwBdR7+zbBoWkrx59GPDvoRBl+V475tuQsxeEo7ESd Gb0IwPOYEvLi9uhMdsREwT03NALxY19dzfsPJ3chnIxnI/ie0Zi0cPnrC1LxDkZq YFbsaGvhKM0M1GHoToYFsU3iMoVqjAsmcJWgBsge1I5W8hSmz/UfuU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :resent-from:resent-to:resent-date:resent-message-id:message-id :in-reply-to:references:from:date:subject:to:cc; s=default; bh=z O4kvq5SF0uT3A4WKt70RrdtV3c=; b=waT42OHB3jEU6aaIDzwAq04gCnxzaHN+J Xp0vUJtNi+rixIi2FKZQ10E3BnZfZ+gayX3TISokRQGQSU6bZy6OUw+bCWrQ8rAA hx6CBJV3eRuS2DVwj4c6hNbhGKMxv4RAl8d82N9RyGpT9PKWr2nMO2xKJqZRaEXY xzbhHLWp08= Received: (qmail 26646 invoked by alias); 28 Apr 2017 09:31:45 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 26584 invoked by uid 89); 28 Apr 2017 09:31:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_SOFTFAIL, UNSUBSCRIBE_BODY autolearn=ham version=3.3.2 spammy=1436, xh, 2246, 1738 X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (208.118.235.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 28 Apr 2017 09:31:39 +0000 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d42FV-0002gW-Sb for gcc-patches@gcc.gnu.org; Fri, 28 Apr 2017 05:31:40 -0400 Received: from mx2.suse.de ([195.135.220.15]:44981 helo=mx1.suse.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d42FV-0002fz-Ft for gcc-patches@gcc.gnu.org; Fri, 28 Apr 2017 05:31:37 -0400 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 7E890AC71 for ; Fri, 28 Apr 2017 09:31:33 +0000 (UTC) Resent-From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Resent-To: GCC Patches Resent-Date: Fri, 28 Apr 2017 11:31:33 +0200 Resent-Message-ID: Resent-User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 Message-Id: <5e62eb5d248e55d411c0c30d874fe3a352af902a.1493371589.git.mliska@suse.cz> In-Reply-To: References: From: marxin 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 To: gcc-patches@gcc.gnu.org Cc: hubicka@ucw.cz, nathan@acm.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-Received-From: 195.135.220.15 X-IsSubscribed: yes gcc/ChangeLog: 2017-04-27 Martin Liska * 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 +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 -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 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] Merge coverage file contents\n"); - fnotice (file, " -v, --verbose Verbose mode\n"); fnotice (file, " -o, --output Output directory\n"); + fnotice (file, " -v, --verbose Verbose mode\n"); fnotice (file, " -w, --weight 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] Rewrite coverage file contents\n"); - fnotice (file, " -v, --verbose Verbose mode\n"); + fnotice (file, " -n, --normalize Normalize the profile\n"); fnotice (file, " -o, --output Output directory\n"); fnotice (file, " -s, --scale Scale the profile counters\n"); - fnotice (file, " -n, --normalize 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] 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 , --hot_threshold 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");