From: Ian Lance Taylor <iant@google.com>
To: "Andrew Pinski" <pinskia@gmail.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: PATCH RFC: More control over which functions are instrumented
Date: Wed, 01 Aug 2007 21:51:00 -0000 [thread overview]
Message-ID: <m3k5sfgc2b.fsf@localhost.localdomain> (raw)
In-Reply-To: <de8d50360708011426n208a401cqbbe3f076d93614c5@mail.gmail.com>
"Andrew Pinski" <pinskia@gmail.com> writes:
> On 01 Aug 2007 13:21:25 -0700, Ian Lance Taylor <iant@google.com> wrote:
> > We've had a -finstrument-functions option for a while, which inserts
> > calls to __cyg_profile_func_enter and __cyg_profile_func_exit at the
> > start and end of each function. This can be handy, but it is rather
> > less handy in practice with C++. The issue is simply that there are a
> > bunch of inline functions which it is uninteresting to instrument, and
> > these functions come from standard headers so you can't really avoid
> > compiling them with -finstrument-functions.
>
> I rather have instrumentation done differently than it is now instead
> of these options. Just have an option to turn off instrumentation for
> functions that get inlined (so the instrumentation happens after
> inlining). These options help but you still have to maintain a list
> of functions which can get hard to maintain unlike instrumenting after
> inlining.
-finstrument-functions-exclude-function-list is there because it seems
odd to not have it, but the more commonly used option will be
-finstrument-functions-exclude-file-list. Note that files are matched
as substrings, so you can say
-finstrument-functions-exclude-file-list=include/c++ to exclude any
function defined in a file in ...include/c++...
Turning off instrumentation for functions which are inlined is useful
but it is not the same. It is reasonable to actually want
instrumentation for inlined functions that you wrote in an optimized
build.
That is, I see the ideas as independent; I don't see why one should
block the other.
Ian
next prev parent reply other threads:[~2007-08-01 21:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-01 20:22 Ian Lance Taylor
2007-08-01 21:26 ` Andrew Pinski
2007-08-01 21:51 ` Ian Lance Taylor [this message]
2007-08-01 21:59 ` Andrew Pinski
2007-08-07 23:48 ` Ian Lance Taylor
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=m3k5sfgc2b.fsf@localhost.localdomain \
--to=iant@google.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=pinskia@gmail.com \
/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).