From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13647 invoked by alias); 27 Aug 2013 07:35:27 -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 13637 invoked by uid 89); 27 Aug 2013 07:35:26 -0000 Received: from mail-vb0-f41.google.com (HELO mail-vb0-f41.google.com) (209.85.212.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 27 Aug 2013 07:35:26 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM,KHOP_THREADED,NO_RELAYS autolearn=ham version=3.3.2 X-HELO: mail-vb0-f41.google.com Received: by mail-vb0-f41.google.com with SMTP id g17so2811500vbg.14 for ; Tue, 27 Aug 2013 00:35:24 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.58.198.13 with SMTP id iy13mr18977660vec.11.1377588924011; Tue, 27 Aug 2013 00:35:24 -0700 (PDT) Received: by 10.52.97.74 with HTTP; Tue, 27 Aug 2013 00:35:23 -0700 (PDT) In-Reply-To: References: Date: Tue, 27 Aug 2013 07:46:00 -0000 Message-ID: Subject: Re: [RFC Patch, Aarch64] : Macros for profile code generation to enable gprof support From: Marcus Shawcroft To: Venkataramanan Kumar Cc: "gcc-patches@gcc.gnu.org" Content-Type: text/plain; charset=ISO-8859-1 X-SW-Source: 2013-08/txt/msg01557.txt.bz2 Hi Venkat, On 3 August 2013 19:01, Venkataramanan Kumar wrote: > This patch adds macros to support gprof in Aarch64. The difference > from the previous patch is that the compiler, while generating > "mcount" routine for an instrumented function, also passes the return > address as argument. > > The "mcount" routine in glibc will be modified as follows. > > (-----Snip-----) > #define MCOUNT \ > -void __mcount (void) \ > +void __mcount (void* frompc) > \ > { \ > - mcount_internal ((u_long) RETURN_ADDRESS (1), (u_long) RETURN_ADDRESS (0)); \ > + mcount_internal ((u_long) frompc, (u_long) RETURN_ADDRESS (0)); \ > } > (-----Snip-----) > If this is Ok I will send the patch to glibc as well. > 2013-08-02 Venkataramanan Kumar > > * config/aarch64/aarch64.h (MCOUNT_NAME): Define. > (NO_PROFILE_COUNTERS): Likewise. > (PROFILE_HOOK): Likewise. > (FUNCTION_PROFILER): Likewise. > * config/aarch64/aarch64.c (aarch64_function_profiler): Remove. > . > > regards, > Venkat. + emit_library_call (fun, LCT_NORMAL, VOIDmode, 1,lr,Pmode); \ +} GNU coding style requires spaces after the commas, but otherwise I have no further comments on this patch. Post the glibc patch please. Thanks /Marcus