[tip:perf/core] perf tools: Disable JVMTI if no ELF support available

From: tip-bot for David Carrillo-Cisneros
Date: Mon Apr 17 2017 - 04:41:19 EST


Commit-ID: e5e992a7c184c2121adf37bdf292a516af81dbbb
Gitweb: http://git.kernel.org/tip/e5e992a7c184c2121adf37bdf292a516af81dbbb
Author: David Carrillo-Cisneros <davidcc@xxxxxxxxxx>
AuthorDate: Wed, 12 Apr 2017 10:07:45 -0700
Committer: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
CommitDate: Thu, 13 Apr 2017 11:47:43 -0300

perf tools: Disable JVMTI if no ELF support available

The build of JVMTI depends on LIBELF (-lelf). Make Makefile.conf
check this dependendancy and notify user when not present.

v2: Comma nitpicking.

Signed-off-by: David Carrillo-Cisneros <davidcc@xxxxxxxxxx>
Tested-by: Kim Phillips <kim.phillips@xxxxxxx>
Acked-by: Jiri Olsa <jolsa@xxxxxxxxxx>
Cc: Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>
Cc: Andi Kleen <ak@xxxxxxxxxxxxxxx>
Cc: He Kuang <hekuang@xxxxxxxxxx>
Cc: Masami Hiramatsu <mhiramat@xxxxxxxxxx>
Cc: Paul Turner <pjt@xxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Simon Que <sque@xxxxxxxxxxxx>
Cc: Stephane Eranian <eranian@xxxxxxxxxx>
Cc: Wang Nan <wangnan0@xxxxxxxxxx>
Link: http://lkml.kernel.org/r/20170412170745.26620-1-davidcc@xxxxxxxxxx
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/perf/Makefile.config | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index cfd6015..8354d04 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -274,6 +274,7 @@ ifdef NO_LIBELF
NO_LIBUNWIND := 1
NO_LIBDW_DWARF_UNWIND := 1
NO_LIBBPF := 1
+ NO_JVMTI := 1
else
ifeq ($(feature-libelf), 0)
ifeq ($(feature-glibc), 1)
@@ -283,7 +284,7 @@ else
LIBC_SUPPORT := 1
endif
ifeq ($(LIBC_SUPPORT),1)
- msg := $(warning No libelf found, disables 'probe' tool and BPF support in 'perf record', please install libelf-dev, libelf-devel or elfutils-libelf-devel);
+ msg := $(warning No libelf found. Disables 'probe' tool, jvmti and BPF support in 'perf record'. Please install libelf-dev, libelf-devel or elfutils-libelf-devel);

NO_LIBELF := 1
NO_DWARF := 1
@@ -291,6 +292,7 @@ else
NO_LIBUNWIND := 1
NO_LIBDW_DWARF_UNWIND := 1
NO_LIBBPF := 1
+ NO_JVMTI := 1
else
ifneq ($(filter s% -static%,$(LDFLAGS),),)
msg := $(error No static glibc found, please install glibc-static);