public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "okannen at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug gcov-profile/94636] New: gcov should and could output  overall coverage. This is just a 2 code lines change.
Date: Fri, 17 Apr 2020 11:35:25 +0000	[thread overview]
Message-ID: <bug-94636-4@http.gcc.gnu.org/bugzilla/> (raw)

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);
 }

             reply	other threads:[~2020-04-17 11:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-17 11:35 okannen at gmail dot com [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-94636-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).