From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13450 invoked by alias); 14 Jan 2014 20:42:16 -0000 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 Received: (qmail 13439 invoked by uid 89); 14 Jan 2014 20:42:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: e37.co.us.ibm.com Received: from e37.co.us.ibm.com (HELO e37.co.us.ibm.com) (32.97.110.158) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 14 Jan 2014 20:42:15 +0000 Received: from /spool/local by e37.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 14 Jan 2014 13:42:13 -0700 Received: from d03dlp03.boulder.ibm.com (9.17.202.179) by e37.co.us.ibm.com (192.168.1.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 14 Jan 2014 13:42:11 -0700 Received: from b03cxnp08027.gho.boulder.ibm.com (b03cxnp08027.gho.boulder.ibm.com [9.17.130.19]) by d03dlp03.boulder.ibm.com (Postfix) with ESMTP id 0BDC719D803E for ; Tue, 14 Jan 2014 13:42:02 -0700 (MST) Received: from d03av05.boulder.ibm.com (d03av05.boulder.ibm.com [9.17.195.85]) by b03cxnp08027.gho.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s0EKfxOL5177760 for ; Tue, 14 Jan 2014 21:41:59 +0100 Received: from d03av05.boulder.ibm.com (localhost [127.0.0.1]) by d03av05.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s0EKgAsa006412 for ; Tue, 14 Jan 2014 13:42:10 -0700 Received: from pthw510.ibm.com (nh65100.mts.ibm.com [9.50.17.166] (may be forged)) by d03av05.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id s0EKg9Kh006378; Tue, 14 Jan 2014 13:42:10 -0700 Message-ID: <52D5A121.3070506@linux.vnet.ibm.com> Date: Tue, 14 Jan 2014 20:42:00 -0000 From: Pat Haugen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131028 Thunderbird/17.0.10 MIME-Version: 1.0 To: GCC Patches CC: David Edelsohn , Ulrich Weigand Subject: [PATCH, rs6000] Don't emit profile code for procedures marked no_instrument_function Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14011420-7164-0000-0000-0000051E3C7B X-IsSubscribed: yes X-SW-Source: 2014-01/txt/msg00834.txt.bz2 This patch fixes a problem where the attribute no_instrument_function was being ignored and profile code was emitted. Testcase gcc.target/powerpc/ppc64-abi-2.c exposed the issue. Bootstrap/regtest with no new regressions, ok for trunk? -Pat 2014-01-13 Pat Haugen * config/rs6000/rs6000.c (rs6000_output_function_prologue): Check if current procedure should be profiled. Index: config/rs6000/rs6000.c =================================================================== --- config/rs6000/rs6000.c (revision 206602) +++ config/rs6000/rs6000.c (working copy) @@ -23198,7 +23198,7 @@ rs6000_output_function_prologue (FILE *f /* Output -mprofile-kernel code. This needs to be done here instead of in output_function_profile since it must go after the ELFv2 ABI local entry point. */ - if (TARGET_PROFILE_KERNEL) + if (TARGET_PROFILE_KERNEL && crtl->profile) { gcc_assert (DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_ELFv2); gcc_assert (!TARGET_32BIT);