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/80223] RFE: Exclude functions from profile instrumentation
Date: Wed, 23 Jun 2021 20:09:04 +0000	[thread overview]
Message-ID: <bug-80223-4-7Lfp46Nt15@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-80223-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223

--- Comment #21 from Fangrui Song <i at maskray dot me> ---
(In reply to Fangrui Song from comment #20)
> For example, if an inlining pass happens after instrumentation, then the
> function attribute doesn't necessarily need to suppress inlining. After
> instrumentation is done, we can even treat the noprofile attribute as a
> no-op.

Sent too early:)

Amendment: a smart inliner can inline the noprofile callee and then drop
instrumentation code. That will also be an approach which does not break the
"no instrumenting my code" contract. Other approaches can be (probably more
relevant to function specialization/clones): the instrumentation pass can leave
an un-instrumented copy which can be used by a subsequent inliner.

As we can see, all these approaches are much more complex than simply
"suppressing inlining". So I agree that "suppressing inlining" is a good
implementation detail here.

  parent reply	other threads:[~2021-06-23 20:09 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-80223-4@http.gcc.gnu.org/bugzilla/>
2021-06-14 20:46 ` ndesaulniers at google dot com
2021-06-14 21:22 ` i at maskray dot me
2021-06-15 19:04 ` i at maskray dot me
2021-06-17 18:16 ` ndesaulniers at google dot com
2021-06-18 23:42 ` ndesaulniers at google dot com
2021-06-21  8:37 ` marxin at gcc dot gnu.org
2021-06-21 17:41 ` ndesaulniers at google dot com
2021-06-21 18:45 ` marxin at gcc dot gnu.org
2021-06-21 18:51 ` i at maskray dot me
2021-06-21 19:11 ` ndesaulniers at google dot com
2021-06-22 18:56 ` ndesaulniers at google dot com
2021-06-23 11:55 ` marxin at gcc dot gnu.org
2021-06-23 17:07 ` i at maskray dot me
2021-06-23 19:09 ` elver at google dot com
2021-06-23 19:51 ` i at maskray dot me
2021-06-23 20:09 ` i at maskray dot me [this message]
2021-06-24  7:28 ` marxin at gcc dot gnu.org
2021-06-24 19:20 ` ndesaulniers at google dot com
2021-09-07  9:48 ` cvs-commit at gcc dot gnu.org
2021-09-07  9:49 ` 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-80223-4-7Lfp46Nt15@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).