Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1549624 > unrolled thread
| Started by | Andi Kleen <andi@firstfloor.org> |
|---|---|
| First post | 2017-01-03 10:10 +0100 |
| Last post | 2017-01-10 02:00 +0100 |
| Articles | 9 — 4 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 1/4] perf, tools: Add probing for xed Andi Kleen <andi@firstfloor.org> - 2017-01-03 10:10 +0100
Re: [PATCH 1/4] perf, tools: Add probing for xed Jiri Olsa <jolsa@redhat.com> - 2017-01-03 16:00 +0100
Re: [PATCH 1/4] perf, tools: Add probing for xed Andi Kleen <ak@linux.intel.com> - 2017-01-03 16:20 +0100
Re: [PATCH 1/4] perf, tools: Add probing for xed Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-01-03 19:50 +0100
Re: [PATCH 1/4] perf, tools: Add probing for xed Jiri Olsa <jolsa@redhat.com> - 2017-01-03 20:50 +0100
Re: [PATCH 1/4] perf, tools: Add probing for xed Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-01-03 16:20 +0100
Re: [PATCH 1/4] perf, tools: Add probing for xed Jiri Olsa <jolsa@redhat.com> - 2017-01-08 15:30 +0100
Re: [PATCH 1/4] perf, tools: Add probing for xed Jiri Olsa <jolsa@redhat.com> - 2017-01-08 15:30 +0100
Re: [PATCH 1/4] perf, tools: Add probing for xed Andi Kleen <andi@firstfloor.org> - 2017-01-10 02:00 +0100
| From | Andi Kleen <andi@firstfloor.org> |
|---|---|
| Date | 2017-01-03 10:10 +0100 |
| Subject | [PATCH 1/4] perf, tools: Add probing for xed |
| Message-ID | <sVtgu-40T-37@gated-at.bofh.it> |
From: Andi Kleen <ak@linux.intel.com>
Add autoprobing for the xed disassembler library.
Can be downloaded from https://github.com/intelxed/xed
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
tools/build/Makefile.feature | 6 ++++--
tools/build/feature/Makefile | 8 ++++++--
tools/build/feature/test-all.c | 5 +++++
tools/build/feature/test-xed.c | 9 +++++++++
tools/perf/Makefile.config | 5 +++++
5 files changed, 29 insertions(+), 4 deletions(-)
create mode 100644 tools/build/feature/test-xed.c
diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature
index e3fb5ecbdcb6..25183fa39963 100644
--- a/tools/build/Makefile.feature
+++ b/tools/build/Makefile.feature
@@ -63,7 +63,8 @@ FEATURE_TESTS_BASIC := \
lzma \
get_cpuid \
bpf \
- sdt
+ sdt \
+ xed
# FEATURE_TESTS_BASIC + FEATURE_TESTS_EXTRA is the complete list
# of all feature tests
@@ -105,7 +106,8 @@ FEATURE_DISPLAY ?= \
zlib \
lzma \
get_cpuid \
- bpf
+ bpf \
+ xed
# 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 b564a2eea039..a1275965c67d 100644
--- a/tools/build/feature/Makefile
+++ b/tools/build/feature/Makefile
@@ -48,7 +48,8 @@ FILES= \
test-get_cpuid.bin \
test-sdt.bin \
test-cxx.bin \
- test-jvmti.bin
+ test-jvmti.bin \
+ test-xed.bin
FILES := $(addprefix $(OUTPUT),$(FILES))
@@ -68,7 +69,7 @@ __BUILDXX = $(CXX) $(CXXFLAGS) -Wall -Werror -o $@ $(patsubst %.bin,%.cpp,$(@F))
###############################
$(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 -lxed
$(OUTPUT)test-hello.bin:
$(BUILD)
@@ -123,6 +124,9 @@ $(OUTPUT)test-numa_num_possible_cpus.bin:
$(OUTPUT)test-libunwind.bin:
$(BUILD) -lelf
+$(OUTPUT)test-xed.bin:
+ $(BUILD) -lxed
+
$(OUTPUT)test-libunwind-debug-frame.bin:
$(BUILD) -lelf
$(OUTPUT)test-libunwind-x86.bin:
diff --git a/tools/build/feature/test-all.c b/tools/build/feature/test-all.c
index 699e43627397..4a6dd1d1ff49 100644
--- a/tools/build/feature/test-all.c
+++ b/tools/build/feature/test-all.c
@@ -149,6 +149,10 @@
# include "test-sdt.c"
#undef main
+#define main main_test_xed
+# include "test-xed.c"
+#endif
+
int main(int argc, char *argv[])
{
main_test_libpython();
@@ -183,6 +187,7 @@ int main(int argc, char *argv[])
main_test_bpf();
main_test_libcrypto();
main_test_sdt();
+ main_test_xed();
return 0;
}
diff --git a/tools/build/feature/test-xed.c b/tools/build/feature/test-xed.c
new file mode 100644
index 000000000000..ef9aebf1559d
--- /dev/null
+++ b/tools/build/feature/test-xed.c
@@ -0,0 +1,9 @@
+#include <xed/xed-interface.h>
+#include <xed/xed-decode.h>
+#include <xed/xed-decoded-inst-api.h>
+
+int main(void)
+{
+ xed_tables_init();
+ return 0;
+}
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index 76c84f0eec52..41cc34ce81f8 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -682,6 +682,11 @@ ifndef NO_ZLIB
endif
endif
+ifeq ($(feature-xed), 1)
+ EXTLIBS += -lxed
+ $(call detected,CONFIG_XED)
+endif
+
ifndef NO_LZMA
ifeq ($(feature-lzma), 1)
CFLAGS += -DHAVE_LZMA_SUPPORT
--
2.9.3
[toc] | [next] | [standalone]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2017-01-03 16:00 +0100 |
| Message-ID | <sVyJh-7Mp-25@gated-at.bofh.it> |
| In reply to | #1549624 |
On Tue, Jan 03, 2017 at 01:00:26AM -0800, Andi Kleen wrote: > From: Andi Kleen <ak@linux.intel.com> > > Add autoprobing for the xed disassembler library. > > Can be downloaded from https://github.com/intelxed/xed > > Signed-off-by: Andi Kleen <ak@linux.intel.com> > --- > tools/build/Makefile.feature | 6 ++++-- > tools/build/feature/Makefile | 8 ++++++-- > tools/build/feature/test-all.c | 5 +++++ > tools/build/feature/test-xed.c | 9 +++++++++ > tools/perf/Makefile.config | 5 +++++ > 5 files changed, 29 insertions(+), 4 deletions(-) > create mode 100644 tools/build/feature/test-xed.c > > diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature > index e3fb5ecbdcb6..25183fa39963 100644 > --- a/tools/build/Makefile.feature > +++ b/tools/build/Makefile.feature > @@ -63,7 +63,8 @@ FEATURE_TESTS_BASIC := \ > lzma \ > get_cpuid \ > bpf \ > - sdt > + sdt \ > + xed > > # FEATURE_TESTS_BASIC + FEATURE_TESTS_EXTRA is the complete list > # of all feature tests > @@ -105,7 +106,8 @@ FEATURE_DISPLAY ?= \ > zlib \ > lzma \ > get_cpuid \ > - bpf > + bpf \ > + xed please don't put it in FEATURE_DISPLAY.. AFAICS there's not any xed package yet, just the sources, so the "xed: OFF" build message would bother almost everyone probably for long time.. thanks, jirka
[toc] | [prev] | [next] | [standalone]
| From | Andi Kleen <ak@linux.intel.com> |
|---|---|
| Date | 2017-01-03 16:20 +0100 |
| Message-ID | <sVz2x-8cw-15@gated-at.bofh.it> |
| In reply to | #1549842 |
> please don't put it in FEATURE_DISPLAY.. AFAICS there's not any xed > package yet, just the sources, so the "xed: OFF" build message would > bother almost everyone probably for long time.. It should be eventually packaged. How would people know they are missing it without displaying it? I think it has to, otherwise most people will miss out on the feature. Silent failure is bad. -Andi
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2017-01-03 19:50 +0100 |
| Message-ID | <sVCjL-1Wi-19@gated-at.bofh.it> |
| In reply to | #1549857 |
Em Tue, Jan 03, 2017 at 07:11:06AM -0800, Andi Kleen escreveu: > > please don't put it in FEATURE_DISPLAY.. AFAICS there's not any xed > > package yet, just the sources, so the "xed: OFF" build message would > > bother almost everyone probably for long time.. > > It should be eventually packaged. How would people know they are missing > it without displaying it? I think it has to, otherwise most people will > miss out on the feature. Silent failure is bad. Right, you have a point, we should have some warning to the user for when features are not being automatically probed for, i.e. extra features may be enabled using special command line settings, read the docs to see how. - Arnaldo
[toc] | [prev] | [next] | [standalone]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2017-01-03 20:50 +0100 |
| Message-ID | <sVDfQ-2y2-39@gated-at.bofh.it> |
| In reply to | #1550088 |
On Tue, Jan 03, 2017 at 03:39:46PM -0300, Arnaldo Carvalho de Melo wrote: > Em Tue, Jan 03, 2017 at 07:11:06AM -0800, Andi Kleen escreveu: > > > please don't put it in FEATURE_DISPLAY.. AFAICS there's not any xed > > > package yet, just the sources, so the "xed: OFF" build message would > > > bother almost everyone probably for long time.. > > > > It should be eventually packaged. How would people know they are missing > > it without displaying it? I think it has to, otherwise most people will > > miss out on the feature. Silent failure is bad. make VF=1 will show it > Right, you have a point, we should have some warning to the user for > when features are not being automatically probed for, i.e. extra > features may be enabled using special command line settings, read the > docs to see how. we could print out one line saying we did not detect all the features jirka
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2017-01-03 16:20 +0100 |
| Message-ID | <sVz2y-8cw-19@gated-at.bofh.it> |
| In reply to | #1549842 |
Em Tue, Jan 03, 2017 at 03:58:54PM +0100, Jiri Olsa escreveu:
> On Tue, Jan 03, 2017 at 01:00:26AM -0800, Andi Kleen wrote:
> > From: Andi Kleen <ak@linux.intel.com>
> >
> > Add autoprobing for the xed disassembler library.
> >
> > Can be downloaded from https://github.com/intelxed/xed
> > +++ b/tools/build/Makefile.feature
> > @@ -63,7 +63,8 @@ FEATURE_TESTS_BASIC := \
> > lzma \
> > get_cpuid \
> > bpf \
> > - sdt
> > + sdt \
> > + xed
> > # FEATURE_TESTS_BASIC + FEATURE_TESTS_EXTRA is the complete list
> > # of all feature tests
> > @@ -105,7 +106,8 @@ FEATURE_DISPLAY ?= \
> > zlib \
> > lzma \
> > get_cpuid \
> > - bpf
> > + bpf \
> > + xed
> please don't put it in FEATURE_DISPLAY.. AFAICS there's not any xed
> package yet, just the sources, so the "xed: OFF" build message would
> bother almost everyone probably for long time..
Right, I was going to point this out, the policy has been to not even
try to build features that will likely fail due to not being widely
available in distros.
So please do as with libbabeltrace, where it is only built if one
explicitely asks it to be, see:
commit 6ab2b762befd192b90704c5c7898f5abf8ebb387
Author: Jiri Olsa <jolsa@redhat.com>
Date: Sat Mar 28 11:30:30 2015 +0100
perf build: Disable libbabeltrace check by default
Disabling libbabeltrace check by default and replacing the
NO_LIBBABELTRACE make variable with LIBBABELTRACE.
Users wanting the libbabeltrace feature need to build via:
$ make LIBBABELTRACE=1
The reason for this is that the libababeltrace interface we use (version
1.3) hasn't been packaged/released yet, thus the failing feature check
only slows down build and confuses other (non CTF) developers.
Requested-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Ingo Molnar <mingo@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jeremie Galarneau <jgalar@efficios.com>
[toc] | [prev] | [next] | [standalone]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2017-01-08 15:30 +0100 |
| Message-ID | <sXmDT-7xs-29@gated-at.bofh.it> |
| In reply to | #1549624 |
On Tue, Jan 03, 2017 at 01:00:26AM -0800, Andi Kleen wrote: SNIP > FILES := $(addprefix $(OUTPUT),$(FILES)) > > @@ -68,7 +69,7 @@ __BUILDXX = $(CXX) $(CXXFLAGS) -Wall -Werror -o $@ $(patsubst %.bin,%.cpp,$(@F)) > ############################### > > $(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 -lxed the test-all.bin would also fail almost for everybody, we dont have even babeltrace in here jirka
[toc] | [prev] | [next] | [standalone]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2017-01-08 15:30 +0100 |
| Message-ID | <sXmDT-7xs-25@gated-at.bofh.it> |
| In reply to | #1549624 |
On Tue, Jan 03, 2017 at 01:00:26AM -0800, Andi Kleen wrote: SNIP > diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config > index 76c84f0eec52..41cc34ce81f8 100644 > --- a/tools/perf/Makefile.config > +++ b/tools/perf/Makefile.config > @@ -682,6 +682,11 @@ ifndef NO_ZLIB > endif > endif > > +ifeq ($(feature-xed), 1) > + EXTLIBS += -lxed > + $(call detected,CONFIG_XED) > +endif so when this is installed through sources it will end up installed in some separated location, please add some directories setup we use for babletrace (LIBBABELTRACE_DIR) jirka
[toc] | [prev] | [next] | [standalone]
| From | Andi Kleen <andi@firstfloor.org> |
|---|---|
| Date | 2017-01-10 02:00 +0100 |
| Message-ID | <sXSX7-2HO-1@gated-at.bofh.it> |
| In reply to | #1553884 |
On Sun, Jan 08, 2017 at 03:20:11PM +0100, Jiri Olsa wrote: > On Tue, Jan 03, 2017 at 01:00:26AM -0800, Andi Kleen wrote: > > SNIP > > > diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config > > index 76c84f0eec52..41cc34ce81f8 100644 > > --- a/tools/perf/Makefile.config > > +++ b/tools/perf/Makefile.config > > @@ -682,6 +682,11 @@ ifndef NO_ZLIB > > endif > > endif > > > > +ifeq ($(feature-xed), 1) > > + EXTLIBS += -lxed > > + $(call detected,CONFIG_XED) > > +endif > > so when this is installed through sources it will end up > installed in some separated location, please add some > directories setup we use for babletrace (LIBBABELTRACE_DIR) xed was fixed to support installation in /usr/local (mfile prefix=/usr/local install But will add it -Andi
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web