diff mbox series

[03/22] Mention relevant flags in condition coverage docs

Message ID 20231004123921.634024-4-j@lambda.is
State New
Headers show
Series [01/22] Add condition coverage profiling | expand

Commit Message

Jørgen Kvalsvik Oct. 4, 2023, 12:39 p.m. UTC
From: Jørgen Kvalsvik <jorgen.kvalsvik@woven.toyota>

---
 gcc/doc/gcov.texi   |  3 ++-
 gcc/doc/invoke.texi | 14 ++++++++------
 2 files changed, 10 insertions(+), 7 deletions(-)
diff mbox series

Patch

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}.