All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org, Andi Kleen <ak@linux.intel.com>,
	Stephane Eranian <eranian@google.com>,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 10/11] perf tools: Add probing for udev86 library
Date: Tue, 29 Mar 2016 20:41:28 -0300	[thread overview]
Message-ID: <1459294889-12148-11-git-send-email-acme@kernel.org> (raw)
In-Reply-To: <1459294889-12148-1-git-send-email-acme@kernel.org>

From: Andi Kleen <ak@linux.intel.com>

Add autoprobing for the udev86 disassembler library.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1459187142-20035-2-git-send-email-andi@firstfloor.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/build/Makefile.feature      | 6 ++++--
 tools/build/feature/Makefile      | 8 ++++++--
 tools/build/feature/test-all.c    | 5 +++++
 tools/build/feature/test-udis86.c | 8 ++++++++
 tools/perf/config/Makefile        | 5 +++++
 5 files changed, 28 insertions(+), 4 deletions(-)
 create mode 100644 tools/build/feature/test-udis86.c

diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature
index 6b7707270aa3..db4f426cae09 100644
--- a/tools/build/Makefile.feature
+++ b/tools/build/Makefile.feature
@@ -55,7 +55,8 @@ FEATURE_TESTS_BASIC :=			\
 	zlib				\
 	lzma				\
 	get_cpuid			\
-	bpf
+	bpf				\
+	udis86
 
 # FEATURE_TESTS_BASIC + FEATURE_TESTS_EXTRA is the complete list
 # of all feature tests
@@ -94,7 +95,8 @@ FEATURE_DISPLAY ?=			\
 	zlib				\
 	lzma				\
 	get_cpuid			\
-	bpf
+	bpf				\
+	udis86
 
 # Set FEATURE_CHECK_(C|LD)FLAGS-all for all FEATURE_TESTS features.
 # If in the future we need per-feature checks/flags for features not
diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
index c5f4c417428d..d05c312f25c0 100644
--- a/tools/build/feature/Makefile
+++ b/tools/build/feature/Makefile
@@ -36,7 +36,8 @@ FILES=					\
 	test-zlib.bin			\
 	test-lzma.bin			\
 	test-bpf.bin			\
-	test-get_cpuid.bin
+	test-get_cpuid.bin		\
+	test-udis86.bin
 
 FILES := $(addprefix $(OUTPUT),$(FILES))
 
@@ -51,7 +52,7 @@ __BUILD = $(CC) $(CFLAGS) -Wall -Werror -o $@ $(patsubst %.bin,%.c,$(@F)) $(LDFL
 ###############################
 
 $(OUTPUT)test-all.bin:
-	$(BUILD) -fstack-protector-all -O2 -D_FORTIFY_SOURCE=2 -ldw -lelf -lnuma -lelf -laudit -I/usr/include/slang -lslang $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null) $(FLAGS_PERL_EMBED) $(FLAGS_PYTHON_EMBED) -DPACKAGE='"perf"' -lbfd -ldl -lz -llzma
+	$(BUILD) -fstack-protector-all -O2 -D_FORTIFY_SOURCE=2 -ldw -lelf -lnuma -lelf -laudit -I/usr/include/slang -lslang $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null) $(FLAGS_PERL_EMBED) $(FLAGS_PYTHON_EMBED) -DPACKAGE='"perf"' -lbfd -ldl -lz -llzma -ludis86
 
 $(OUTPUT)test-hello.bin:
 	$(BUILD)
@@ -97,6 +98,9 @@ $(OUTPUT)test-numa_num_possible_cpus.bin:
 $(OUTPUT)test-libunwind.bin:
 	$(BUILD) -lelf
 
+$(OUTPUT)test-udis86.bin:
+	$(BUILD) -ludis86
+
 $(OUTPUT)test-libunwind-debug-frame.bin:
 	$(BUILD) -lelf
 
diff --git a/tools/build/feature/test-all.c b/tools/build/feature/test-all.c
index e499a36c1e4a..76b0de3d145a 100644
--- a/tools/build/feature/test-all.c
+++ b/tools/build/feature/test-all.c
@@ -133,6 +133,10 @@
 # include "test-libcrypto.c"
 #undef main
 
