public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "i at maskray dot me" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug gcov-profile/85351] [GCOV] Wrong coverage with exit() executed in a if statement within a called function Date: Thu, 17 Sep 2020 04:20:10 +0000 [thread overview] Message-ID: <bug-85351-4-c3bULOzx7Q@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-85351-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85351 Fangrui Song <i at maskray dot me> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |i at maskray dot me --- Comment #5 from Fangrui Song <i at maskray dot me> --- I am a bit curious how GCC instruments such functions which may alter control flows * exit/execve/execl/etc * fork * functions which may throw or call any above functions If you force a split basic block after such functions, you get counts correct but you pay the costs that there is one more basic block and two more arcs. In -fprofile-arcs you need to pay the instrumentation cost of one arc (after taking into account of the Kirchhoff circuit law's spanning tree optimization). If you assume every external function call may alter control flows, you pay rather large overhead for things you probably care little (since I know some underlying mechanism I don't trust line counts after special functions).
next prev parent reply other threads:[~2020-09-17 4:20 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-85351-4@http.gcc.gnu.org/bugzilla/> 2020-03-12 11:58 ` jakub at gcc dot gnu.org 2020-09-17 4:20 ` i at maskray dot me [this message] 2021-05-04 12:24 ` rguenth at gcc dot gnu.org 2021-06-01 8:11 ` rguenth at gcc dot gnu.org 2022-05-27 8:18 ` rguenth 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-85351-4-c3bULOzx7Q@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).