From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 769 invoked by alias); 1 Aug 2007 21:26:35 -0000 Received: (qmail 757 invoked by uid 22791); 1 Aug 2007 21:26:33 -0000 X-Spam-Check-By: sourceware.org Received: from wa-out-1112.google.com (HELO wa-out-1112.google.com) (209.85.146.178) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 01 Aug 2007 21:26:28 +0000 Received: by wa-out-1112.google.com with SMTP id m16so311315waf for ; Wed, 01 Aug 2007 14:26:26 -0700 (PDT) Received: by 10.114.195.19 with SMTP id s19mr1127250waf.1186003586054; Wed, 01 Aug 2007 14:26:26 -0700 (PDT) Received: by 10.114.203.9 with HTTP; Wed, 1 Aug 2007 14:26:26 -0700 (PDT) Message-ID: Date: Wed, 01 Aug 2007 21:26:00 -0000 From: "Andrew Pinski" To: "Ian Lance Taylor" Subject: Re: PATCH RFC: More control over which functions are instrumented Cc: gcc-patches@gcc.gnu.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2007-08/txt/msg00081.txt.bz2 On 01 Aug 2007 13:21:25 -0700, Ian Lance Taylor 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