public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-2166] gcov: fix file and function summary information
@ 2022-08-24 7:30 Martin Liska
0 siblings, 0 replies; only message in thread
From: Martin Liska @ 2022-08-24 7:30 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:42301c02e458cdce646ffaf7ea1df502ab2e8ddc
commit r13-2166-g42301c02e458cdce646ffaf7ea1df502ab2e8ddc
Author: Martin Liska <mliska@suse.cz>
Date: Wed Aug 10 12:51:12 2022 +0200
gcov: fix file and function summary information
gcc/ChangeLog:
* gcov.cc (add_line_counts): Add group functions to coverage
summary.
(accumulate_line_counts): Similarly for files.
Co-Authored-By: Jørgen Kvalsvik <j@lambda.is>
Diff:
---
gcc/gcov.cc | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/gcc/gcov.cc b/gcc/gcov.cc
index 27be5ff0911..9cf1071166f 100644
--- a/gcc/gcov.cc
+++ b/gcc/gcov.cc
@@ -2694,6 +2694,13 @@ add_line_counts (coverage_info *coverage, function_info *fn)
{
gcc_assert (lines[j] - fn->start_line < fn->lines.size ());
line = &(fn->lines[lines[j] - fn->start_line]);
+ if (coverage)
+ {
+ if (!line->exists)
+ coverage->lines++;
+ if (!line->count && block->count)
+ coverage->lines_executed++;
+ }
line->exists = 1;
if (!block->exceptional)
{
@@ -2815,7 +2822,7 @@ accumulate_line_counts (source_info *src)
it2 != fn->lines.end (); it2++)
{
line_info *line = &(*it2);
- accumulate_line_info (line, src, false);
+ accumulate_line_info (line, src, true);
}
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-08-24 7:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-24 7:30 [gcc r13-2166] gcov: fix file and function summary information Martin Liska
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).