diff mbox

perf: fix arm64 build error

Message ID 1403666205-25346-1-git-send-email-msalter@redhat.com
State Superseded
Headers show

Commit Message

Mark Salter June 25, 2014, 3:16 a.m. UTC
I'm seeing the following build error on arm64:

  In file included from util/event.c:3:0:
  util/event.h:95:17: error: 'PERF_REGS_MAX' undeclared here (not in a function)
    u64 cache_regs[PERF_REGS_MAX];
                 ^

This patch adds a PEFF_REGS_MAX definition for arm64.

Signed-off-by: Mark Salter <msalter@redhat.com>
---
 tools/perf/arch/arm64/include/perf_regs.h | 2 ++
 1 file changed, 2 insertions(+)

Comments

Jean Pihet June 25, 2014, 8:12 a.m. UTC | #1
Hi Mark,

On 25 June 2014 05:16, Mark Salter <msalter@redhat.com> wrote:
> I'm seeing the following build error on arm64:
>
>   In file included from util/event.c:3:0:
>   util/event.h:95:17: error: 'PERF_REGS_MAX' undeclared here (not in a function)
>     u64 cache_regs[PERF_REGS_MAX];
>                  ^
>
> This patch adds a PEFF_REGS_MAX definition for arm64.
s/PEFF_REGS_MAX/PERF_REGS_MAX

>
> Signed-off-by: Mark Salter <msalter@redhat.com>

Acked-by: Jean Pihet <jean.pihet@linaro.org>

Thanks!

Note: Do you have any performance figure with and without the caching
code in perf?

Jean

> ---
>  tools/perf/arch/arm64/include/perf_regs.h | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/tools/perf/arch/arm64/include/perf_regs.h b/tools/perf/arch/arm64/include/perf_regs.h
> index e9441b9..1d3f39c 100644
> --- a/tools/perf/arch/arm64/include/perf_regs.h
> +++ b/tools/perf/arch/arm64/include/perf_regs.h
> @@ -6,6 +6,8 @@
>  #include <asm/perf_regs.h>
>
>  #define PERF_REGS_MASK ((1ULL << PERF_REG_ARM64_MAX) - 1)
> +#define PERF_REGS_MAX  PERF_REG_ARM64_MAX
> +
>  #define PERF_REG_IP    PERF_REG_ARM64_PC
>  #define PERF_REG_SP    PERF_REG_ARM64_SP
>
> --
> 1.9.0
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Mark Salter June 25, 2014, 2:13 p.m. UTC | #2
On Wed, 2014-06-25 at 10:12 +0200, Jean Pihet wrote:
> Hi Mark,
> 
> On 25 June 2014 05:16, Mark Salter <msalter@redhat.com> wrote:
> > I'm seeing the following build error on arm64:
> >
> >   In file included from util/event.c:3:0:
> >   util/event.h:95:17: error: 'PERF_REGS_MAX' undeclared here (not in a function)
> >     u64 cache_regs[PERF_REGS_MAX];
> >                  ^
> >
> > This patch adds a PEFF_REGS_MAX definition for arm64.
> s/PEFF_REGS_MAX/PERF_REGS_MAX
> 
> >
> > Signed-off-by: Mark Salter <msalter@redhat.com>
> 
> Acked-by: Jean Pihet <jean.pihet@linaro.org>
> 
> Thanks!
> 
> Note: Do you have any performance figure with and without the caching
> code in perf?

Sorry, I don't.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
diff mbox

Patch

diff --git a/tools/perf/arch/arm64/include/perf_regs.h b/tools/perf/arch/arm64/include/perf_regs.h
index e9441b9..1d3f39c 100644
--- a/tools/perf/arch/arm64/include/perf_regs.h
+++ b/tools/perf/arch/arm64/include/perf_regs.h
@@ -6,6 +6,8 @@ 
 #include <asm/perf_regs.h>
 
 #define PERF_REGS_MASK	((1ULL << PERF_REG_ARM64_MAX) - 1)
+#define PERF_REGS_MAX	PERF_REG_ARM64_MAX
+
 #define PERF_REG_IP	PERF_REG_ARM64_PC
 #define PERF_REG_SP	PERF_REG_ARM64_SP