Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1306825 > unrolled thread
| Started by | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| First post | 2016-01-12 00:40 +0100 |
| Last post | 2016-01-12 11:10 +0100 |
| Articles | 10 — 2 participants |
Back to article view | Back to linux.kernel
[GIT PULL 00/12] perf/core fixes Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-12 00:40 +0100
[PATCH 01/12] tools: Add clean targets for tools directory Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-12 00:40 +0100
[PATCH 08/12] tools: Move Makefile.arch from perf/config to tools/scripts Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-12 00:40 +0100
[PATCH 10/12] tools build: Add BPF feature check to test-all Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-12 00:40 +0100
[PATCH 04/12] perf tools: Add missing sources to perf's MANIFEST Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-12 00:40 +0100
[PATCH 02/12] tools bpf: Add *.cmd files clean up Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-12 00:40 +0100
[PATCH 03/12] tools lockdep: Add *.cmd files clean up Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-12 00:40 +0100
[PATCH 12/12] perf test: Reset err after using it hold errcode in hist testcases Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-12 00:40 +0100
[PATCH 05/12] perf tools: Add -lutil in python lib list for broken python-config Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-12 00:40 +0100
Re: [GIT PULL 00/12] perf/core fixes Ingo Molnar <mingo@kernel.org> - 2016-01-12 11:10 +0100
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2016-01-12 00:40 +0100 |
| Subject | [GIT PULL 00/12] perf/core fixes |
| Message-ID | <qPUe5-11z-3@gated-at.bofh.it> |
Hi Ingo,
Please consider pulling,
- Arnaldo
The following changes since commit 3eb9ede23bdd96e9ba60e2b4d4d17a7c35d58448:
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-01-09 17:17:33 +0100)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo
for you to fetch changes up to b0500c169b4069e40f03391c7280cd6eaf849e49:
perf test: Reset err after using it hold errcode in hist testcases (2016-01-11 19:22:22 -0300)
----------------------------------------------------------------
perf/core fixes:
Developer stuff:
- Fix a few clean targets in tools/ (Jiri Olsa)
- Add missing sources to perf's MANIFEST, fixing the out of tree build with
'make perf-tar*-src-pkg' tarballs (Jiri Olsa)
- Fix bpf related build problems in PowerPC (Naveen N. Rao, Wang Nan)
- 'make -C tools/perf build-test' fixes (Wang Nan)
- Fix 'perf test hist' entry (Wang Nan)
- Add BPF feature check to test-all, as in an environment with all other
features enabled, BPF would be considered enabled without doing real
feature check. (Wang Nan)
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
----------------------------------------------------------------
Jiri Olsa (4):
tools: Add clean targets for tools directory
tools bpf: Add *.cmd files clean up
tools lockdep: Add *.cmd files clean up
perf tools: Add missing sources to perf's MANIFEST
Naveen N. Rao (1):
perf bpf: Fix build breakage due to libbpf
Wang Nan (7):
perf tools: Add -lutil in python lib list for broken python-config
perf tools: Fix phony build target for build-test
perf tools: Fix PowerPC native building
tools: Move Makefile.arch from perf/config to tools/scripts
tools build: Add BPF feature check to test-all
perf test: Fix false TEST_OK result for 'perf test hist'
perf test: Reset err after using it hold errcode in hist testcases
tools/Makefile | 11 ++++++++++-
tools/build/feature/test-all.c | 5 +++++
tools/build/feature/test-bpf.c | 20 +++++++++++++++++++-
tools/lib/bpf/Makefile | 18 +++++++++---------
tools/lib/bpf/bpf.c | 4 ++--
tools/lib/lockdep/Makefile | 2 +-
tools/perf/MANIFEST | 2 ++
tools/perf/config/Makefile | 4 ++--
tools/perf/tests/hists_common.c | 5 -----
tools/perf/tests/hists_cumulate.c | 1 +
tools/perf/tests/hists_filter.c | 1 +
tools/perf/tests/hists_link.c | 1 +
tools/perf/tests/hists_output.c | 1 +
tools/perf/tests/make | 18 ++++++++++++++++--
tools/{perf/config => scripts}/Makefile.arch | 0
15 files changed, 70 insertions(+), 23 deletions(-)
rename tools/{perf/config => scripts}/Makefile.arch (100%)
[toc] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2016-01-12 00:40 +0100 |
| Subject | [PATCH 01/12] tools: Add clean targets for tools directory |
| Message-ID | <qPUe6-11z-21@gated-at.bofh.it> |
| In reply to | #1306825 |
From: Jiri Olsa <jolsa@kernel.org> Adding missing clean targets for following tools directories: lib/bpf lib/subcmd build This are now cleaned via 'make -C tools clean' command. Reported-and-Tested-by: Arnaldo Carvalho de Melo <acme@kernel.org> Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: David Ahern <dsahern@gmail.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/r/1452509693-13452-2-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- tools/Makefile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tools/Makefile b/tools/Makefile index 0ba0df3b516f..4e8e10755e0d 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -127,6 +127,12 @@ liblockdep_clean: libapi_clean: $(call descend,lib/api,clean) +libbpf_clean: + $(call descend,lib/bpf,clean) + +libsubcmd_clean: + $(call descend,lib/subcmd,clean) + perf_clean: $(call descend,$(@:_clean=),clean) @@ -142,9 +148,12 @@ tmon_clean: freefall_clean: $(call descend,laptop/freefall,clean) +build_clean: + $(call descend,build,clean) + clean: acpi_clean cgroup_clean cpupower_clean hv_clean firewire_clean lguest_clean \ perf_clean selftests_clean turbostat_clean usb_clean virtio_clean \ vm_clean net_clean iio_clean x86_energy_perf_policy_clean tmon_clean \ - freefall_clean + freefall_clean build_clean libbpf_clean libsubcmd_clean liblockdep_clean .PHONY: FORCE -- 2.1.0
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2016-01-12 00:40 +0100 |
| Subject | [PATCH 08/12] tools: Move Makefile.arch from perf/config to tools/scripts |
| Message-ID | <qPUe7-11z-27@gated-at.bofh.it> |
| In reply to | #1306825 |
From: Wang Nan <wangnan0@huawei.com>
After this patch other directories can use this architecture detector
without directly including it from perf's directory. Libbpf would
utilize it to get proper $(ARCH) so it can receive correct uapi include
directory.
Tested-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Cc: Zefan Li <lizefan@huawei.com>
Cc: pi3orama@163.com
Signed-off-by: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/1452520124-2073-8-git-send-email-wangnan0@huawei.com
[ Add missing srctree definition in tests/make ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@kernel.org>
---
tools/perf/config/Makefile | 2 +-
tools/perf/config/Makefile.arch | 18 ------------------
tools/perf/tests/make | 16 +++++++++++++++-
tools/scripts/Makefile.arch | 18 ++++++++++++++++++
4 files changed, 34 insertions(+), 20 deletions(-)
delete mode 100644 tools/perf/config/Makefile.arch
create mode 100644 tools/scripts/Makefile.arch
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index 0793c7654858..7545ba60053e 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -17,7 +17,7 @@ detected_var = $(shell echo "$(1)=$($(1))" >> $(OUTPUT).config-detected)
CFLAGS := $(EXTRA_CFLAGS) $(EXTRA_WARNINGS)
-include $(src-perf)/config/Makefile.arch
+include $(srctree)/tools/scripts/Makefile.arch
$(call detected_var,ARCH)
diff --git a/tools/perf/config/Makefile.arch b/tools/perf/config/Makefile.arch
deleted file mode 100644
index e11fbd6fae78..000000000000
--- a/tools/perf/config/Makefile.arch
+++ /dev/null
@@ -1,18 +0,0 @@
-ifndef ARCH
-ARCH := $(shell uname -m 2>/dev/null || echo not)
-endif
-
-ARCH := $(shell echo $(ARCH) | sed -e s/i.86/x86/ -e s/x86_64/x86/ \
- -e s/sun4u/sparc/ -e s/sparc64/sparc/ \
- -e /arm64/!s/arm.*/arm/ -e s/sa110/arm/ \
- -e s/s390x/s390/ -e s/parisc64/parisc/ \
- -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
- -e s/sh[234].*/sh/ -e s/aarch64.*/arm64/ \
- -e s/tile.*/tile/ )
-
-LP64 := $(shell echo __LP64__ | ${CC} ${CFLAGS} -E -x c - | tail -n 1)
-ifeq ($(LP64), 1)
- IS_64_BIT := 1
-else
- IS_64_BIT := 0
-endif
diff --git a/tools/perf/tests/make b/tools/perf/tests/make
index 130be7c88824..df38decc48c3 100644
--- a/tools/perf/tests/make
+++ b/tools/perf/tests/make
@@ -1,3 +1,5 @@
+include ../scripts/Makefile.include
+
ifndef MK
ifeq ($(MAKECMDGOALS),)
# no target specified, trigger the whole suite
@@ -12,7 +14,19 @@ endif
else
PERF := .
-include config/Makefile.arch
+# As per kernel Makefile, avoid funny character set dependencies
+unexport LC_ALL
+LC_COLLATE=C
+LC_NUMERIC=C
+export LC_COLLATE LC_NUMERIC
+
+ifeq ($(srctree),)
+srctree := $(patsubst %/,%,$(dir $(shell pwd)))
+srctree := $(patsubst %/,%,$(dir $(srctree)))
+#$(info Determined 'srctree' to be $(srctree))
+endif
+
+include $(srctree)/tools/scripts/Makefile.arch
# FIXME looks like x86 is the only arch running tests ;-)
# we need some IS_(32/64) flag to make this generic
diff --git a/tools/scripts/Makefile.arch b/tools/scripts/Makefile.arch
new file mode 100644
index 000000000000..e11fbd6fae78
--- /dev/null
+++ b/tools/scripts/Makefile.arch
@@ -0,0 +1,18 @@
+ifndef ARCH
+ARCH := $(shell uname -m 2>/dev/null || echo not)
+endif
+
+ARCH := $(shell echo $(ARCH) | sed -e s/i.86/x86/ -e s/x86_64/x86/ \
+ -e s/sun4u/sparc/ -e s/sparc64/sparc/ \
+ -e /arm64/!s/arm.*/arm/ -e s/sa110/arm/ \
+ -e s/s390x/s390/ -e s/parisc64/parisc/ \
+ -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
+ -e s/sh[234].*/sh/ -e s/aarch64.*/arm64/ \
+ -e s/tile.*/tile/ )
+
+LP64 := $(shell echo __LP64__ | ${CC} ${CFLAGS} -E -x c - | tail -n 1)
+ifeq ($(LP64), 1)
+ IS_64_BIT := 1
+else
+ IS_64_BIT := 0
+endif
--
2.1.0
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2016-01-12 00:40 +0100 |
| Subject | [PATCH 10/12] tools build: Add BPF feature check to test-all |
| Message-ID | <qPUe7-11z-31@gated-at.bofh.it> |
| In reply to | #1306825 |
From: Wang Nan <wangnan0@huawei.com>
The test-all.c file doesn't check BPF related features. For an
environment with all other features enabled, BPF would be considered
enabled without doing real feature check.
This patch adds test-bpf.c into test-all.c.
Signed-off-by: Wang Nan <wangnan0@huawei.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Zefan Li <lizefan@huawei.com>
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/r/1452520124-2073-11-git-send-email-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/build/feature/test-all.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tools/build/feature/test-all.c b/tools/build/feature/test-all.c
index 33cf6f20bd4e..81025cade45f 100644
--- a/tools/build/feature/test-all.c
+++ b/tools/build/feature/test-all.c
@@ -125,6 +125,10 @@
# include "test-get_cpuid.c"
#undef main
+#define main main_test_bpf
+# include "test-bpf.c"
+#undef main
+
int main(int argc, char *argv[])
{
main_test_libpython();
@@ -153,6 +157,7 @@ int main(int argc, char *argv[])
main_test_pthread_attr_setaffinity_np();
main_test_lzma();
main_test_get_cpuid();
+ main_test_bpf();
return 0;
}
--
2.1.0
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2016-01-12 00:40 +0100 |
| Subject | [PATCH 04/12] perf tools: Add missing sources to perf's MANIFEST |
| Message-ID | <qPUe6-11z-19@gated-at.bofh.it> |
| In reply to | #1306825 |
From: Jiri Olsa <jolsa@redhat.com>
Adding missing bitmap.[ch] sources to the MANIFEST file. Fixes building
'make perf-*-src-pkg' generated tarballs.
Reported-by: Wang Nan <wangnan0@huawei.com>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Fixes: 915b0882c310 ("tools lib: Move bitmap.[ch] from tools/perf/ to tools/{lib,include}/")
Link: http://lkml.kernel.org/r/1452509693-13452-5-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/MANIFEST | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/perf/MANIFEST b/tools/perf/MANIFEST
index ddf922f93aa1..2e1fa2357528 100644
--- a/tools/perf/MANIFEST
+++ b/tools/perf/MANIFEST
@@ -28,6 +28,7 @@ tools/lib/string.c
tools/lib/symbol/kallsyms.c
tools/lib/symbol/kallsyms.h
tools/lib/find_bit.c
+tools/lib/bitmap.c
tools/include/asm/atomic.h
tools/include/asm/barrier.h
tools/include/asm/bug.h
@@ -57,6 +58,7 @@ tools/include/linux/rbtree_augmented.h
tools/include/linux/string.h
tools/include/linux/types.h
tools/include/linux/err.h
+tools/include/linux/bitmap.h
include/asm-generic/bitops/arch_hweight.h
include/asm-generic/bitops/const_hweight.h
include/asm-generic/bitops/fls64.h
--
2.1.0
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2016-01-12 00:40 +0100 |
| Subject | [PATCH 02/12] tools bpf: Add *.cmd files clean up |
| Message-ID | <qPUe7-11z-35@gated-at.bofh.it> |
| In reply to | #1306825 |
From: Jiri Olsa <jolsa@kernel.org> Add *.cmd files to be removed within clean target. Reported-and-Tested-by: Arnaldo Carvalho de Melo <acme@kernel.org> Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: David Ahern <dsahern@gmail.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/r/1452509693-13452-3-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- tools/lib/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile index 919b71780710..84e0e986ade4 100644 --- a/tools/lib/bpf/Makefile +++ b/tools/lib/bpf/Makefile @@ -192,7 +192,7 @@ config-clean: $(Q)$(MAKE) -C $(srctree)/tools/build/feature/ clean >/dev/null clean: - $(call QUIET_CLEAN, libbpf) $(RM) *.o *~ $(TARGETS) *.a *.so $(VERSION_FILES) .*.d \ + $(call QUIET_CLEAN, libbpf) $(RM) *.o *~ $(TARGETS) *.a *.so $(VERSION_FILES) .*.d .*.cmd \ $(RM) LIBBPF-CFLAGS $(call QUIET_CLEAN, core-gen) $(RM) $(OUTPUT)FEATURE-DUMP.libbpf -- 2.1.0
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2016-01-12 00:40 +0100 |
| Subject | [PATCH 03/12] tools lockdep: Add *.cmd files clean up |
| Message-ID | <qPUe7-11z-43@gated-at.bofh.it> |
| In reply to | #1306825 |
From: Jiri Olsa <jolsa@kernel.org> Add *.cmd files to be removed within clean target. Reported-by: Arnaldo Carvalho de Melo <acme@kernel.org> Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: David Ahern <dsahern@gmail.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/r/1452509693-13452-4-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- tools/lib/lockdep/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/lockdep/Makefile b/tools/lib/lockdep/Makefile index 7e319afac78a..90d2baeb621a 100644 --- a/tools/lib/lockdep/Makefile +++ b/tools/lib/lockdep/Makefile @@ -149,7 +149,7 @@ install_lib: all_cmd install: install_lib clean: - $(RM) *.o *~ $(TARGETS) *.a *liblockdep*.so* $(VERSION_FILES) .*.d + $(RM) *.o *~ $(TARGETS) *.a *liblockdep*.so* $(VERSION_FILES) .*.d .*.cmd $(RM) tags TAGS PHONY += force -- 2.1.0
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2016-01-12 00:40 +0100 |
| Subject | [PATCH 12/12] perf test: Reset err after using it hold errcode in hist testcases |
| Message-ID | <qPUe8-11z-57@gated-at.bofh.it> |
| In reply to | #1306825 |
From: Wang Nan <wangnan0@huawei.com> All hists test cases forget to reset err after using it to hold an error code. If error occure in setup_fake_machine() it incorrectly return TEST_OK. This patch fixes it. Suggested-and-Acked-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Wang Nan <wangnan0@huawei.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: Zefan Li <lizefan@huawei.com> Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1452520124-2073-13-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- tools/perf/tests/hists_cumulate.c | 1 + tools/perf/tests/hists_filter.c | 1 + tools/perf/tests/hists_link.c | 1 + tools/perf/tests/hists_output.c | 1 + 4 files changed, 4 insertions(+) diff --git a/tools/perf/tests/hists_cumulate.c b/tools/perf/tests/hists_cumulate.c index e36089212061..5e6a86e50fb9 100644 --- a/tools/perf/tests/hists_cumulate.c +++ b/tools/perf/tests/hists_cumulate.c @@ -706,6 +706,7 @@ int test__hists_cumulate(int subtest __maybe_unused) err = parse_events(evlist, "cpu-clock", NULL); if (err) goto out; + err = TEST_FAIL; machines__init(&machines); diff --git a/tools/perf/tests/hists_filter.c b/tools/perf/tests/hists_filter.c index 2a784befd9ce..351a42463444 100644 --- a/tools/perf/tests/hists_filter.c +++ b/tools/perf/tests/hists_filter.c @@ -120,6 +120,7 @@ int test__hists_filter(int subtest __maybe_unused) err = parse_events(evlist, "task-clock", NULL); if (err) goto out; + err = TEST_FAIL; /* default sort order (comm,dso,sym) will be used */ if (setup_sorting(NULL) < 0) diff --git a/tools/perf/tests/hists_link.c b/tools/perf/tests/hists_link.c index c764d69ac6ef..64b257d8d557 100644 --- a/tools/perf/tests/hists_link.c +++ b/tools/perf/tests/hists_link.c @@ -293,6 +293,7 @@ int test__hists_link(int subtest __maybe_unused) if (err) goto out; + err = TEST_FAIL; /* default sort order (comm,dso,sym) will be used */ if (setup_sorting(NULL) < 0) goto out; diff --git a/tools/perf/tests/hists_output.c b/tools/perf/tests/hists_output.c index ebe6cd485b5d..b231265148d8 100644 --- a/tools/perf/tests/hists_output.c +++ b/tools/perf/tests/hists_output.c @@ -597,6 +597,7 @@ int test__hists_output(int subtest __maybe_unused) err = parse_events(evlist, "cpu-clock", NULL); if (err) goto out; + err = TEST_FAIL; machines__init(&machines); -- 2.1.0
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2016-01-12 00:40 +0100 |
| Subject | [PATCH 05/12] perf tools: Add -lutil in python lib list for broken python-config |
| Message-ID | <qPUe8-11z-61@gated-at.bofh.it> |
| In reply to | #1306825 |
From: Wang Nan <wangnan0@huawei.com>
On some system the perf-config is broken, causes link failure like this:
/usr/lib64/python2.7/config/libpython2.7.a(posixmodule.o): In function `posix_forkpty':
/opt/wangnan/yocto-build/tmp-eglibc/work/x86_64-oe-linux/python/2.7.3-r0.3.1/Python-2.7.3/./Modules/posixmodule.c:3816: undefined reference to `forkpty'
/usr/lib64/python2.7/config/libpython2.7.a(posixmodule.o): In function `posix_openpty':
/opt/wangnan/yocto-build/tmp-eglibc/work/x86_64-oe-linux/python/2.7.3-r0.3.1/Python-2.7.3/./Modules/posixmodule.c:3756: undefined reference to `openpty'
collect2: error: ld returned 1 exit status
make[1]: *** [/home/wangnan/kernel-hydrogen/tools/perf/out/perf] Error 1
make: *** [all] Error 2
$ python-config --libs
-lpthread -ldl -lpthread -lutil -lm -lpython2.7
In this case a '-lutil' should be appended to -lpython2.7.
(I know we have --start-group and --end-group. I can see them in command
line of collect2 by strace. However it doesn't work. Seems I have a
broken environment?)
Signed-off-by: Wang Nan <wangnan0@huawei.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Zefan Li <lizefan@huawei.com>
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/r/1452520124-2073-2-git-send-email-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/config/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index 254d06e39bea..0793c7654858 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -493,7 +493,7 @@ else
PYTHON_EMBED_LDOPTS := $(shell $(PYTHON_CONFIG_SQ) --ldflags 2>/dev/null)
PYTHON_EMBED_LDFLAGS := $(call strip-libs,$(PYTHON_EMBED_LDOPTS))
- PYTHON_EMBED_LIBADD := $(call grep-libs,$(PYTHON_EMBED_LDOPTS))
+ PYTHON_EMBED_LIBADD := $(call grep-libs,$(PYTHON_EMBED_LDOPTS)) -lutil
PYTHON_EMBED_CCOPTS := $(shell $(PYTHON_CONFIG_SQ) --cflags 2>/dev/null)
FLAGS_PYTHON_EMBED := $(PYTHON_EMBED_CCOPTS) $(PYTHON_EMBED_LDOPTS)
--
2.1.0
[toc] | [prev] | [next] | [standalone]
| From | Ingo Molnar <mingo@kernel.org> |
|---|---|
| Date | 2016-01-12 11:10 +0100 |
| Message-ID | <qQ43M-7TO-23@gated-at.bofh.it> |
| In reply to | #1306825 |
* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> Hi Ingo,
>
> Please consider pulling,
>
> - Arnaldo
>
> The following changes since commit 3eb9ede23bdd96e9ba60e2b4d4d17a7c35d58448:
>
> Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-01-09 17:17:33 +0100)
>
> are available in the git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo
>
> for you to fetch changes up to b0500c169b4069e40f03391c7280cd6eaf849e49:
>
> perf test: Reset err after using it hold errcode in hist testcases (2016-01-11 19:22:22 -0300)
>
> ----------------------------------------------------------------
> perf/core fixes:
>
> Developer stuff:
>
> - Fix a few clean targets in tools/ (Jiri Olsa)
>
> - Add missing sources to perf's MANIFEST, fixing the out of tree build with
> 'make perf-tar*-src-pkg' tarballs (Jiri Olsa)
>
> - Fix bpf related build problems in PowerPC (Naveen N. Rao, Wang Nan)
>
> - 'make -C tools/perf build-test' fixes (Wang Nan)
>
> - Fix 'perf test hist' entry (Wang Nan)
>
> - Add BPF feature check to test-all, as in an environment with all other
> features enabled, BPF would be considered enabled without doing real
> feature check. (Wang Nan)
>
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
>
> ----------------------------------------------------------------
> Jiri Olsa (4):
> tools: Add clean targets for tools directory
> tools bpf: Add *.cmd files clean up
> tools lockdep: Add *.cmd files clean up
> perf tools: Add missing sources to perf's MANIFEST
>
> Naveen N. Rao (1):
> perf bpf: Fix build breakage due to libbpf
>
> Wang Nan (7):
> perf tools: Add -lutil in python lib list for broken python-config
> perf tools: Fix phony build target for build-test
> perf tools: Fix PowerPC native building
> tools: Move Makefile.arch from perf/config to tools/scripts
> tools build: Add BPF feature check to test-all
> perf test: Fix false TEST_OK result for 'perf test hist'
> perf test: Reset err after using it hold errcode in hist testcases
>
> tools/Makefile | 11 ++++++++++-
> tools/build/feature/test-all.c | 5 +++++
> tools/build/feature/test-bpf.c | 20 +++++++++++++++++++-
> tools/lib/bpf/Makefile | 18 +++++++++---------
> tools/lib/bpf/bpf.c | 4 ++--
> tools/lib/lockdep/Makefile | 2 +-
> tools/perf/MANIFEST | 2 ++
> tools/perf/config/Makefile | 4 ++--
> tools/perf/tests/hists_common.c | 5 -----
> tools/perf/tests/hists_cumulate.c | 1 +
> tools/perf/tests/hists_filter.c | 1 +
> tools/perf/tests/hists_link.c | 1 +
> tools/perf/tests/hists_output.c | 1 +
> tools/perf/tests/make | 18 ++++++++++++++++--
> tools/{perf/config => scripts}/Makefile.arch | 0
> 15 files changed, 70 insertions(+), 23 deletions(-)
> rename tools/{perf/config => scripts}/Makefile.arch (100%)
Pulled into tip:perf/urgent, thanks a lot Arnaldo!
Ingo
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web