From 46b1fa85ff5a2e03423770b3931b97266e8ac6cf Mon Sep 17 00:00:00 2001 From: Adrian Hunter Date: Thu, 23 Oct 2014 13:45:24 +0300 Subject: perf tools: Do not attempt to run perf-read-vdso32 if it wasn't built popen() causes an error message to print if perf-read-vdso32 does not run. Avoid that by not trying to run it if it was not built. Ditto perf-read-vdsox32. Signed-off-by: Adrian Hunter Cc: David Ahern Cc: Frederic Weisbecker Cc: Jiri Olsa Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/r/1414061124-26830-17-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/vdso.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tools/perf/util/vdso.c') diff --git a/tools/perf/util/vdso.c b/tools/perf/util/vdso.c index 69daef6a17d5..5c7dd796979d 100644 --- a/tools/perf/util/vdso.c +++ b/tools/perf/util/vdso.c @@ -255,6 +255,16 @@ static int vdso__dso_findnew_compat(struct machine *machine, enum dso_type dso_type; dso_type = machine__thread_dso_type(machine, thread); + +#ifndef HAVE_PERF_READ_VDSO32 + if (dso_type == DSO__TYPE_32BIT) + return 0; +#endif +#ifndef HAVE_PERF_READ_VDSOX32 + if (dso_type == DSO__TYPE_X32BIT) + return 0; +#endif + switch (dso_type) { case DSO__TYPE_32BIT: *dso = vdso__findnew_compat(machine, &vdso_info->vdso32); -- cgit v1.2.3-59-g8ed1b