From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1382 invoked by alias); 7 Aug 2007 23:48:01 -0000 Received: (qmail 1259 invoked by uid 22791); 7 Aug 2007 23:48:00 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 07 Aug 2007 23:47:58 +0000 Received: from zps75.corp.google.com (zps75.corp.google.com [172.25.146.75]) by smtp-out.google.com with ESMTP id l77Nlr4X019534 for ; Wed, 8 Aug 2007 00:47:53 +0100 Received: from localhost.localdomain.google.com (dhcp-172-18-116-220.corp.google.com [172.18.116.220]) (authenticated bits=0) by zps75.corp.google.com with ESMTP id l77Nlf7M001924 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Tue, 7 Aug 2007 16:47:42 -0700 To: gcc-patches@gcc.gnu.org Subject: Re: PATCH RFC: More control over which functions are instrumented References: From: Ian Lance Taylor Date: Tue, 07 Aug 2007 23:48:00 -0000 In-Reply-To: Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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/msg00474.txt.bz2 Ian Lance Taylor writes: > This patch was developed a while back by Yaz Saito at Google. It adds > two new options: -finstrument-functions-exclude-file-list and > -finstrument-functions-exclude-function-list which give more control > over which functions are instrumented. I have committed this patch. I also added some simple test cases, as follows. Ian 2007-08-07 Ian Lance Taylor * gcc.dg/instrument-1.c: New test. * gcc.dg/instrument-2.c: New test. * gcc.dg/instrument-3.c: New test. instrument-1.c: /* { dg-do compile } */ /* { dg-options "-finstrument-functions" } */ void fn () { } /* { dg-final { scan-assembler "__cyg_profile_func_enter" } } */ /* { dg-final { scan-assembler "__cyg_profile_func_exit" } } */ instrument-2.c: /* { dg-do compile } */ /* { dg-options "-finstrument-functions -finstrument-functions-exclude-function-list=fn" } */ void fn () { } /* { dg-final { scan-assembler-not "__cyg_profile_func_enter" } } */ /* { dg-final { scan-assembler-not "__cyg_profile_func_exit" } } */ instrument-3.c: /* { dg-do compile } */ /* { dg-options "-finstrument-functions -finstrument-functions-exclude-file-list=instrument-3" } */ void fn () { } /* { dg-final { scan-assembler-not "__cyg_profile_func_enter" } } */ /* { dg-final { scan-assembler-not "__cyg_profile_func_exit" } } */