From: Göran Uddeborg Date: Wed, 26 Aug 2020 23:06:28 +0000 (-0600) Subject: Fix documentation of -fprofile-exclude-files X-Git-Tag: upstream/12.2.0~14063 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8ca43e4ea58ae436af4b5818916abc15b2fd8f49;p=platform%2Fupstream%2Fgcc.git Fix documentation of -fprofile-exclude-files 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. 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 513125f..dd68c61 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -2210,11 +2210,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 fe01b65..c999242 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -13859,20 +13859,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