This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH RFC: More control over which functions are instrumented


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.

Note I was not the first who thought of going this route and it was
requested in bug number 28205 (and I also got a request for that way
of doing instrumentation from a private bug report inside Sony).

Thanks,
Andrew Pinski


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]