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: [RFC Patch, Aarch64] : Macros for profile code generation to enable gprof support


Hi Marcus,

I have re-based the patch and tested for aarch64-none-elf with no regressions.
Also for aarch64-unknown-linux-gnu the following test cases passes.

Before:
--------
UNSUPPORTED: gcc.dg/nested-func-4.c
UNSUPPORTED: gcc.dg/pr43643.c:
UNSUPPORTED: gcc.dg/nest.c
UNSUPPORTED: gcc.dg/20021014-1.c
UNSUPPORTED: gcc.dg/pr32450.c
UNSUPPORTED: g++.dg/other/profile1.C -std=gnu++98
UNSUPPORTED: g++.dg/other/profile1.C -std=gnu++11

After:
-------
PASS: gcc.dg/nested-func-4.c (test for excess errors)
PASS: gcc.dg/nested-func-4.c execution test
PASS: gcc.dg/pr43643.c (test for excess errors)
PASS: gcc.dg/pr43643.c execution test
PASS: gcc.dg/nest.c (test for excess errors)
PASS: gcc.dg/nest.c execution test
PASS: gcc.dg/20021014-1.c (test for excess errors)
PASS: gcc.dg/20021014-1.c execution test
PASS: gcc.dg/pr32450.c (test for excess errors)
PASS: gcc.dg/pr32450.c execution test
PASS: g++.dg/other/profile1.C -std=gnu++98 (test for excess errors)
PASS: g++.dg/other/profile1.C -std=gnu++98 execution test
PASS: g++.dg/other/profile1.C -std=gnu++11 (test for excess errors)
PASS: g++.dg/other/profile1.C -std=gnu++11 execution test

Please let me know if I can commit it to trunk, given that glibc
patches are upstreamed.

2013-10-28  Venkataramanan Kumar  <venkataramanan.kumar@linaro.org>

       * 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.

On 27 August 2013 13:05, Marcus Shawcroft <marcus.shawcroft@gmail.com> wrote:
> Hi Venkat,
>
> On 3 August 2013 19:01, Venkataramanan Kumar
> <venkataramanan.kumar@linaro.org> 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  <venkataramanan.kumar@linaro.org>
>>
>>          * 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

Attachment: gcc.gprof.txt
Description: Text document


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