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

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