public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "roland.illig at gmx dot de" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug gcov-profile/96622] gcov misses to count break statement Date: Wed, 19 Aug 2020 06:26:10 +0000 [thread overview] Message-ID: <bug-96622-4-pz7wXdtjQS@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-96622-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96622 --- Comment #3 from Roland Illig <roland.illig at gmx dot de> --- Ah, thanks for the pointer. I thought I had used -O0 in the larger project as well, but I hadn't. Just as a suggestion, would it make sense to apply the coverage at the source code level (before any optimizations) instead of optimizing first and then adding the counters? It would feel more predictable to me. https://gcc.gnu.org/onlinedocs/gcc/Gcov-Intro.html#Gcov-Intro At least for the "discover untested parts of your program", that would make sense to me since in my code, the "break" statement has an effect, independent of any optimization level. https://gcc.gnu.org/onlinedocs/gcc/Invoking-Gcov.html#Invoking-Gcov In this section, the string "tim" occurs often, but only in "number of times", "each time", but not in "measured wall time". Therefore I think gcov is more about counting that about measuring time.
next prev parent reply other threads:[~2020-08-19 6:26 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-08-15 1:15 [Bug gcov-profile/96622] New: " roland.illig at gmx dot de 2020-08-15 2:13 ` [Bug gcov-profile/96622] " roland.illig at gmx dot de 2020-08-17 8:21 ` marxin at gcc dot gnu.org 2020-08-19 6:26 ` roland.illig at gmx dot de [this message] 2020-08-19 10:36 ` 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-96622-4-pz7wXdtjQS@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: linkBe 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).