Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1535709 > unrolled thread
| Started by | Jiri Olsa <jolsa@kernel.org> |
|---|---|
| First post | 2016-12-04 21:50 +0100 |
| Last post | 2016-12-06 09:30 +0100 |
| Articles | 16 — 4 participants |
Back to article view | Back to linux.kernel
[PATCH 0/7] perf tools: Force fixdep to be built first Jiri Olsa <jolsa@kernel.org> - 2016-12-04 21:50 +0100
[PATCH 3/7] perf tools: Move install-gtk target into rules area Jiri Olsa <jolsa@kernel.org> - 2016-12-04 21:50 +0100
[tip:perf/core] perf tools: Move install-gtk target into rules area tip-bot for Jiri Olsa <tipbot@zytor.com> - 2016-12-06 09:30 +0100
[PATCH 6/7] perf tools: Add non config targets Jiri Olsa <jolsa@kernel.org> - 2016-12-04 21:50 +0100
[tip:perf/core] perf tools: Add non config targets tip-bot for Jiri Olsa <tipbot@zytor.com> - 2016-12-06 09:40 +0100
[PATCH 1/7] tools build: Make the .cmd file more readable Jiri Olsa <jolsa@kernel.org> - 2016-12-04 21:50 +0100
[tip:perf/core] tools build: Make the .cmd file more readable tip-bot for Jiri Olsa <tipbot@zytor.com> - 2016-12-06 09:50 +0100
[PATCH 2/7] tools build: Move tabs to spaces where suitable Jiri Olsa <jolsa@kernel.org> - 2016-12-04 21:50 +0100
[tip:perf/core] tools build: Move tabs to spaces where suitable tip-bot for Jiri Olsa <tipbot@zytor.com> - 2016-12-06 09:30 +0100
[PATCH 5/7] perf tools: Force fixdep compilation at the start of the build Jiri Olsa <jolsa@kernel.org> - 2016-12-04 21:50 +0100
Re: [PATCH 5/7] perf tools: Force fixdep compilation at the start of the build Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-12-05 21:10 +0100
Re: [PATCH 5/7] perf tools: Force fixdep compilation at the start of the build Jiri Olsa <jolsa@redhat.com> - 2016-12-06 11:50 +0100
[PATCH 7/7] perf tools: Cleanup build directory before each test Jiri Olsa <jolsa@kernel.org> - 2016-12-04 21:50 +0100
[tip:perf/core] perf tools: Cleanup build directory before each test tip-bot for Jiri Olsa <tipbot@zytor.com> - 2016-12-06 09:30 +0100
[PATCH 4/7] perf tools: Move python/perf.so target into rules area Jiri Olsa <jolsa@kernel.org> - 2016-12-04 21:50 +0100
[tip:perf/core] perf tools: Move python/perf.so target into rules area tip-bot for Jiri Olsa <tipbot@zytor.com> - 2016-12-06 09:30 +0100
| From | Jiri Olsa <jolsa@kernel.org> |
|---|---|
| Date | 2016-12-04 21:50 +0100 |
| Subject | [PATCH 0/7] perf tools: Force fixdep to be built first |
| Message-ID | <sKLTr-3vB-1@gated-at.bofh.it> |
hi,
changing Makefile.perf to force building fixdep before everything
else, in order to avoid fixdep build races due to forgotten dependencies.
And some build fixes that piled up around the fixdep change.
Available also here:
git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
perf/fixes
Arnaldo,
this is based on top of your acme/tmp.perf/fixdep branch.
thanks,
jirka
---
Jiri Olsa (7):
tools build: Make the .cmd file more readable
tools build: Move tabs to spaces where suitable
perf tools: Move install-gtk target into rules area
perf tools: Move python/perf.so target into rules area
perf tools: Force fixdep compilation at the start of the build
perf tools: Add non config targets
perf tools: Cleanup build directory before each test
tools/build/Build.include | 14 +++++------
tools/build/Makefile.feature | 138 +++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------------------------
tools/build/feature/Makefile | 102 +++++++++++++++++++++++++++++++++++++--------------------------------------
tools/perf/Makefile.perf | 87 ++++++++++++++++++++++++++++++++++++++++++----------------------
tools/perf/tests/make | 2 +-
5 files changed, 186 insertions(+), 157 deletions(-)
[toc] | [next] | [standalone]
| From | Jiri Olsa <jolsa@kernel.org> |
|---|---|
| Date | 2016-12-04 21:50 +0100 |
| Subject | [PATCH 3/7] perf tools: Move install-gtk target into rules area |
| Message-ID | <sKLTr-3vB-3@gated-at.bofh.it> |
| In reply to | #1535709 |
Following fixdep fix needs all targets at the same area, so they'll fit under signal condition block. Moving install-gtk target into rules section. Link: http://lkml.kernel.org/n/tip-0xk7ca6fdvv6jg71lp40yj5x@git.kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.org> --- tools/perf/Makefile.perf | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 3cb1df43ad3e..2e95456108d7 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -325,11 +325,6 @@ endif ifndef NO_GTK2 ALL_PROGRAMS += $(OUTPUT)libperf-gtk.so GTK_IN := $(OUTPUT)gtk-in.o - -install-gtk: $(OUTPUT)libperf-gtk.so - $(call QUIET_INSTALL, 'GTK UI') \ - $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(libdir_SQ)'; \ - $(INSTALL) $(OUTPUT)libperf-gtk.so '$(DESTDIR_SQ)$(libdir_SQ)' endif ifdef ASCIIDOC8 @@ -691,7 +686,14 @@ check: $(OUTPUT)common-cmds.h ### Installation rules +ifndef NO_GTK2 +install-gtk: $(OUTPUT)libperf-gtk.so + $(call QUIET_INSTALL, 'GTK UI') \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(libdir_SQ)'; \ + $(INSTALL) $(OUTPUT)libperf-gtk.so '$(DESTDIR_SQ)$(libdir_SQ)' +else install-gtk: +endif install-tools: all install-gtk $(call QUIET_INSTALL, binaries) \ -- 2.7.4
[toc] | [prev] | [next] | [standalone]
| From | tip-bot for Jiri Olsa <tipbot@zytor.com> |
|---|---|
| Date | 2016-12-06 09:30 +0100 |
| Subject | [tip:perf/core] perf tools: Move install-gtk target into rules area |
| Message-ID | <sLjiq-84n-25@gated-at.bofh.it> |
| In reply to | #1535710 |
Commit-ID: 5c319a67b13da8323ec7bdb8d2ea729eb8a20735 Gitweb: http://git.kernel.org/tip/5c319a67b13da8323ec7bdb8d2ea729eb8a20735 Author: Jiri Olsa <jolsa@kernel.org> AuthorDate: Sun, 4 Dec 2016 21:42:54 +0100 Committer: Arnaldo Carvalho de Melo <acme@redhat.com> CommitDate: Mon, 5 Dec 2016 16:06:50 -0300 perf tools: Move install-gtk target into rules area The upcoming fixdep fix needs all targets at the same area, so they'll fit under a signal condition block. Move install-gtk target into the rules section. 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> Link: http://lkml.kernel.org/r/1480884178-8072-4-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- tools/perf/Makefile.perf | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index dfb20dd..593d765 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -331,11 +331,6 @@ endif ifndef NO_GTK2 ALL_PROGRAMS += $(OUTPUT)libperf-gtk.so GTK_IN := $(OUTPUT)gtk-in.o - -install-gtk: $(OUTPUT)libperf-gtk.so - $(call QUIET_INSTALL, 'GTK UI') \ - $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(libdir_SQ)'; \ - $(INSTALL) $(OUTPUT)libperf-gtk.so '$(DESTDIR_SQ)$(libdir_SQ)' endif ifdef ASCIIDOC8 @@ -712,7 +707,14 @@ check: $(OUTPUT)common-cmds.h ### Installation rules +ifndef NO_GTK2 +install-gtk: $(OUTPUT)libperf-gtk.so + $(call QUIET_INSTALL, 'GTK UI') \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(libdir_SQ)'; \ + $(INSTALL) $(OUTPUT)libperf-gtk.so '$(DESTDIR_SQ)$(libdir_SQ)' +else install-gtk: +endif install-tools: all install-gtk $(call QUIET_INSTALL, binaries) \
[toc] | [prev] | [next] | [standalone]
| From | Jiri Olsa <jolsa@kernel.org> |
|---|---|
| Date | 2016-12-04 21:50 +0100 |
| Subject | [PATCH 6/7] perf tools: Add non config targets |
| Message-ID | <sKLTr-3vB-9@gated-at.bofh.it> |
| In reply to | #1535709 |
Adding some missing non config targets that were for some reason omitted. Link: http://lkml.kernel.org/n/tip-knevmrvnm2xo63xzm932bjry@git.kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.org> --- tools/perf/Makefile.perf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 25d9d6653746..d752b6685e57 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -171,7 +171,7 @@ SUBCMD_DIR = $(srctree)/tools/lib/subcmd/ # non-config cases config := 1 -NON_CONFIG_TARGETS := clean TAGS tags cscope help install-doc +NON_CONFIG_TARGETS := clean TAGS tags cscope help install-doc install-man install-html install-info install-pdf doc man html info pdf ifdef MAKECMDGOALS ifeq ($(filter-out $(NON_CONFIG_TARGETS),$(MAKECMDGOALS)),) -- 2.7.4
[toc] | [prev] | [next] | [standalone]
| From | tip-bot for Jiri Olsa <tipbot@zytor.com> |
|---|---|
| Date | 2016-12-06 09:40 +0100 |
| Subject | [tip:perf/core] perf tools: Add non config targets |
| Message-ID | <sLjs6-87p-19@gated-at.bofh.it> |
| In reply to | #1535711 |
Commit-ID: d4dcadec43def7b2a4a4c1cae7d727c17d2f25c5 Gitweb: http://git.kernel.org/tip/d4dcadec43def7b2a4a4c1cae7d727c17d2f25c5 Author: Jiri Olsa <jolsa@kernel.org> AuthorDate: Sun, 4 Dec 2016 21:42:57 +0100 Committer: Arnaldo Carvalho de Melo <acme@redhat.com> CommitDate: Mon, 5 Dec 2016 16:18:49 -0300 perf tools: Add non config targets Adding some missing non config targets that were for some reason omitted. 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> Link: http://lkml.kernel.org/r/1480884178-8072-7-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- tools/perf/Makefile.perf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 2784b58..10495c9 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -177,7 +177,7 @@ SUBCMD_DIR = $(srctree)/tools/lib/subcmd/ # non-config cases config := 1 -NON_CONFIG_TARGETS := clean TAGS tags cscope help install-doc +NON_CONFIG_TARGETS := clean TAGS tags cscope help install-doc install-man install-html install-info install-pdf doc man html info pdf ifdef MAKECMDGOALS ifeq ($(filter-out $(NON_CONFIG_TARGETS),$(MAKECMDGOALS)),)
[toc] | [prev] | [next] | [standalone]
| From | Jiri Olsa <jolsa@kernel.org> |
|---|---|
| Date | 2016-12-04 21:50 +0100 |
| Subject | [PATCH 1/7] tools build: Make the .cmd file more readable |
| Message-ID | <sKLTr-3vB-11@gated-at.bofh.it> |
| In reply to | #1535709 |
Putting extra line between dependencies and cmd_* definition
to make it more readable.
Before:
$ cat .builtin-top.o.cmd
...
/home/jolsa/kernel/linux-perf/tools/include/linux/stringify.h \
/home/jolsa/kernel/linux-perf/tools/include/linux/time64.h
cmd_builtin-top.o := gcc -Wp,-MD,./.builtin-top.o.d -Wp,-MT,builtin-...
...
After:
$ cat .builtin-top.o.cmd
...
/home/jolsa/kernel/linux-perf/tools/include/linux/stringify.h \
/home/jolsa/kernel/linux-perf/tools/include/linux/time64.h
cmd_builtin-top.o := gcc -Wp,-MD,./.builtin-top.o.d -Wp,-MT,builtin-...
...
Link: http://lkml.kernel.org/n/tip-4kuibvf3v9qqae1rbwv8py6a@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
tools/build/Build.include | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/build/Build.include b/tools/build/Build.include
index 62dcf0c7aac2..475152c52871 100644
--- a/tools/build/Build.include
+++ b/tools/build/Build.include
@@ -65,7 +65,7 @@ dep-cmd = $(if $(wildcard $(fixdep)),
printf '\# cannot find fixdep (%s)\n' $(fixdep) > $(dot-target).cmd; \
printf '\# using basic dep data\n\n' >> $(dot-target).cmd; \
cat $(depfile) >> $(dot-target).cmd; \
- printf '%s\n' 'cmd_$@ := $(make-cmd)' >> $(dot-target).cmd)
+ printf '\n%s\n' 'cmd_$@ := $(make-cmd)' >> $(dot-target).cmd)
###
# if_changed_dep - execute command if any prerequisite is newer than
--
2.7.4
[toc] | [prev] | [next] | [standalone]
| From | tip-bot for Jiri Olsa <tipbot@zytor.com> |
|---|---|
| Date | 2016-12-06 09:50 +0100 |
| Subject | [tip:perf/core] tools build: Make the .cmd file more readable |
| Message-ID | <sLjBL-8aU-29@gated-at.bofh.it> |
| In reply to | #1535712 |
Commit-ID: a5ba0a1a5af312c4b4bfe78dc054d832103ec27d
Gitweb: http://git.kernel.org/tip/a5ba0a1a5af312c4b4bfe78dc054d832103ec27d
Author: Jiri Olsa <jolsa@kernel.org>
AuthorDate: Sun, 4 Dec 2016 21:42:52 +0100
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 5 Dec 2016 16:04:08 -0300
tools build: Make the .cmd file more readable
Putting extra line between dependencies and cmd_* definition
to make it more readable.
Before:
$ cat .builtin-top.o.cmd
...
/home/jolsa/kernel/linux-perf/tools/include/linux/stringify.h \
/home/jolsa/kernel/linux-perf/tools/include/linux/time64.h
cmd_builtin-top.o := gcc -Wp,-MD,./.builtin-top.o.d -Wp,-MT,builtin-...
...
After:
$ cat .builtin-top.o.cmd
...
/home/jolsa/kernel/linux-perf/tools/include/linux/stringify.h \
/home/jolsa/kernel/linux-perf/tools/include/linux/time64.h
cmd_builtin-top.o := gcc -Wp,-MD,./.builtin-top.o.d -Wp,-MT,builtin-...
...
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>
Link: http://lkml.kernel.org/r/1480884178-8072-2-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/build/Build.include | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/build/Build.include b/tools/build/Build.include
index 62dcf0c..475152c 100644
--- a/tools/build/Build.include
+++ b/tools/build/Build.include
@@ -65,7 +65,7 @@ dep-cmd = $(if $(wildcard $(fixdep)),
printf '\# cannot find fixdep (%s)\n' $(fixdep) > $(dot-target).cmd; \
printf '\# using basic dep data\n\n' >> $(dot-target).cmd; \
cat $(depfile) >> $(dot-target).cmd; \
- printf '%s\n' 'cmd_$@ := $(make-cmd)' >> $(dot-target).cmd)
+ printf '\n%s\n' 'cmd_$@ := $(make-cmd)' >> $(dot-target).cmd)
###
# if_changed_dep - execute command if any prerequisite is newer than
[toc] | [prev] | [next] | [standalone]
| From | Jiri Olsa <jolsa@kernel.org> |
|---|---|
| Date | 2016-12-04 21:50 +0100 |
| Subject | [PATCH 2/7] tools build: Move tabs to spaces where suitable |
| Message-ID | <sKLTr-3vB-17@gated-at.bofh.it> |
| In reply to | #1535709 |
We've been hit several times with Makefile bug where line indented by tab was falsely considered as target command. We prevent this to use always space indentation for everything except the target commands. Link: http://lkml.kernel.org/n/tip-hxo9kg6geiw8hnyte7kgp04c@git.kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.org> --- tools/build/Build.include | 12 ++-- tools/build/Makefile.feature | 138 +++++++++++++++++++++---------------------- tools/build/feature/Makefile | 102 ++++++++++++++++---------------- 3 files changed, 126 insertions(+), 126 deletions(-) diff --git a/tools/build/Build.include b/tools/build/Build.include index 475152c52871..418871d02ebf 100644 --- a/tools/build/Build.include +++ b/tools/build/Build.include @@ -72,15 +72,15 @@ dep-cmd = $(if $(wildcard $(fixdep)), # target, or command line has changed and update # dependencies in the cmd file if_changed_dep = $(if $(strip $(any-prereq) $(arg-check)), \ - @set -e; \ - $(echo-cmd) $(cmd_$(1)) && $(dep-cmd)) + @set -e; \ + $(echo-cmd) $(cmd_$(1)) && $(dep-cmd)) # if_changed - execute command if any prerequisite is newer than # target, or command line has changed -if_changed = $(if $(strip $(any-prereq) $(arg-check)), \ - @set -e; \ - $(echo-cmd) $(cmd_$(1)); \ - printf '%s\n' 'cmd_$@ := $(make-cmd)' > $(dot-target).cmd) +if_changed = $(if $(strip $(any-prereq) $(arg-check)), \ + @set -e; \ + $(echo-cmd) $(cmd_$(1)); \ + printf '%s\n' 'cmd_$@ := $(make-cmd)' > $(dot-target).cmd) ### # C flags to be used in rule definitions, includes: diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature index ae52e029dd22..e3fb5ecbdcb6 100644 --- a/tools/build/Makefile.feature +++ b/tools/build/Makefile.feature @@ -27,58 +27,58 @@ endef # the rule that uses them - an example for that is the 'bionic' # feature check. ] # -FEATURE_TESTS_BASIC := \ - backtrace \ - dwarf \ - dwarf_getlocations \ - fortify-source \ - sync-compare-and-swap \ - glibc \ - gtk2 \ - gtk2-infobar \ - libaudit \ - libbfd \ - libelf \ - libelf-getphdrnum \ - libelf-gelf_getnote \ - libelf-getshdrstrndx \ - libelf-mmap \ - libnuma \ - numa_num_possible_cpus \ - libperl \ - libpython \ - libpython-version \ - libslang \ - libcrypto \ - libunwind \ - libunwind-x86 \ - libunwind-x86_64 \ - libunwind-arm \ - libunwind-aarch64 \ - pthread-attr-setaffinity-np \ - stackprotector-all \ - timerfd \ - libdw-dwarf-unwind \ - zlib \ - lzma \ - get_cpuid \ - bpf \ - sdt +FEATURE_TESTS_BASIC := \ + backtrace \ + dwarf \ + dwarf_getlocations \ + fortify-source \ + sync-compare-and-swap \ + glibc \ + gtk2 \ + gtk2-infobar \ + libaudit \ + libbfd \ + libelf \ + libelf-getphdrnum \ + libelf-gelf_getnote \ + libelf-getshdrstrndx \ + libelf-mmap \ + libnuma \ + numa_num_possible_cpus \ + libperl \ + libpython \ + libpython-version \ + libslang \ + libcrypto \ + libunwind \ + libunwind-x86 \ + libunwind-x86_64 \ + libunwind-arm \ + libunwind-aarch64 \ + pthread-attr-setaffinity-np \ + stackprotector-all \ + timerfd \ + libdw-dwarf-unwind \ + zlib \ + lzma \ + get_cpuid \ + bpf \ + sdt # FEATURE_TESTS_BASIC + FEATURE_TESTS_EXTRA is the complete list # of all feature tests -FEATURE_TESTS_EXTRA := \ - bionic \ - compile-32 \ - compile-x32 \ - cplus-demangle \ - hello \ - libbabeltrace \ - liberty \ - liberty-z \ - libunwind-debug-frame \ - libunwind-debug-frame-arm \ - libunwind-debug-frame-aarch64 +FEATURE_TESTS_EXTRA := \ + bionic \ + compile-32 \ + compile-x32 \ + cplus-demangle \ + hello \ + libbabeltrace \ + liberty \ + liberty-z \ + libunwind-debug-frame \ + libunwind-debug-frame-arm \ + libunwind-debug-frame-aarch64 FEATURE_TESTS ?= $(FEATURE_TESTS_BASIC) @@ -86,26 +86,26 @@ ifeq ($(FEATURE_TESTS),all) FEATURE_TESTS := $(FEATURE_TESTS_BASIC) $(FEATURE_TESTS_EXTRA) endif -FEATURE_DISPLAY ?= \ - dwarf \ - dwarf_getlocations \ - glibc \ - gtk2 \ - libaudit \ - libbfd \ - libelf \ - libnuma \ - numa_num_possible_cpus \ - libperl \ - libpython \ - libslang \ - libcrypto \ - libunwind \ - libdw-dwarf-unwind \ - zlib \ - lzma \ - get_cpuid \ - bpf +FEATURE_DISPLAY ?= \ + dwarf \ + dwarf_getlocations \ + glibc \ + gtk2 \ + libaudit \ + libbfd \ + libelf \ + libnuma \ + numa_num_possible_cpus \ + libperl \ + libpython \ + libslang \ + libcrypto \ + libunwind \ + libdw-dwarf-unwind \ + zlib \ + lzma \ + get_cpuid \ + bpf # 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 8f668bce8996..c6a34c8eaa20 100644 --- a/tools/build/feature/Makefile +++ b/tools/build/feature/Makefile @@ -1,54 +1,54 @@ -FILES= \ - test-all.bin \ - test-backtrace.bin \ - test-bionic.bin \ - test-dwarf.bin \ - test-dwarf_getlocations.bin \ - test-fortify-source.bin \ - test-sync-compare-and-swap.bin \ - test-glibc.bin \ - test-gtk2.bin \ - test-gtk2-infobar.bin \ - test-hello.bin \ - test-libaudit.bin \ - test-libbfd.bin \ - test-liberty.bin \ - test-liberty-z.bin \ - test-cplus-demangle.bin \ - test-libelf.bin \ - test-libelf-getphdrnum.bin \ - test-libelf-gelf_getnote.bin \ - test-libelf-getshdrstrndx.bin \ - test-libelf-mmap.bin \ - test-libnuma.bin \ - test-numa_num_possible_cpus.bin \ - test-libperl.bin \ - test-libpython.bin \ - test-libpython-version.bin \ - test-libslang.bin \ - test-libcrypto.bin \ - test-libunwind.bin \ - test-libunwind-debug-frame.bin \ - test-libunwind-x86.bin \ - test-libunwind-x86_64.bin \ - test-libunwind-arm.bin \ - test-libunwind-aarch64.bin \ - test-libunwind-debug-frame-arm.bin \ - test-libunwind-debug-frame-aarch64.bin \ - test-pthread-attr-setaffinity-np.bin \ - test-stackprotector-all.bin \ - test-timerfd.bin \ - test-libdw-dwarf-unwind.bin \ - test-libbabeltrace.bin \ - test-compile-32.bin \ - test-compile-x32.bin \ - test-zlib.bin \ - test-lzma.bin \ - test-bpf.bin \ - test-get_cpuid.bin \ - test-sdt.bin \ - test-cxx.bin \ - test-jvmti.bin +FILES= \ + test-all.bin \ + test-backtrace.bin \ + test-bionic.bin \ + test-dwarf.bin \ + test-dwarf_getlocations.bin \ + test-fortify-source.bin \ + test-sync-compare-and-swap.bin \ + test-glibc.bin \ + test-gtk2.bin \ + test-gtk2-infobar.bin \ + test-hello.bin \ + test-libaudit.bin \ + test-libbfd.bin \ + test-liberty.bin \ + test-liberty-z.bin \ + test-cplus-demangle.bin \ + test-libelf.bin \ + test-libelf-getphdrnum.bin \ + test-libelf-gelf_getnote.bin \ + test-libelf-getshdrstrndx.bin \ + test-libelf-mmap.bin \ + test-libnuma.bin \ + test-numa_num_possible_cpus.bin \ + test-libperl.bin \ + test-libpython.bin \ + test-libpython-version.bin \ + test-libslang.bin \ + test-libcrypto.bin \ + test-libunwind.bin \ + test-libunwind-debug-frame.bin \ + test-libunwind-x86.bin \ + test-libunwind-x86_64.bin \ + test-libunwind-arm.bin \ + test-libunwind-aarch64.bin \ + test-libunwind-debug-frame-arm.bin \ + test-libunwind-debug-frame-aarch64.bin \ + test-pthread-attr-setaffinity-np.bin \ + test-stackprotector-all.bin \ + test-timerfd.bin \ + test-libdw-dwarf-unwind.bin \ + test-libbabeltrace.bin \ + test-compile-32.bin \ + test-compile-x32.bin \ + test-zlib.bin \ + test-lzma.bin \ + test-bpf.bin \ + test-get_cpuid.bin \ + test-sdt.bin \ + test-cxx.bin \ + test-jvmti.bin FILES := $(addprefix $(OUTPUT),$(FILES)) -- 2.7.4
[toc] | [prev] | [next] | [standalone]
| From | tip-bot for Jiri Olsa <tipbot@zytor.com> |
|---|---|
| Date | 2016-12-06 09:30 +0100 |
| Subject | [tip:perf/core] tools build: Move tabs to spaces where suitable |
| Message-ID | <sLjiq-84n-23@gated-at.bofh.it> |
| In reply to | #1535713 |
Commit-ID: 2fedf79b69cf05b7e8e82a42d749c621155dd812 Gitweb: http://git.kernel.org/tip/2fedf79b69cf05b7e8e82a42d749c621155dd812 Author: Jiri Olsa <jolsa@kernel.org> AuthorDate: Sun, 4 Dec 2016 21:42:53 +0100 Committer: Arnaldo Carvalho de Melo <acme@redhat.com> CommitDate: Mon, 5 Dec 2016 16:06:03 -0300 tools build: Move tabs to spaces where suitable We've been hit several times by a Makefile bug where line indented by tab was falsely considered as target command. We prevent this by always using space indentation for everything except for the target commands. 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> Link: http://lkml.kernel.org/r/1480884178-8072-3-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- tools/build/Build.include | 12 ++-- tools/build/Makefile.feature | 138 +++++++++++++++++++++---------------------- tools/build/feature/Makefile | 102 ++++++++++++++++---------------- 3 files changed, 126 insertions(+), 126 deletions(-) diff --git a/tools/build/Build.include b/tools/build/Build.include index 475152c..418871d 100644 --- a/tools/build/Build.include +++ b/tools/build/Build.include @@ -72,15 +72,15 @@ dep-cmd = $(if $(wildcard $(fixdep)), # target, or command line has changed and update # dependencies in the cmd file if_changed_dep = $(if $(strip $(any-prereq) $(arg-check)), \ - @set -e; \ - $(echo-cmd) $(cmd_$(1)) && $(dep-cmd)) + @set -e; \ + $(echo-cmd) $(cmd_$(1)) && $(dep-cmd)) # if_changed - execute command if any prerequisite is newer than # target, or command line has changed -if_changed = $(if $(strip $(any-prereq) $(arg-check)), \ - @set -e; \ - $(echo-cmd) $(cmd_$(1)); \ - printf '%s\n' 'cmd_$@ := $(make-cmd)' > $(dot-target).cmd) +if_changed = $(if $(strip $(any-prereq) $(arg-check)), \ + @set -e; \ + $(echo-cmd) $(cmd_$(1)); \ + printf '%s\n' 'cmd_$@ := $(make-cmd)' > $(dot-target).cmd) ### # C flags to be used in rule definitions, includes: diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature index ae52e02..e3fb5ec 100644 --- a/tools/build/Makefile.feature +++ b/tools/build/Makefile.feature @@ -27,58 +27,58 @@ endef # the rule that uses them - an example for that is the 'bionic' # feature check. ] # -FEATURE_TESTS_BASIC := \ - backtrace \ - dwarf \ - dwarf_getlocations \ - fortify-source \ - sync-compare-and-swap \ - glibc \ - gtk2 \ - gtk2-infobar \ - libaudit \ - libbfd \ - libelf \ - libelf-getphdrnum \ - libelf-gelf_getnote \ - libelf-getshdrstrndx \ - libelf-mmap \ - libnuma \ - numa_num_possible_cpus \ - libperl \ - libpython \ - libpython-version \ - libslang \ - libcrypto \ - libunwind \ - libunwind-x86 \ - libunwind-x86_64 \ - libunwind-arm \ - libunwind-aarch64 \ - pthread-attr-setaffinity-np \ - stackprotector-all \ - timerfd \ - libdw-dwarf-unwind \ - zlib \ - lzma \ - get_cpuid \ - bpf \ - sdt +FEATURE_TESTS_BASIC := \ + backtrace \ + dwarf \ + dwarf_getlocations \ + fortify-source \ + sync-compare-and-swap \ + glibc \ + gtk2 \ + gtk2-infobar \ + libaudit \ + libbfd \ + libelf \ + libelf-getphdrnum \ + libelf-gelf_getnote \ + libelf-getshdrstrndx \ + libelf-mmap \ + libnuma \ + numa_num_possible_cpus \ + libperl \ + libpython \ + libpython-version \ + libslang \ + libcrypto \ + libunwind \ + libunwind-x86 \ + libunwind-x86_64 \ + libunwind-arm \ + libunwind-aarch64 \ + pthread-attr-setaffinity-np \ + stackprotector-all \ + timerfd \ + libdw-dwarf-unwind \ + zlib \ + lzma \ + get_cpuid \ + bpf \ + sdt # FEATURE_TESTS_BASIC + FEATURE_TESTS_EXTRA is the complete list # of all feature tests -FEATURE_TESTS_EXTRA := \ - bionic \ - compile-32 \ - compile-x32 \ - cplus-demangle \ - hello \ - libbabeltrace \ - liberty \ - liberty-z \ - libunwind-debug-frame \ - libunwind-debug-frame-arm \ - libunwind-debug-frame-aarch64 +FEATURE_TESTS_EXTRA := \ + bionic \ + compile-32 \ + compile-x32 \ + cplus-demangle \ + hello \ + libbabeltrace \ + liberty \ + liberty-z \ + libunwind-debug-frame \ + libunwind-debug-frame-arm \ + libunwind-debug-frame-aarch64 FEATURE_TESTS ?= $(FEATURE_TESTS_BASIC) @@ -86,26 +86,26 @@ ifeq ($(FEATURE_TESTS),all) FEATURE_TESTS := $(FEATURE_TESTS_BASIC) $(FEATURE_TESTS_EXTRA) endif -FEATURE_DISPLAY ?= \ - dwarf \ - dwarf_getlocations \ - glibc \ - gtk2 \ - libaudit \ - libbfd \ - libelf \ - libnuma \ - numa_num_possible_cpus \ - libperl \ - libpython \ - libslang \ - libcrypto \ - libunwind \ - libdw-dwarf-unwind \ - zlib \ - lzma \ - get_cpuid \ - bpf +FEATURE_DISPLAY ?= \ + dwarf \ + dwarf_getlocations \ + glibc \ + gtk2 \ + libaudit \ + libbfd \ + libelf \ + libnuma \ + numa_num_possible_cpus \ + libperl \ + libpython \ + libslang \ + libcrypto \ + libunwind \ + libdw-dwarf-unwind \ + zlib \ + lzma \ + get_cpuid \ + bpf # 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 871d553..303196c 100644 --- a/tools/build/feature/Makefile +++ b/tools/build/feature/Makefile @@ -1,54 +1,54 @@ -FILES= \ - test-all.bin \ - test-backtrace.bin \ - test-bionic.bin \ - test-dwarf.bin \ - test-dwarf_getlocations.bin \ - test-fortify-source.bin \ - test-sync-compare-and-swap.bin \ - test-glibc.bin \ - test-gtk2.bin \ - test-gtk2-infobar.bin \ - test-hello.bin \ - test-libaudit.bin \ - test-libbfd.bin \ - test-liberty.bin \ - test-liberty-z.bin \ - test-cplus-demangle.bin \ - test-libelf.bin \ - test-libelf-getphdrnum.bin \ - test-libelf-gelf_getnote.bin \ - test-libelf-getshdrstrndx.bin \ - test-libelf-mmap.bin \ - test-libnuma.bin \ - test-numa_num_possible_cpus.bin \ - test-libperl.bin \ - test-libpython.bin \ - test-libpython-version.bin \ - test-libslang.bin \ - test-libcrypto.bin \ - test-libunwind.bin \ - test-libunwind-debug-frame.bin \ - test-libunwind-x86.bin \ - test-libunwind-x86_64.bin \ - test-libunwind-arm.bin \ - test-libunwind-aarch64.bin \ - test-libunwind-debug-frame-arm.bin \ - test-libunwind-debug-frame-aarch64.bin \ - test-pthread-attr-setaffinity-np.bin \ - test-stackprotector-all.bin \ - test-timerfd.bin \ - test-libdw-dwarf-unwind.bin \ - test-libbabeltrace.bin \ - test-compile-32.bin \ - test-compile-x32.bin \ - test-zlib.bin \ - test-lzma.bin \ - test-bpf.bin \ - test-get_cpuid.bin \ - test-sdt.bin \ - test-cxx.bin \ - test-jvmti.bin +FILES= \ + test-all.bin \ + test-backtrace.bin \ + test-bionic.bin \ + test-dwarf.bin \ + test-dwarf_getlocations.bin \ + test-fortify-source.bin \ + test-sync-compare-and-swap.bin \ + test-glibc.bin \ + test-gtk2.bin \ + test-gtk2-infobar.bin \ + test-hello.bin \ + test-libaudit.bin \ + test-libbfd.bin \ + test-liberty.bin \ + test-liberty-z.bin \ + test-cplus-demangle.bin \ + test-libelf.bin \ + test-libelf-getphdrnum.bin \ + test-libelf-gelf_getnote.bin \ + test-libelf-getshdrstrndx.bin \ + test-libelf-mmap.bin \ + test-libnuma.bin \ + test-numa_num_possible_cpus.bin \ + test-libperl.bin \ + test-libpython.bin \ + test-libpython-version.bin \ + test-libslang.bin \ + test-libcrypto.bin \ + test-libunwind.bin \ + test-libunwind-debug-frame.bin \ + test-libunwind-x86.bin \ + test-libunwind-x86_64.bin \ + test-libunwind-arm.bin \ + test-libunwind-aarch64.bin \ + test-libunwind-debug-frame-arm.bin \ + test-libunwind-debug-frame-aarch64.bin \ + test-pthread-attr-setaffinity-np.bin \ + test-stackprotector-all.bin \ + test-timerfd.bin \ + test-libdw-dwarf-unwind.bin \ + test-libbabeltrace.bin \ + test-compile-32.bin \ + test-compile-x32.bin \ + test-zlib.bin \ + test-lzma.bin \ + test-bpf.bin \ + test-get_cpuid.bin \ + test-sdt.bin \ + test-cxx.bin \ + test-jvmti.bin FILES := $(addprefix $(OUTPUT),$(FILES))
[toc] | [prev] | [next] | [standalone]
| From | Jiri Olsa <jolsa@kernel.org> |
|---|---|
| Date | 2016-12-04 21:50 +0100 |
| Subject | [PATCH 5/7] perf tools: Force fixdep compilation at the start of the build |
| Message-ID | <sKLTs-3vB-33@gated-at.bofh.it> |
| In reply to | #1535709 |
The fixdep tool needs to be built before everything else, because it fixes every object dependency file. We handle this currently by making all objects to depend on fixdep, which is error prone and is easily forgotten when new object is added. Instead of this, this patch force fixdep tool to be built as the first target in the separate make session. This way we don't need to handle extra fixdep dependencies and we are certain there's no fixdep race with any parallel make job. Link: http://lkml.kernel.org/n/tip-b6wi5cssl8apu74o2kbfheag@git.kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.org> --- tools/perf/Makefile.perf | 54 +++++++++++++++++++++++++++++++++++++----------- 1 file changed, 42 insertions(+), 12 deletions(-) diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 112f4f7bb200..25d9d6653746 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -179,6 +179,27 @@ ifeq ($(filter-out $(NON_CONFIG_TARGETS),$(MAKECMDGOALS)),) endif endif +# The fixdep build - we force fixdep tool to be built as +# the first target in the separate make session not to be +# disturbed by any parallel make jobs. Once fixdep is done +# we issue the requested build with FIXDEP=1 variable. +# +# The fixdep build is disabled for $(NON_CONFIG_TARGETS) +# targets, because it's not necessary. + +ifdef FIXDEP + force_fixdep := 0 +else + force_fixdep := $(config) +endif + +# Disable config, we are forcing fixdep rule first +# and it does not need config data. + +ifeq ($(force_fixdep),1) + config := 0 +endif + # Set FEATURE_TESTS to 'all' so all possible feature checkers are executed. # Without this setting the output feature dump file misses some features, for # example, liberty. Select all checkers so we won't get an incomplete feature @@ -324,10 +345,22 @@ LIBS = -Wl,--whole-archive $(PERFLIBS) -Wl,--no-whole-archive -Wl,--start-group export INSTALL SHELL_PATH +export srctree OUTPUT RM CC LD AR CFLAGS V BISON FLEX AWK +export HOSTCC HOSTLD HOSTAR +include $(srctree)/tools/build/Makefile.include + ### Build rules SHELL = $(SHELL_PATH) +ifeq ($(force_fixdep),1) +goals := $(filter-out all sub-make, $(MAKECMDGOALS)) + +$(goals) all: sub-make + +sub-make: fixdep + $(Q)$(MAKE) FIXDEP=1 -f Makefile.perf $(goals) +else all: shell_compatibility_test $(ALL_PROGRAMS) $(LANG_BINDINGS) $(OTHER_PROGRAMS) $(OUTPUT)python/perf.so: $(PYTHON_EXT_SRCS) $(PYTHON_EXT_DEPS) $(LIBTRACEEVENT_DYNAMIC_LIST) @@ -348,10 +381,6 @@ strip: $(PROGRAMS) $(OUTPUT)perf PERF_IN := $(OUTPUT)perf-in.o -export srctree OUTPUT RM CC LD AR CFLAGS V BISON FLEX AWK -export HOSTCC HOSTLD HOSTAR -include $(srctree)/tools/build/Makefile.include - JEVENTS := $(OUTPUT)pmu-events/jevents JEVENTS_IN := $(OUTPUT)pmu-events/jevents-in.o @@ -470,7 +499,7 @@ $(OUTPUT)perf: $(PERFLIBS) $(PERF_IN) $(PMU_EVENTS_IN) $(LIBTRACEEVENT_DYNAMIC_L $(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $(LIBTRACEEVENT_DYNAMIC_LIST_LDFLAGS) \ $(PERF_IN) $(PMU_EVENTS_IN) $(LIBS) -o $@ -$(GTK_IN): fixdep FORCE +$(GTK_IN): FORCE $(Q)$(MAKE) $(build)=gtk $(OUTPUT)libperf-gtk.so: $(GTK_IN) $(PERFLIBS) @@ -515,7 +544,7 @@ endif __build-dir = $(subst $(OUTPUT),,$(dir $@)) build-dir = $(if $(__build-dir),$(__build-dir),.) -prepare: $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h fixdep archheaders +prepare: $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h archheaders $(OUTPUT)%.o: %.c prepare FORCE $(Q)$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=$(build-dir) $@ @@ -565,7 +594,7 @@ $(patsubst perf-%,%.o,$(PROGRAMS)): $(wildcard */*.h) LIBPERF_IN := $(OUTPUT)libperf-in.o -$(LIBPERF_IN): prepare fixdep FORCE +$(LIBPERF_IN): prepare FORCE $(Q)$(MAKE) $(build)=libperf $(LIB_FILE): $(LIBPERF_IN) @@ -573,10 +602,10 @@ $(LIB_FILE): $(LIBPERF_IN) LIBTRACEEVENT_FLAGS += plugin_dir=$(plugindir_SQ) -$(LIBTRACEEVENT): fixdep FORCE +$(LIBTRACEEVENT): FORCE $(Q)$(MAKE) -C $(TRACE_EVENT_DIR) $(LIBTRACEEVENT_FLAGS) O=$(OUTPUT) $(OUTPUT)libtraceevent.a -libtraceevent_plugins: fixdep FORCE +libtraceevent_plugins: FORCE $(Q)$(MAKE) -C $(TRACE_EVENT_DIR) $(LIBTRACEEVENT_FLAGS) O=$(OUTPUT) plugins $(LIBTRACEEVENT_DYNAMIC_LIST): libtraceevent_plugins @@ -589,21 +618,21 @@ $(LIBTRACEEVENT)-clean: install-traceevent-plugins: libtraceevent_plugins $(Q)$(MAKE) -C $(TRACE_EVENT_DIR) $(LIBTRACEEVENT_FLAGS) O=$(OUTPUT) install_plugins -$(LIBAPI): fixdep FORCE +$(LIBAPI): FORCE $(Q)$(MAKE) -C $(LIB_DIR) O=$(OUTPUT) $(OUTPUT)libapi.a $(LIBAPI)-clean: $(call QUIET_CLEAN, libapi) $(Q)$(MAKE) -C $(LIB_DIR) O=$(OUTPUT) clean >/dev/null -$(LIBBPF): fixdep FORCE +$(LIBBPF): FORCE $(Q)$(MAKE) -C $(BPF_DIR) O=$(OUTPUT) $(OUTPUT)libbpf.a FEATURES_DUMP=$(FEATURE_DUMP_EXPORT) $(LIBBPF)-clean: $(call QUIET_CLEAN, libbpf) $(Q)$(MAKE) -C $(BPF_DIR) O=$(OUTPUT) clean >/dev/null -$(LIBSUBCMD): fixdep FORCE +$(LIBSUBCMD): FORCE $(Q)$(MAKE) -C $(SUBCMD_DIR) O=$(OUTPUT) $(OUTPUT)libsubcmd.a $(LIBSUBCMD)-clean: @@ -811,3 +840,4 @@ FORCE: .PHONY: $(GIT-HEAD-PHONY) TAGS tags cscope FORCE prepare .PHONY: libtraceevent_plugins archheaders +endif # force_fixdep -- 2.7.4
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2016-12-05 21:10 +0100 |
| Subject | Re: [PATCH 5/7] perf tools: Force fixdep compilation at the start of the build |
| Message-ID | <sL7Ki-Dr-17@gated-at.bofh.it> |
| In reply to | #1535714 |
Em Sun, Dec 04, 2016 at 09:42:56PM +0100, Jiri Olsa escreveu: > The fixdep tool needs to be built before everything else, > because it fixes every object dependency file. > > We handle this currently by making all objects to depend > on fixdep, which is error prone and is easily forgotten > when new object is added. > > Instead of this, this patch force fixdep tool to be built > as the first target in the separate make session. This way > we don't need to handle extra fixdep dependencies and we are > certain there's no fixdep race with any parallel make job. With your updated version I'm getting this: $ make -k O=/tmp/build/perf -C tools/perf install-bin <BIG SNIP> LINK /tmp/build/perf/libperf-gtk.so INSTALL GTK UI install: cannot change permissions of ‘/lib64’: Operation not permitted install: cannot create regular file '/lib64/libperf-gtk.so': Permission denied Makefile.perf:738: recipe for target 'install-gtk' failed make[2]: *** [install-gtk] Error 1 make[2]: *** Waiting for unfinished jobs.... Makefile.perf:383: recipe for target 'sub-make' failed make[1]: *** [sub-make] Error 2 Makefile:108: recipe for target 'install-bin' failed make: *** [install-bin] Error 2 make: Leaving directory '/home/acme/git/linux/tools/perf' > Link: http://lkml.kernel.org/n/tip-b6wi5cssl8apu74o2kbfheag@git.kernel.org > Signed-off-by: Jiri Olsa <jolsa@kernel.org> > --- > tools/perf/Makefile.perf | 54 +++++++++++++++++++++++++++++++++++++----------- > 1 file changed, 42 insertions(+), 12 deletions(-) > > diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf > index 112f4f7bb200..25d9d6653746 100644 > --- a/tools/perf/Makefile.perf > +++ b/tools/perf/Makefile.perf > @@ -179,6 +179,27 @@ ifeq ($(filter-out $(NON_CONFIG_TARGETS),$(MAKECMDGOALS)),) > endif > endif > > +# The fixdep build - we force fixdep tool to be built as > +# the first target in the separate make session not to be > +# disturbed by any parallel make jobs. Once fixdep is done > +# we issue the requested build with FIXDEP=1 variable. > +# > +# The fixdep build is disabled for $(NON_CONFIG_TARGETS) > +# targets, because it's not necessary. > + > +ifdef FIXDEP > + force_fixdep := 0 > +else > + force_fixdep := $(config) > +endif > + > +# Disable config, we are forcing fixdep rule first > +# and it does not need config data. > + > +ifeq ($(force_fixdep),1) > + config := 0 > +endif > + > # Set FEATURE_TESTS to 'all' so all possible feature checkers are executed. > # Without this setting the output feature dump file misses some features, for > # example, liberty. Select all checkers so we won't get an incomplete feature > @@ -324,10 +345,22 @@ LIBS = -Wl,--whole-archive $(PERFLIBS) -Wl,--no-whole-archive -Wl,--start-group > > export INSTALL SHELL_PATH > > +export srctree OUTPUT RM CC LD AR CFLAGS V BISON FLEX AWK > +export HOSTCC HOSTLD HOSTAR > +include $(srctree)/tools/build/Makefile.include > + > ### Build rules > > SHELL = $(SHELL_PATH) > > +ifeq ($(force_fixdep),1) > +goals := $(filter-out all sub-make, $(MAKECMDGOALS)) > + > +$(goals) all: sub-make > + > +sub-make: fixdep > + $(Q)$(MAKE) FIXDEP=1 -f Makefile.perf $(goals) > +else > all: shell_compatibility_test $(ALL_PROGRAMS) $(LANG_BINDINGS) $(OTHER_PROGRAMS) > > $(OUTPUT)python/perf.so: $(PYTHON_EXT_SRCS) $(PYTHON_EXT_DEPS) $(LIBTRACEEVENT_DYNAMIC_LIST) > @@ -348,10 +381,6 @@ strip: $(PROGRAMS) $(OUTPUT)perf > > PERF_IN := $(OUTPUT)perf-in.o > > -export srctree OUTPUT RM CC LD AR CFLAGS V BISON FLEX AWK > -export HOSTCC HOSTLD HOSTAR > -include $(srctree)/tools/build/Makefile.include > - > JEVENTS := $(OUTPUT)pmu-events/jevents > JEVENTS_IN := $(OUTPUT)pmu-events/jevents-in.o > > @@ -470,7 +499,7 @@ $(OUTPUT)perf: $(PERFLIBS) $(PERF_IN) $(PMU_EVENTS_IN) $(LIBTRACEEVENT_DYNAMIC_L > $(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $(LIBTRACEEVENT_DYNAMIC_LIST_LDFLAGS) \ > $(PERF_IN) $(PMU_EVENTS_IN) $(LIBS) -o $@ > > -$(GTK_IN): fixdep FORCE > +$(GTK_IN): FORCE > $(Q)$(MAKE) $(build)=gtk > > $(OUTPUT)libperf-gtk.so: $(GTK_IN) $(PERFLIBS) > @@ -515,7 +544,7 @@ endif > __build-dir = $(subst $(OUTPUT),,$(dir $@)) > build-dir = $(if $(__build-dir),$(__build-dir),.) > > -prepare: $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h fixdep archheaders > +prepare: $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h archheaders > > $(OUTPUT)%.o: %.c prepare FORCE > $(Q)$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=$(build-dir) $@ > @@ -565,7 +594,7 @@ $(patsubst perf-%,%.o,$(PROGRAMS)): $(wildcard */*.h) > > LIBPERF_IN := $(OUTPUT)libperf-in.o > > -$(LIBPERF_IN): prepare fixdep FORCE > +$(LIBPERF_IN): prepare FORCE > $(Q)$(MAKE) $(build)=libperf > > $(LIB_FILE): $(LIBPERF_IN) > @@ -573,10 +602,10 @@ $(LIB_FILE): $(LIBPERF_IN) > > LIBTRACEEVENT_FLAGS += plugin_dir=$(plugindir_SQ) > > -$(LIBTRACEEVENT): fixdep FORCE > +$(LIBTRACEEVENT): FORCE > $(Q)$(MAKE) -C $(TRACE_EVENT_DIR) $(LIBTRACEEVENT_FLAGS) O=$(OUTPUT) $(OUTPUT)libtraceevent.a > > -libtraceevent_plugins: fixdep FORCE > +libtraceevent_plugins: FORCE > $(Q)$(MAKE) -C $(TRACE_EVENT_DIR) $(LIBTRACEEVENT_FLAGS) O=$(OUTPUT) plugins > > $(LIBTRACEEVENT_DYNAMIC_LIST): libtraceevent_plugins > @@ -589,21 +618,21 @@ $(LIBTRACEEVENT)-clean: > install-traceevent-plugins: libtraceevent_plugins > $(Q)$(MAKE) -C $(TRACE_EVENT_DIR) $(LIBTRACEEVENT_FLAGS) O=$(OUTPUT) install_plugins > > -$(LIBAPI): fixdep FORCE > +$(LIBAPI): FORCE > $(Q)$(MAKE) -C $(LIB_DIR) O=$(OUTPUT) $(OUTPUT)libapi.a > > $(LIBAPI)-clean: > $(call QUIET_CLEAN, libapi) > $(Q)$(MAKE) -C $(LIB_DIR) O=$(OUTPUT) clean >/dev/null > > -$(LIBBPF): fixdep FORCE > +$(LIBBPF): FORCE > $(Q)$(MAKE) -C $(BPF_DIR) O=$(OUTPUT) $(OUTPUT)libbpf.a FEATURES_DUMP=$(FEATURE_DUMP_EXPORT) > > $(LIBBPF)-clean: > $(call QUIET_CLEAN, libbpf) > $(Q)$(MAKE) -C $(BPF_DIR) O=$(OUTPUT) clean >/dev/null > > -$(LIBSUBCMD): fixdep FORCE > +$(LIBSUBCMD): FORCE > $(Q)$(MAKE) -C $(SUBCMD_DIR) O=$(OUTPUT) $(OUTPUT)libsubcmd.a > > $(LIBSUBCMD)-clean: > @@ -811,3 +840,4 @@ FORCE: > .PHONY: $(GIT-HEAD-PHONY) TAGS tags cscope FORCE prepare > .PHONY: libtraceevent_plugins archheaders > > +endif # force_fixdep > -- > 2.7.4
[toc] | [prev] | [next] | [standalone]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2016-12-06 11:50 +0100 |
| Subject | Re: [PATCH 5/7] perf tools: Force fixdep compilation at the start of the build |
| Message-ID | <sLltU-UD-21@gated-at.bofh.it> |
| In reply to | #1536374 |
On Mon, Dec 05, 2016 at 05:02:51PM -0300, Arnaldo Carvalho de Melo wrote: > Em Sun, Dec 04, 2016 at 09:42:56PM +0100, Jiri Olsa escreveu: > > The fixdep tool needs to be built before everything else, > > because it fixes every object dependency file. > > > > We handle this currently by making all objects to depend > > on fixdep, which is error prone and is easily forgotten > > when new object is added. > > > > Instead of this, this patch force fixdep tool to be built > > as the first target in the separate make session. This way > > we don't need to handle extra fixdep dependencies and we are > > certain there's no fixdep race with any parallel make job. > > With your updated version I'm getting this: > > $ make -k O=/tmp/build/perf -C tools/perf install-bin > <BIG SNIP> > LINK /tmp/build/perf/libperf-gtk.so > INSTALL GTK UI > install: cannot change permissions of ‘/lib64’: Operation not permitted > install: cannot create regular file '/lib64/libperf-gtk.so': Permission denied > Makefile.perf:738: recipe for target 'install-gtk' failed > make[2]: *** [install-gtk] Error 1 > make[2]: *** Waiting for unfinished jobs.... > Makefile.perf:383: recipe for target 'sub-make' failed > make[1]: *** [sub-make] Error 2 > Makefile:108: recipe for target 'install-bin' failed > make: *** [install-bin] Error 2 > make: Leaving directory '/home/acme/git/linux/tools/perf' hum, tests/make does not cover $HOME installation :-\ anyway, I needed to do more changes and I pushed them all into my perf/fixes again and now I'm running all tests.. it also has the check-headers.sh fix we discussed I'll post later today if the tests are ok thanks, jirka
[toc] | [prev] | [next] | [standalone]
| From | Jiri Olsa <jolsa@kernel.org> |
|---|---|
| Date | 2016-12-04 21:50 +0100 |
| Subject | [PATCH 7/7] perf tools: Cleanup build directory before each test |
| Message-ID | <sKLTr-3vB-29@gated-at.bofh.it> |
| In reply to | #1535709 |
Cleanup the fixdep tool before every test. Link: http://lkml.kernel.org/n/tip-1al4akj7r8pl1pidxgnzzlzs@git.kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.org> --- tools/perf/tests/make | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/tests/make b/tools/perf/tests/make index 08ed7f12cc37..ac6f3ecd4e72 100644 --- a/tools/perf/tests/make +++ b/tools/perf/tests/make @@ -278,7 +278,7 @@ endif MAKEFLAGS := --no-print-directory -clean := @(cd $(PERF); $(MAKE_F) -s $(O_OPT) clean >/dev/null) +clean := @(cd $(PERF); $(MAKE_F) -s $(O_OPT) clean >/dev/null && $(MAKE) -s $(O_OPT) -C ../build clean >/dev/null) $(run): $(call clean) -- 2.7.4
[toc] | [prev] | [next] | [standalone]
| From | tip-bot for Jiri Olsa <tipbot@zytor.com> |
|---|---|
| Date | 2016-12-06 09:30 +0100 |
| Subject | [tip:perf/core] perf tools: Cleanup build directory before each test |
| Message-ID | <sLjip-84n-15@gated-at.bofh.it> |
| In reply to | #1535715 |
Commit-ID: 207da4739e3e6ced6dbfebed7416b35c0440e591 Gitweb: http://git.kernel.org/tip/207da4739e3e6ced6dbfebed7416b35c0440e591 Author: Jiri Olsa <jolsa@kernel.org> AuthorDate: Sun, 4 Dec 2016 21:42:58 +0100 Committer: Arnaldo Carvalho de Melo <acme@redhat.com> CommitDate: Mon, 5 Dec 2016 16:18:26 -0300 perf tools: Cleanup build directory before each test Cleanup the fixdep tool before every test. 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> Link: http://lkml.kernel.org/r/1480884178-8072-8-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- tools/perf/tests/make | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/tests/make b/tools/perf/tests/make index aa49b66..0784748 100644 --- a/tools/perf/tests/make +++ b/tools/perf/tests/make @@ -280,7 +280,7 @@ endif MAKEFLAGS := --no-print-directory -clean := @(cd $(PERF); $(MAKE_F) -s $(O_OPT) clean >/dev/null) +clean := @(cd $(PERF); $(MAKE_F) -s $(O_OPT) clean >/dev/null && $(MAKE) -s $(O_OPT) -C ../build clean >/dev/null) $(run): $(call clean)
[toc] | [prev] | [next] | [standalone]
| From | Jiri Olsa <jolsa@kernel.org> |
|---|---|
| Date | 2016-12-04 21:50 +0100 |
| Subject | [PATCH 4/7] perf tools: Move python/perf.so target into rules area |
| Message-ID | <sKLTs-3vB-31@gated-at.bofh.it> |
| In reply to | #1535709 |
Following fixdep fix needs all targets at the same area, so they'll fit under signal condition block. Moving python/perf.so target into rules section and intentionally removing the perl script related comment. Link: http://lkml.kernel.org/n/tip-0xk7ca6fdvv6jg71lp40yj5x@git.kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.org> --- tools/perf/Makefile.perf | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 2e95456108d7..112f4f7bb200 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -262,17 +262,6 @@ python-clean := $(call QUIET_CLEAN, python) $(RM) -r $(PYTHON_EXTBUILD) $(OUTPUT PYTHON_EXT_SRCS := $(shell grep -v ^\# util/python-ext-sources) PYTHON_EXT_DEPS := util/python-ext-sources util/setup.py $(LIBTRACEEVENT) $(LIBAPI) -$(OUTPUT)python/perf.so: $(PYTHON_EXT_SRCS) $(PYTHON_EXT_DEPS) $(LIBTRACEEVENT_DYNAMIC_LIST) - $(QUIET_GEN)LDSHARED="$(CC) -pthread -shared" \ - CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS) $(LIBTRACEEVENT_DYNAMIC_LIST_LDFLAGS)' \ - $(PYTHON_WORD) util/setup.py \ - --quiet build_ext; \ - mkdir -p $(OUTPUT)python && \ - cp $(PYTHON_EXTBUILD_LIB)perf.so $(OUTPUT)python/ -# -# No Perl scripts right now: -# - SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) PROGRAMS += $(OUTPUT)perf @@ -341,6 +330,14 @@ SHELL = $(SHELL_PATH) all: shell_compatibility_test $(ALL_PROGRAMS) $(LANG_BINDINGS) $(OTHER_PROGRAMS) +$(OUTPUT)python/perf.so: $(PYTHON_EXT_SRCS) $(PYTHON_EXT_DEPS) $(LIBTRACEEVENT_DYNAMIC_LIST) + $(QUIET_GEN)LDSHARED="$(CC) -pthread -shared" \ + CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS) $(LIBTRACEEVENT_DYNAMIC_LIST_LDFLAGS)' \ + $(PYTHON_WORD) util/setup.py \ + --quiet build_ext; \ + mkdir -p $(OUTPUT)python && \ + cp $(PYTHON_EXTBUILD_LIB)perf.so $(OUTPUT)python/ + please_set_SHELL_PATH_to_a_more_modern_shell: $(Q)$$(:) -- 2.7.4
[toc] | [prev] | [next] | [standalone]
| From | tip-bot for Jiri Olsa <tipbot@zytor.com> |
|---|---|
| Date | 2016-12-06 09:30 +0100 |
| Subject | [tip:perf/core] perf tools: Move python/perf.so target into rules area |
| Message-ID | <sLjiq-84n-33@gated-at.bofh.it> |
| In reply to | #1535716 |
Commit-ID: 0b4d4b076251542dc81d128f481c3d3b5fc24863 Gitweb: http://git.kernel.org/tip/0b4d4b076251542dc81d128f481c3d3b5fc24863 Author: Jiri Olsa <jolsa@kernel.org> AuthorDate: Sun, 4 Dec 2016 21:42:55 +0100 Committer: Arnaldo Carvalho de Melo <acme@redhat.com> CommitDate: Mon, 5 Dec 2016 16:11:50 -0300 perf tools: Move python/perf.so target into rules area Following fixdep fix needs all targets at the same area, so they'll fit under signal condition block. Moving python/perf.so target into rules section and intentionally removing the perl script related comment. 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> Link: http://lkml.kernel.org/r/1480884178-8072-5-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- tools/perf/Makefile.perf | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 593d765..2784b58 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -268,17 +268,6 @@ python-clean := $(call QUIET_CLEAN, python) $(RM) -r $(PYTHON_EXTBUILD) $(OUTPUT PYTHON_EXT_SRCS := $(shell grep -v ^\# util/python-ext-sources) PYTHON_EXT_DEPS := util/python-ext-sources util/setup.py $(LIBTRACEEVENT) $(LIBAPI) -$(OUTPUT)python/perf.so: $(PYTHON_EXT_SRCS) $(PYTHON_EXT_DEPS) $(LIBTRACEEVENT_DYNAMIC_LIST) - $(QUIET_GEN)LDSHARED="$(CC) -pthread -shared" \ - CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS) $(LIBTRACEEVENT_DYNAMIC_LIST_LDFLAGS)' \ - $(PYTHON_WORD) util/setup.py \ - --quiet build_ext; \ - mkdir -p $(OUTPUT)python && \ - cp $(PYTHON_EXTBUILD_LIB)perf.so $(OUTPUT)python/ -# -# No Perl scripts right now: -# - SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) PROGRAMS += $(OUTPUT)perf @@ -362,6 +351,14 @@ SHELL = $(SHELL_PATH) all: shell_compatibility_test $(ALL_PROGRAMS) $(LANG_BINDINGS) $(OTHER_PROGRAMS) +$(OUTPUT)python/perf.so: $(PYTHON_EXT_SRCS) $(PYTHON_EXT_DEPS) $(LIBTRACEEVENT_DYNAMIC_LIST) + $(QUIET_GEN)LDSHARED="$(CC) -pthread -shared" \ + CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS) $(LIBTRACEEVENT_DYNAMIC_LIST_LDFLAGS)' \ + $(PYTHON_WORD) util/setup.py \ + --quiet build_ext; \ + mkdir -p $(OUTPUT)python && \ + cp $(PYTHON_EXTBUILD_LIB)perf.so $(OUTPUT)python/ + please_set_SHELL_PATH_to_a_more_modern_shell: $(Q)$$(:)
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web