aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc/gcov.texi
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2017-10-31 12:57:43 +0100
committerMartin Liska <marxin@gcc.gnu.org>2017-10-31 11:57:43 +0000
commitcdb07de7c67cf0d04607ee8e85a659d8bf7594f6 (patch)
tree2834b8b25186936729ec0a78931fe0cb902c62a0 /gcc/doc/gcov.texi
parent28f4a4a85f3b95f7ccf7585eaa5cbd50cbe1677d (diff)
downloadgcc-cdb07de7c67cf0d04607ee8e85a659d8bf7594f6.zip
gcc-cdb07de7c67cf0d04607ee8e85a659d8bf7594f6.tar.gz
gcc-cdb07de7c67cf0d04607ee8e85a659d8bf7594f6.tar.bz2
GCOV: add support for lines with an unexecuted lines.
2017-10-31 Martin Liska <mliska@suse.cz> * doc/gcov.texi: Document that. * gcov.c (add_line_counts): Mark lines with a non-executed statement. (output_line_beginning): Handle such lines. (output_lines): Pass new argument. (output_intermediate_file): Print it in intermediate format. 2017-10-31 Martin Liska <mliska@suse.cz> * g++.dg/gcov/ternary.C: New test. * g++.dg/gcov/gcov-threads-1.C (main): Update expected line count. * lib/gcov.exp: Support new format for intermediate file format. From-SVN: r254259
Diffstat (limited to 'gcc/doc/gcov.texi')
-rw-r--r--gcc/doc/gcov.texi13
1 files changed, 8 insertions, 5 deletions
diff --git a/gcc/doc/gcov.texi b/gcc/doc/gcov.texi
index 9abc603..e186ac6 100644
--- a/gcc/doc/gcov.texi
+++ b/gcc/doc/gcov.texi
@@ -189,7 +189,7 @@ one entry per line
@smallexample
file:@var{source_file_name}
function:@var{line_number},@var{execution_count},@var{function_name}
-lcount:@var{line number},@var{execution_count}
+lcount:@var{line number},@var{execution_count},@var{has_unexecuted_block}
branch:@var{line_number},@var{branch_coverage_type}
Where the @var{branch_coverage_type} is
@@ -208,11 +208,11 @@ Here is a sample when @option{-i} is used in conjunction with @option{-b} option
file:array.cc
function:11,1,_Z3sumRKSt6vectorIPiSaIS0_EE
function:22,1,main
-lcount:11,1
-lcount:12,1
-lcount:14,1
+lcount:11,1,0
+lcount:12,1,0
+lcount:14,1,0
branch:14,taken
-lcount:26,1
+lcount:26,1,0
branch:28,nottaken
@end smallexample
@@ -336,6 +336,9 @@ non-exceptional paths or only exceptional paths such as C++ exception
handlers, respectively. Given @samp{-a} option, unexecuted blocks are
marked @samp{$$$$$} or @samp{%%%%%}, depending on whether a basic block
is reachable via non-exceptional or exceptional paths.
+Executed basic blocks having a statement with zero @var{execution_count}
+end with @samp{*} character and are colored with magenta color with @option{-k}
+option.
Note that GCC can completely remove the bodies of functions that are
not needed -- for instance if they are inlined everywhere. Such functions