From patchwork Wed Oct 4 12:39:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=C3=B8rgen_Kvalsvik?= X-Patchwork-Id: 148280 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:254a:b0:403:3b70:6f57 with SMTP id hf10csp102260vqb; Wed, 4 Oct 2023 05:42:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGxfReJCI/XCEH4O7XusfGfqXVdzxqaQlKHhJPKiYCNX5XuT8XDVvJLiiYze71BpcILkfLg X-Received: by 2002:a17:906:100b:b0:9b2:fa55:5794 with SMTP id 11-20020a170906100b00b009b2fa555794mr2334773ejm.58.1696423330310; Wed, 04 Oct 2023 05:42:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696423330; cv=none; d=google.com; s=arc-20160816; b=wbYMFV4w7Qx6ucuK2OEp4Rd5XJCzfhi6sdtUQW+RDTccYg4/9uORc4bp+jWMNHAQVi kQPrtqHYg2IOo6MQH/RZVl642ApU1c7G3xQXjHyH6WmKivm4HvyDvnRmOdYSYq9yfWWJ HD54LtL5m8YbWisspkA5SLQwrrIe8LREXhmdgrbLjlzh2D9dF4+gUED6xe3ItQw2iqRq JIEwF7Wpg3Z5jNZ/RXNb/QH5rz9I6lK24YOm6Pn/58HOvcAiGFjZs/xH/atLdbGBag7O AiKp5NkaS9MVm97DrU9+KxQ7LuAd5j7m0b+V2/o3HB2R7htz8sqfoVN0C23b4CQbV1yJ IgXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:dmarc-filter:delivered-to; bh=eOOIXiwpAncH0vOqxWOxvilbUq7A4ls6d5uecSGpzNY=; fh=CEeJ7+WMWhXQXVFKL0VPjjag+HM5tElSwmAChuvqRbA=; b=NDfXaJFhGa4IzCHmS2YOvZgm4PVe3HYmR8NA4pZslg+K3cJel7ANCZwHlHGXtPkAvm 5Cu8/upO2A/7nEThiXNOLYmqE/4GsQ+krbUwZpLWCI+zzUX4Ocu391qs+wRI73bf7trS MVi7jn1tqPW405p2kWl0XU11ts1Dj/cS3wk1Jhs9TK0pWsng418j0Kb+Fw/1tyrpcsol Rqz5UYB9GWzptKIBh9vEkV7EnfCXWpIrY/c+welBQiWYv5ObWAk1ylDHgZORaS1vZpJM B68GQLIO2PVO/Q5iG5dOptp/fsCYAnzEUW6L1PX6m0M9nscLflUjkqQuQVzcb97eh0lv iwSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kolabnow.com header.s=dkim20160331 header.b=vJ7Lg0iF; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id lg14-20020a170906f88e00b009aa04af1546si1618557ejb.1026.2023.10.04.05.42.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 05:42:10 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@kolabnow.com header.s=dkim20160331 header.b=vJ7Lg0iF; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2D4023831E00 for ; Wed, 4 Oct 2023 12:40:53 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx.kolabnow.com (mx.kolabnow.com [212.103.80.155]) by sourceware.org (Postfix) with ESMTPS id A18EC385703A for ; Wed, 4 Oct 2023 12:40:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A18EC385703A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=lambda.is Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=lambda.is Received: from localhost (unknown [127.0.0.1]) by mx.kolabnow.com (Postfix) with ESMTP id CE77B20AB2D7; Wed, 4 Oct 2023 14:40:27 +0200 (CEST) Authentication-Results: ext-mx-out011.mykolab.com (amavis); dkim=pass (4096-bit key) reason="pass (just generated, assumed good)" header.d=kolabnow.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-transfer-encoding:content-type:content-type:mime-version :references:in-reply-to:message-id:date:date:subject:subject :from:from:received:received:received; s=dkim20160331; t= 1696423227; x=1698237628; bh=eOOIXiwpAncH0vOqxWOxvilbUq7A4ls6d5u ecSGpzNY=; b=vJ7Lg0iFpFQWKUftV7FqJ4cfh+hGaMNVSdVWyc17xO4e2lLj4O9 GnCobPCSpnK4+7QQ2Ka0JNil4erTSae/d6GIEwW0XF+BEtjAi57OMwRRhjxo3jqH IZC/NFf824MzgDREJzmUn+dzP9XDIrd9pdQq1qMaNmJQlvMSsWTPqv3Bt9XBjd4V xUhTWRKYd+ipRrVGwUFeHXuYugp8qia9Jsjh+89nxlMIZ2xSnrEa2BwCDyU6VaLr /35ByhGr2zvrWuuJYJYUSt7wpcdWHNHxQA3scqgYomDSDR7iIQdtHp5TJLniOxpg 0ugsCV1qHaXs/qVgfOB2zfIi+vYGrJWPmYgFcX75Ir3EnMI2RrCOaU0KTRsj/05/ yRkD40CyLDXhBIoaQQM5XG2xuGi78iagX54bs8wuOATAU9Z5Bm53gf6/p1YqX7GH PjQXI3PYSJUUWiWguiEfreT7u8xSUXMWNgjJIbh44FRNTGBVuSDeyhHNIsEJmJzF bZD1tD0yvcA++n3magQ3IX3o98/rOxXpOqLIooSPQ8AZa9hrsiGcYpIYoOFmawYN yu5toOF2S6LOVm9eyRizDHPEpevVuKh30hJYlxPtLWqPZtX+nZgjNFpbYjEHDdlS iBT38KFpOAekB4WkKbty1F3lAn7uz41BmC7Ex1naIXMQ3oNwz57g4Zk8= X-Virus-Scanned: amavis at mykolab.com X-Spam-Score: -1 X-Spam-Level: X-Spam-Status: No, score=-8.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, SPAM_BODY, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out011.mykolab.com [127.0.0.1]) (amavis, port 10024) with ESMTP id SDiCqkg7vRc6; Wed, 4 Oct 2023 14:40:27 +0200 (CEST) Received: from int-mx009.mykolab.com (unknown [10.9.13.9]) by mx.kolabnow.com (Postfix) with ESMTPS id 1D3DC20B3679; Wed, 4 Oct 2023 14:40:27 +0200 (CEST) Received: from ext-subm010.mykolab.com (unknown [10.9.6.10]) by int-mx009.mykolab.com (Postfix) with ESMTPS id 0389E20D6AE9; Wed, 4 Oct 2023 14:40:27 +0200 (CEST) From: =?utf-8?q?J=C3=B8rgen_Kvalsvik?= To: gcc-patches@gcc.gnu.org Cc: mliska@suse.cz, jh@suse.cz, =?utf-8?q?J=C3=B8rgen_Kvalsvik?= Subject: [PATCH 03/22] Mention relevant flags in condition coverage docs Date: Wed, 4 Oct 2023 21:39:03 +0900 Message-Id: <20231004123921.634024-4-j@lambda.is> In-Reply-To: <20231004123921.634024-1-j@lambda.is> References: <20231004123921.634024-1-j@lambda.is> MIME-Version: 1.0 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778828789630332253 X-GMAIL-MSGID: 1778828789630332253 From: Jørgen Kvalsvik --- gcc/doc/gcov.texi | 3 ++- gcc/doc/invoke.texi | 14 ++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/gcc/doc/gcov.texi b/gcc/doc/gcov.texi index 10cfdcf24aa..f6db593a62a 100644 --- a/gcc/doc/gcov.texi +++ b/gcc/doc/gcov.texi @@ -175,7 +175,8 @@ the percentage of branches taken. Write condition coverage to the output file, and write condition summary info to the standard output. This option allows you to see if the conditions in your program at least once had an independent effect on the outcome of the -boolean expression (modified condition/decision coverage). +boolean expression (modified condition/decision coverage). This requires you +to compile the source with @option{-fprofile-conditions}. @item -d @itemx --display-progress diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 21419b9a442..fbe6fa5c825 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -6478,9 +6478,10 @@ Completely disabling the warning is not recommended. @opindex Wno-coverage-too-many-conditions @opindex Wcoverage-too-many-conditions @item -Wno-coverage-too-many-conditions -Warn in case a condition have too many terms and GCC gives up coverage. -Coverage is given up when there are more terms in the conditional than there -are bits in a @code{gcov_type_unsigned}. This warning is enabled by default. +Warn if @option{-fprofile-conditions} is used and an expression have too many +terms and GCC gives up coverage. Coverage is given up when there are more +terms in the conditional than there are bits in a @code{gcov_type_unsigned}. +This warning is enabled by default. @opindex Wno-coverage-invalid-line-number @opindex Wcoverage-invalid-line-number @@ -16638,9 +16639,10 @@ E.g. @code{gcc a.c b.c -o binary} would generate @file{binary-a.gcda} and @item -fprofile-conditions @opindex fprofile-conditions Add code so that program conditions are instrumented. During execution the -program records what terms in a conditional contributes to a decision. The -data may be used to verify that all terms in a booleans are tested and have an -effect on the outcome of a condition. +program records what terms in a conditional contributes to a decision, which +can be used to verify that all terms in a booleans are tested and have an +independent effect on the outcome of a decision. The result can be read with +@code{gcov --conditions}. @xref{Cross-profiling}.