[tip:perf/urgent] perf ppc64le: Fix build failure when libelf is not present
From: tip-bot for Ravi Bangoria
Date: Tue Aug 16 2016 - 14:16:34 EST
Commit-ID: f046f3df665361d2f89e660f8c79ba164069f02a
Gitweb: http://git.kernel.org/tip/f046f3df665361d2f89e660f8c79ba164069f02a
Author: Ravi Bangoria <ravi.bangoria@xxxxxxxxxxxxxxxxxx>
AuthorDate: Thu, 11 Aug 2016 14:43:59 -0300
Committer: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
CommitDate: Fri, 12 Aug 2016 14:39:48 -0300
perf ppc64le: Fix build failure when libelf is not present
arch__post_process_probe_trace_events() calls get_target_map() to
prepare symbol table. get_target_map() is defined inside
util/probe-event.c.
probe-event.c will only get included in perf binary if CONFIG_LIBELF is
set. Hence arch__post_process_probe_trace_events() needs to be defined
inside #ifdef HAVE_LIBELF_SUPPORT to solve compilation error.
Reported-and-Tested-by: Anton Blanchard <anton@xxxxxxxxx>
Tested-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>
Cc: Balbir Singh <bsingharora@xxxxxxxxx>
Cc: Naveen N. Rao <naveen.n.rao@xxxxxxxxxxxxxxxxxx>
Cc: Ananth N Mavinakayanahalli <ananth@xxxxxxxxxx>
Cc: Masami Hiramatsu <mhiramat@xxxxxxxxxx>
Cc: Wang Nan <wangnan0@xxxxxxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Link: http://lkml.kernel.org/r/57ABFF88.8030905@xxxxxxxxxxxxxxxxxx
[ Thunderbird MUA mangled it, fix that ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/perf/arch/powerpc/util/sym-handling.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/perf/arch/powerpc/util/sym-handling.c b/tools/perf/arch/powerpc/util/sym-handling.c
index 8d4dc97..35745a7 100644
--- a/tools/perf/arch/powerpc/util/sym-handling.c
+++ b/tools/perf/arch/powerpc/util/sym-handling.c
@@ -97,6 +97,7 @@ void arch__fix_tev_from_maps(struct perf_probe_event *pev,
}
}
+#ifdef HAVE_LIBELF_SUPPORT
void arch__post_process_probe_trace_events(struct perf_probe_event *pev,
int ntevs)
{
@@ -118,5 +119,6 @@ void arch__post_process_probe_trace_events(struct perf_probe_event *pev,
}
}
}
+#endif /* HAVE_LIBELF_SUPPORT */
#endif