public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] gcov-profile: clarify profile-exclude-files documentation [PR96285]
@ 2020-07-24 11:02 Göran Uddeborg
  2020-07-24 13:42 ` Martin Liška
  0 siblings, 1 reply; 4+ messages in thread
From: Göran Uddeborg @ 2020-07-24 11:02 UTC (permalink / raw)
  To: gcc-patches

The wording of the description of -fprofile-exclude-files is easy to
misunderstand.  One can be led to believe a file is excluded only if
it matches all of the patterns, not just one.  This patch tries to
clarify the function.  It also adjusts the wording of
-fprofile-filter-files accordingly.

2020-07-24  Göran Uddeborg  <goeran@uddeborg.se>

gcc/
	PR gcov-profile/96285
        * common.opt, doc/invoke.texi: Clarify wording of
        -fprofile-exclude-files and adjust -fprofile-filter-files to
        match.

diff --git a/gcc/common.opt b/gcc/common.opt
index a3893a4725e..1662cbfa92d 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -2207,11 +2207,11 @@ Common Joined RejectNegative Enum(profile_update) Var(flag_profile_update) Init(
 
 fprofile-filter-files=
 Common Joined RejectNegative Var(flag_profile_filter_files)
-Instrument only functions from files where names match any regular expression (separated by a semi-colon).
+Instrument only functions from files whose name matches any of the regular expressions (separated by semi-colons).
 
 fprofile-exclude-files=
 Common Joined RejectNegative Var(flag_profile_exclude_files)
-Instrument only functions from files where names do not match all the regular expressions (separated by a semi-colon).
+Instrument only functions from files whose name does not match any of the regular expressions (separated by semi-colons).
 
 Enum
 Name(profile_reproducibility) Type(enum profile_reproducibility) UnknownError(unknown profile reproducibility method %qs)
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index ba18e05fb1a..781fe72ca97 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -13842,20 +13842,20 @@ is present in the command line.
 @item -fprofile-filter-files=@var{regex}
 @opindex fprofile-filter-files
 
-Instrument only functions from files where names match
-any regular expression (separated by a semi-colon).
+Instrument only functions from files whose name matches
+any of the regular expressions (separated by semi-colons).
 
-For example, @option{-fprofile-filter-files=main.c;module.*.c} will instrument
+For example, @option{-fprofile-filter-files=main\.c;module.*\.c} will instrument
 only @file{main.c} and all C files starting with 'module'.
 
 @item -fprofile-exclude-files=@var{regex}
 @opindex fprofile-exclude-files
 
-Instrument only functions from files where names do not match
-all the regular expressions (separated by a semi-colon).
+Instrument only functions from files whose name does not match
+any of the regular expressions (separated by semi-colons).
 
-For example, @option{-fprofile-exclude-files=/usr/*} will prevent instrumentation
-of all files that are located in @file{/usr/} folder.
+For example, @option{-fprofile-exclude-files=/usr/.*} will prevent instrumentation
+of all files that are located in the @file{/usr/} folder.
 
 @item -fprofile-reproducible
 @opindex fprofile-reproducible

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] gcov-profile: clarify profile-exclude-files documentation [PR96285]
  2020-07-24 11:02 [PATCH] gcov-profile: clarify profile-exclude-files documentation [PR96285] Göran Uddeborg
@ 2020-07-24 13:42 ` Martin Liška
  2020-08-26 23:08   ` Jeff Law
  0 siblings, 1 reply; 4+ messages in thread
From: Martin Liška @ 2020-07-24 13:42 UTC (permalink / raw)
  To: Göran Uddeborg, gcc-patches

On 7/24/20 1:02 PM, Göran Uddeborg wrote:
> The wording of the description of -fprofile-exclude-files is easy to
> misunderstand.  One can be led to believe a file is excluded only if
> it matches all of the patterns, not just one.  This patch tries to
> clarify the function.  It also adjusts the wording of
> -fprofile-filter-files accordingly.

Hey.

The patch is fine. Thank you for the improvement.

Please install the patch.
Martin

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] gcov-profile: clarify profile-exclude-files documentation [PR96285]
  2020-07-24 13:42 ` Martin Liška
@ 2020-08-26 23:08   ` Jeff Law
  2020-08-29 21:21     ` Göran Uddeborg
  0 siblings, 1 reply; 4+ messages in thread
From: Jeff Law @ 2020-08-26 23:08 UTC (permalink / raw)
  To: Martin Liška, Göran Uddeborg, gcc-patches

On Fri, 2020-07-24 at 15:42 +0200, Martin Liška wrote:
> On 7/24/20 1:02 PM, Göran Uddeborg wrote:
> > The wording of the description of -fprofile-exclude-files is easy to
> > misunderstand.  One can be led to believe a file is excluded only if
> > it matches all of the patterns, not just one.  This patch tries to
> > clarify the function.  It also adjusts the wording of
> > -fprofile-filter-files accordingly.
> 
> Hey.
> 
> The patch is fine. Thank you for the improvement.
> 
> Please install the patch.
I'm pretty sure Goran doesn't have write access.  So I committed the patch for
him.

Jeff


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] gcov-profile: clarify profile-exclude-files documentation [PR96285]
  2020-08-26 23:08   ` Jeff Law
@ 2020-08-29 21:21     ` Göran Uddeborg
  0 siblings, 0 replies; 4+ messages in thread
From: Göran Uddeborg @ 2020-08-29 21:21 UTC (permalink / raw)
  To: law; +Cc: Martin Liška, gcc-patches

Jeff Law:
> On Fri, 2020-07-24 at 15:42 +0200, Martin Liška wrote:
> > Please install the patch.
> I'm pretty sure Goran doesn't have write access.  So I committed the patch for
> him.

Thanks! (As I don't have write access, I didn't understand the
instruction was directed at me; I thought it was aimed to the list in
general.)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-08-29 21:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-24 11:02 [PATCH] gcov-profile: clarify profile-exclude-files documentation [PR96285] Göran Uddeborg
2020-07-24 13:42 ` Martin Liška
2020-08-26 23:08   ` Jeff Law
2020-08-29 21:21     ` Göran Uddeborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).