[PATCH 1/1] tools/perf: add missing include debug.h for arm/arm64

From: Fathi Boudra
Date: Mon Sep 22 2014 - 22:14:35 EST


Fix perf build failure on arm/arm64 architectures introduced by
commit 84f5d36f4 (move pr_* debug macros into debug object):

arch/arm/util/unwind-libunwind.c: In function 'libunwind__arch_reg_id':
arch/arm/util/unwind-libunwind.c:43:3: error: implicit declaration
of function 'pr_err' [-Werror=implicit-function-declaration]
pr_err("unwind: invalid reg id %d\n", regnum);
^
arch/arm/util/unwind-libunwind.c:43:3: error: nested extern declaration
of 'pr_err' [-Werror=nested-externs]
cc1: all warnings being treated as errors
make[2]: *** [arch/arm/util/unwind-libunwind.o] Error 1
arch/arm/tests/dwarf-unwind.c: In function 'sample_ustack':
arch/arm/tests/dwarf-unwind.c:20:3: error: implicit declaration
of function 'pr_debug' [-Werror=implicit-function-declaration]
pr_debug("failed to allocate sample uregs data\n");
^
arch/arm/tests/dwarf-unwind.c:20:3: error: nested extern declaration
of 'pr_debug' [-Werror=nested-externs]
cc1: all warnings being treated as errors
make[2]: *** [arch/arm/tests/dwarf-unwind.o] Error 1

Signed-off-by: Fathi Boudra <fathi.boudra@xxxxxxxxxx>
---
tools/perf/arch/arm/tests/dwarf-unwind.c | 1 +
tools/perf/arch/arm/util/unwind-libunwind.c | 1 +
tools/perf/arch/arm64/util/unwind-libunwind.c | 1 +
3 files changed, 3 insertions(+)

diff --git a/tools/perf/arch/arm/tests/dwarf-unwind.c b/tools/perf/arch/arm/tests/dwarf-unwind.c
index 9f870d2..62eff84 100644
--- a/tools/perf/arch/arm/tests/dwarf-unwind.c
+++ b/tools/perf/arch/arm/tests/dwarf-unwind.c
@@ -3,6 +3,7 @@
#include "thread.h"
#include "map.h"
#include "event.h"
+#include "debug.h"
#include "tests/tests.h"

#define STACK_SIZE 8192
diff --git a/tools/perf/arch/arm/util/unwind-libunwind.c b/tools/perf/arch/arm/util/unwind-libunwind.c
index 729ed69..62c397e 100644
--- a/tools/perf/arch/arm/util/unwind-libunwind.c
+++ b/tools/perf/arch/arm/util/unwind-libunwind.c
@@ -3,6 +3,7 @@
#include <libunwind.h>
#include "perf_regs.h"
#include "../../util/unwind.h"
+#include "../../util/debug.h"

int libunwind__arch_reg_id(int regnum)
{
diff --git a/tools/perf/arch/arm64/util/unwind-libunwind.c b/tools/perf/arch/arm64/util/unwind-libunwind.c
index 436ee43..a87afa9 100644
--- a/tools/perf/arch/arm64/util/unwind-libunwind.c
+++ b/tools/perf/arch/arm64/util/unwind-libunwind.c
@@ -3,6 +3,7 @@
#include <libunwind.h>
#include "perf_regs.h"
#include "../../util/unwind.h"
+#include "../../util/debug.h"

int libunwind__arch_reg_id(int regnum)
{
--
2.1.0

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