提交 46b1fa85 编写于 作者: A Adrian Hunter 提交者: Arnaldo Carvalho de Melo

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: NAdrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1414061124-26830-17-git-send-email-adrian.hunter@intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 f6832e17
...@@ -627,7 +627,9 @@ endif ...@@ -627,7 +627,9 @@ endif
ifeq (${IS_64_BIT}, 1) ifeq (${IS_64_BIT}, 1)
ifndef NO_PERF_READ_VDSO32 ifndef NO_PERF_READ_VDSO32
$(call feature_check,compile-32) $(call feature_check,compile-32)
ifneq ($(feature-compile-32), 1) ifeq ($(feature-compile-32), 1)
CFLAGS += -DHAVE_PERF_READ_VDSO32
else
NO_PERF_READ_VDSO32 := 1 NO_PERF_READ_VDSO32 := 1
endif endif
endif endif
...@@ -636,7 +638,9 @@ ifeq (${IS_64_BIT}, 1) ...@@ -636,7 +638,9 @@ ifeq (${IS_64_BIT}, 1)
endif endif
ifndef NO_PERF_READ_VDSOX32 ifndef NO_PERF_READ_VDSOX32
$(call feature_check,compile-x32) $(call feature_check,compile-x32)
ifneq ($(feature-compile-x32), 1) ifeq ($(feature-compile-x32), 1)
CFLAGS += -DHAVE_PERF_READ_VDSOX32
else
NO_PERF_READ_VDSOX32 := 1 NO_PERF_READ_VDSOX32 := 1
endif endif
endif endif
......
...@@ -255,6 +255,16 @@ static int vdso__dso_findnew_compat(struct machine *machine, ...@@ -255,6 +255,16 @@ static int vdso__dso_findnew_compat(struct machine *machine,
enum dso_type dso_type; enum dso_type dso_type;
dso_type = machine__thread_dso_type(machine, thread); 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) { switch (dso_type) {
case DSO__TYPE_32BIT: case DSO__TYPE_32BIT:
*dso = vdso__findnew_compat(machine, &vdso_info->vdso32); *dso = vdso__findnew_compat(machine, &vdso_info->vdso32);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册