+#define main main_test_udis86
+#  include "test-udis86.c"
+#endif
+
 int main(int argc, char *argv[])
 {
 	main_test_libpython();
@@ -163,6 +167,7 @@ int main(int argc, char *argv[])
 	main_test_get_cpuid();
 	main_test_bpf();
 	main_test_libcrypto();
+	main_test_udis86();
 
 	return 0;
 }
diff --git a/tools/build/feature/test-udis86.c b/tools/build/feature/test-udis86.c
new file mode 100644
index 000000000000..623c545f4bad
--- /dev/null
+++ b/tools/build/feature/test-udis86.c
@@ -0,0 +1,8 @@
+#include <udis86.h>
+
+int main(void)
+{
+	ud_t ud;
+	ud_init(&ud);
+	return 0;
+}
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index f7d7f5a1cad5..399ada8e7a47 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -587,6 +587,11 @@ ifneq ($(filter -lbfd,$(EXTLIBS)),)
   CFLAGS += -DHAVE_LIBBFD_SUPPORT
 endif
 
+ifeq ($(feature-udis86), 1)
+  CFLAGS += -DHAVE_UDIS86
+  EXTLIBS += -ludis86
+endif
+
 ifndef NO_ZLIB
   ifeq ($(feature-zlib), 1)
     CFLAGS += -DHAVE_ZLIB_SUPPORT
-- 
2.5.5

  parent reply	other threads:[~2016-03-29 23:42 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-29 23:41 [GIT PULL 00/11] perf/core improvements and fixes Arnaldo Carvalho de Melo
2016-03-29 23:41 ` [PATCH 01/11] perf mem: Add -U/-K (--all-user/--all-kernel) options Arnaldo Carvalho de Melo
2016-03-29 23:41 ` [PATCH 02/11] perf tools: Make hists__collapse_insert_entry static Arnaldo Carvalho de Melo
2016-03-29 23:41 ` [PATCH 03/11] perf tools: Make -f/--force option documentation consistent across tools Arnaldo Carvalho de Melo
2016-03-29 23:41 ` [PATCH 04/11] perf tests: Add test to check for event times Arnaldo Carvalho de Melo
2016-03-29 23:41 ` [PATCH 05/11] perf config: Remove duplicated set_buildid_dir calls Arnaldo Carvalho de Melo
2016-03-29 23:41 ` [PATCH 06/11] perf config: Rework buildid_dir_command_config to perf_buildid_config Arnaldo Carvalho de Melo
2016-03-29 23:41 ` [PATCH 07/11] perf config: Rename 'v' to 'home' in set_buildid_dir() Arnaldo Carvalho de Melo
2016-03-29 23:41 ` [PATCH 08/11] perf script perl: Perl scripts now get a backtrace, like the python ones Arnaldo Carvalho de Melo
2016-03-29 23:41 ` [PATCH 09/11] perf tools: Add support for skipping itrace instructions Arnaldo Carvalho de Melo
2016-03-29 23:41 ` Arnaldo Carvalho de Melo [this message]
2016-03-30 10:43   ` [PATCH 10/11] perf tools: Add probing for udev86 library Ingo Molnar
2016-03-30 13:36     ` Arnaldo Carvalho de Melo
2016-03-30 13:52       ` Ingo Molnar
2016-03-30 14:10         ` Arnaldo Carvalho de Melo
2016-03-30 14:47           ` Arnaldo Carvalho de Melo
2016-03-31  6:34             ` Ingo Molnar
2016-03-30 15:08         ` Andi Kleen
2016-03-31  6:49           ` Ingo Molnar
2016-03-30 14:42     ` Andi Kleen
2016-03-29 23:41 ` [PATCH 11/11] perf script: Add support for printing assembler Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1459294889-12148-11-git-send-email-acme@kernel.org \
    --to=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=ak@linux.intel.com \
    --cc=eranian@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.