On 9 May 2013 07:48, Venkataramanan Kumar
<venkataramanan.ku...@linaro.org> wrote:
> Hi Maintainers,
>
> The attach patch contains the following for aarch64 backend to enable
> gprof support.
>
> 1. Changes to "aarch64_return_addr" to get return address from a stack frame.
> 2. Defines macros associated with generating code for profiling.

Hi Venkat,
Can we split this into separate patches for 1) and 2) please.

General comment, GNU coding style places two space after each period,
please update each of the comments that don't conform.

+
+/* All the work done in PROFILE_HOOK, but still required. */
+#define FUNCTION_PROFILER(FILE, LABELNO) do { } while (0)
+

Please don't move the location of FUNCTION_PROFILER, just change its definition.


+/* Implement RETURN_ADDR_RTX.  As per Aarch64 ABI return address
+   is stored at an offset 8 from the frame pointer of a function. */

Aarch64 -> AArch64

Comma after ABI ?

Specify 'bytes' after the 8.

+  if(count != 0)
+    {

GNU coding style places a space before the '('.

+ mem_lr =  gen_frame_mem (DImode,

Double space after "=" -> single space.

-    # We don't yet support profiling for AArch64.
-    if { [istarget aarch64*-*-*]
- && ([lindex $test_what 1] == "-p"
-     || [lindex $test_what 1] == "-pg") } {
- return 0
+    # We support profiling for AArch64 linux target.
+    if { [istarget aarch64*-linux-*]
+ && ($test_what == "-p" || $test_what == "-pg") } {
+ return 1
     }

Can't this clause be removed completely now ?

Cheers
/Marcus

Reply via email to