From patchwork Fri Jul 24 11:02:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?G=C3=B6ran_Uddeborg?= X-Patchwork-Id: 1335616 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=uddeborg.se Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=uddeborg.se header.i=@uddeborg.se header.a=rsa-sha256 header.s=default header.b=Dwpeo7VB; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BCmWC3GYkz9sTC for ; Fri, 24 Jul 2020 21:02:31 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CF6C73890406; Fri, 24 Jul 2020 11:02:28 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mimmi.uddeborg.se (mimmi.uddeborg.se [62.65.125.225]) by sourceware.org (Postfix) with ESMTPS id 04D663857C53 for ; Fri, 24 Jul 2020 11:02:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 04D663857C53 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=uddeborg.se Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=goeran@uddeborg.se Received: from mimmi.uddeborg (localhost [127.0.0.1]) by mimmi.uddeborg.se (8.15.2/8.15.2) with ESMTPS id 06OB2Mpm2524674 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Fri, 24 Jul 2020 13:02:22 +0200 DKIM-Filter: OpenDKIM Filter v2.11.0 mimmi.uddeborg.se 06OB2Mpm2524674 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uddeborg.se; s=default; t=1595588542; r=y; bh=3YbEpgPBRWErcoPJ2IA9Pt4J9rO1829IIDHJ0caiFnI=; h=Date:From:To:Subject:From; b=Dwpeo7VBpVgaJpJm+tfhMy900ZWOff6qT/9PIcUmtA0Lk4C3xpV+0zAQZkBAkfjeF tkyTnMtvpN37SR6XFDWKTCrD9qNqFhZHo8OLqm4NbuSTInp0eL7dLiccrAeunablmz ezhIyq8eaWKLKOPmJRyBrGpA7h88FuKQmV6E1B38= Received: (from goeran@localhost) by mimmi.uddeborg (8.15.2/8.15.2/Submit) id 06OB2Mt02524673; Fri, 24 Jul 2020 13:02:22 +0200 MIME-Version: 1.0 Message-ID: <24346.49086.82806.636887@gargle.gargle.HOWL> Date: Fri, 24 Jul 2020 13:02:22 +0200 From: =?utf-8?b?R8O2cmFu?= Uddeborg To: gcc-patches@gcc.gnu.org Subject: [PATCH] gcov-profile: clarify profile-exclude-files documentation [PR96285] X-Mailer: VM 8.2.0b under 26.2 (x86_64-redhat-linux-gnu) X-Face: Y!dkPRvB0]![*xB\M-!MfkgZ"n-BHD$BA(TZCt2r%n^o6|o1dWGQnY1T)l5dc&vd#fDAE#]Dk; {]D@+o+?X(RqRh{#-D^87?5uml$Phvma*@_~1OS(i`D.v &0;f List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "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 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