public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug gcov-profile/94636] New: gcov should and could output overall coverage. This is just a 2 code lines change.
@ 2020-04-17 11:35 okannen at gmail dot com
2020-04-17 15:18 ` [Bug gcov-profile/94636] " marxin at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: okannen at gmail dot com @ 2020-04-17 11:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94636
Bug ID: 94636
Summary: gcov should and could output overall coverage. This
is just a 2 code lines change.
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Keywords: easyhack
Severity: normal
Priority: P3
Component: gcov-profile
Assignee: unassigned at gcc dot gnu.org
Reporter: okannen at gmail dot com
CC: marxin at gcc dot gnu.org
Target Milestone: ---
Created attachment 48301
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48301&action=edit
Patch to output overall coverage
Gcov could output the computed overall code coverage when processing multiple
file. This overall coverage is often all what is needed in CI reports.
It think this is just a 2 lines change.
diff --git a/gcc/gcov.c b/gcc/gcov.c
index a291bac3e9e..c16895e640a 100644
--- a/gcc/gcov.c
+++ b/gcc/gcov.c
@@ -1510,7 +1510,8 @@ generate_results (const char *file_name)
}
}
- if (!file_name)
+ if (file_name)
+ fnotice(stdout,"Overall:\n");
executed_summary (total_lines, total_executed);
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug gcov-profile/94636] gcov should and could output overall coverage. This is just a 2 code lines change.
2020-04-17 11:35 [Bug gcov-profile/94636] New: gcov should and could output overall coverage. This is just a 2 code lines change okannen at gmail dot com
@ 2020-04-17 15:18 ` marxin at gcc dot gnu.org
2020-05-05 14:05 ` cvs-commit at gcc dot gnu.org
2020-05-05 14:05 ` marxin at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-04-17 15:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94636
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|easyhack |
Target Milestone|--- |11.0
Last reconfirmed| |2020-04-17
Assignee|unassigned at gcc dot gnu.org |marxin at gcc dot gnu.org
Status|UNCONFIRMED |ASSIGNED
Ever confirmed|0 |1
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Thank you for the report. The code in generate_results is bad as file_name
can't be NULL. I'm testing more complex patch which will land in GCC 11 (next
stage 1).
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug gcov-profile/94636] gcov should and could output overall coverage. This is just a 2 code lines change.
2020-04-17 11:35 [Bug gcov-profile/94636] New: gcov should and could output overall coverage. This is just a 2 code lines change okannen at gmail dot com
2020-04-17 15:18 ` [Bug gcov-profile/94636] " marxin at gcc dot gnu.org
@ 2020-05-05 14:05 ` cvs-commit at gcc dot gnu.org
2020-05-05 14:05 ` marxin at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-05-05 14:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94636
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Liska <marxin@gcc.gnu.org>:
https://gcc.gnu.org/g:ab37baa60ef287c0f5ba9eaa067aa3192b9fb37e
commit r11-79-gab37baa60ef287c0f5ba9eaa067aa3192b9fb37e
Author: Martin Liska <mliska@suse.cz>
Date: Fri Apr 17 17:19:12 2020 +0200
gcov: print total_lines summary for all files.
gcc/ChangeLog:
2020-04-17 Martin Liska <mliska@suse.cz>
PR gcov-profile/94636
* gcov.c (main): Print total lines summary at the end.
(generate_results): Expect file_name always being non-null.
Print newline after intermediate file is printed in order to align
with
what we do for normal files.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug gcov-profile/94636] gcov should and could output overall coverage. This is just a 2 code lines change.
2020-04-17 11:35 [Bug gcov-profile/94636] New: gcov should and could output overall coverage. This is just a 2 code lines change okannen at gmail dot com
2020-04-17 15:18 ` [Bug gcov-profile/94636] " marxin at gcc dot gnu.org
2020-05-05 14:05 ` cvs-commit at gcc dot gnu.org
@ 2020-05-05 14:05 ` marxin at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-05-05 14:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94636
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
Fixed on master.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-05-05 14:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-17 11:35 [Bug gcov-profile/94636] New: gcov should and could output overall coverage. This is just a 2 code lines change okannen at gmail dot com
2020-04-17 15:18 ` [Bug gcov-profile/94636] " marxin at gcc dot gnu.org
2020-05-05 14:05 ` cvs-commit at gcc dot gnu.org
2020-05-05 14:05 ` marxin at gcc dot gnu.org
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).