Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1308335 > unrolled thread
| Started by | Wang Nan <wangnan0@huawei.com> |
|---|---|
| First post | 2016-01-13 13:20 +0100 |
| Last post | 2016-01-14 03:00 +0100 |
| Articles | 20 on this page of 27 — 5 participants |
Back to article view | Back to linux.kernel
[PATCH 0/9] perf build: Make build-test faster Wang Nan <wangnan0@huawei.com> - 2016-01-13 13:20 +0100
[PATCH 3/9] perf build: Test correct path of perf in build-test Wang Nan <wangnan0@huawei.com> - 2016-01-13 13:20 +0100
Re: [PATCH 3/9] perf build: Test correct path of perf in build-test Jiri Olsa <jolsa@redhat.com> - 2016-01-14 11:00 +0100
Re: [PATCH 3/9] perf build: Test correct path of perf in build-test "Wangnan (F)" <wangnan0@huawei.com> - 2016-01-14 11:00 +0100
Re: [PATCH 3/9] perf build: Test correct path of perf in build-test Jiri Olsa <jolsa@redhat.com> - 2016-01-14 11:00 +0100
Re: [PATCH 3/9] perf build: Test correct path of perf in build-test Jiri Olsa <jolsa@redhat.com> - 2016-01-14 11:10 +0100
Re: [PATCH 3/9] perf build: Test correct path of perf in build-test Jiri Olsa <jolsa@redhat.com> - 2016-01-14 11:10 +0100
Re: [PATCH 3/9] perf build: Test correct path of perf in build-test "Wangnan (F)" <wangnan0@huawei.com> - 2016-01-14 11:20 +0100
[PATCH 9/9] perf build: Use feature dump file for build-test Wang Nan <wangnan0@huawei.com> - 2016-01-13 13:20 +0100
Re: [PATCH 9/9] perf build: Use feature dump file for build-test Jiri Olsa <jolsa@redhat.com> - 2016-01-14 11:20 +0100
Re: [PATCH 9/9] perf build: Use feature dump file for build-test "Wangnan (F)" <wangnan0@huawei.com> - 2016-01-14 11:30 +0100
Re: [PATCH 9/9] perf build: Use feature dump file for build-test Jiri Olsa <jolsa@redhat.com> - 2016-01-14 13:50 +0100
Re: [PATCH 9/9] perf build: Use feature dump file for build-test Jiri Olsa <jolsa@redhat.com> - 2016-01-14 11:30 +0100
[PATCH 4/9] perf build: Pass O option to kernel makefile in build-test Wang Nan <wangnan0@huawei.com> - 2016-01-13 13:20 +0100
[PATCH 5/9] perf build: Add feature-dump target Wang Nan <wangnan0@huawei.com> - 2016-01-13 13:20 +0100
[PATCH 7/9] tools build: Allow subprojects select all feature checkers Wang Nan <wangnan0@huawei.com> - 2016-01-13 13:20 +0100
[PATCH 8/9] perf build: Select all feature checkers for feature-dump Wang Nan <wangnan0@huawei.com> - 2016-01-13 13:30 +0100
Re: [PATCH 8/9] perf build: Select all feature checkers for feature-dump Jiri Olsa <jolsa@redhat.com> - 2016-01-14 11:20 +0100
[PATCH 2/9] perf build: Pass O option to Makefile.perf in build-test Wang Nan <wangnan0@huawei.com> - 2016-01-13 13:30 +0100
Re: [PATCH 2/9] perf build: Pass O option to Makefile.perf in build-test Jiri Olsa <jolsa@redhat.com> - 2016-01-14 10:40 +0100
Re: [PATCH 2/9] perf build: Pass O option to Makefile.perf in build-test "Wangnan (F)" <wangnan0@huawei.com> - 2016-01-14 11:00 +0100
Re: [PATCH 2/9] perf build: Pass O option to Makefile.perf in build-test Jiri Olsa <jolsa@redhat.com> - 2016-01-14 15:40 +0100
Re: [PATCH 2/9] perf build: Pass O option to Makefile.perf in build-test Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-14 15:50 +0100
Re: [PATCH 2/9] perf build: Pass O option to Makefile.perf in build-test pi3orama <pi3orama@163.com> - 2016-01-14 16:30 +0100
Re: [PATCH 2/9] perf build: Pass O option to Makefile.perf in build-test Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-14 15:40 +0100
[PATCH 6/9] perf build: Introduce FEATURES_DUMP make variable Wang Nan <wangnan0@huawei.com> - 2016-01-13 13:30 +0100
Re: [PATCH 0/9] perf build: Make build-test faster "Wangnan (F)" <wangnan0@huawei.com> - 2016-01-14 03:00 +0100
Page 1 of 2 [1] 2 Next page →
| From | Wang Nan <wangnan0@huawei.com> |
|---|---|
| Date | 2016-01-13 13:20 +0100 |
| Subject | [PATCH 0/9] perf build: Make build-test faster |
| Message-ID | <qQsz8-7YE-5@gated-at.bofh.it> |
Utilize Jiri's two RFCs to make build-test faster. Before his RFC on a 24 core machine: real 21m16.579s user 176m12.989s sys 20m54.950s After his RFC: real 16m0.619s user 172m53.896s sys 19m22.777s Speedup: 24.75%. Jiri Olsa (2): perf build: Add feature-dump target perf build: Introduce FEATURES_DUMP make variable Wang Nan (7): perf build: Set parallel making options build-test perf build: Pass O option to Makefile.perf in build-test perf build: Test correct path of perf in build-test perf build: Pass O option to kernel makefile in build-test tools build: Allow subprojects select all feature checkers perf build: Select all feature checkers for feature-dump perf build: Use feature dump file for build-test tools/build/Makefile.feature | 21 +++++++++++- tools/perf/Makefile.perf | 30 ++++++++++++++++- tools/perf/config/Makefile | 4 +++ tools/perf/tests/make | 80 +++++++++++++++++++++++++++++++++++--------- 4 files changed, 118 insertions(+), 17 deletions(-) -- 1.8.3.4
[toc] | [next] | [standalone]
| From | Wang Nan <wangnan0@huawei.com> |
|---|---|
| Date | 2016-01-13 13:20 +0100 |
| Subject | [PATCH 3/9] perf build: Test correct path of perf in build-test |
| Message-ID | <qQsz9-7YE-15@gated-at.bofh.it> |
| In reply to | #1308335 |
If an 'O' is passed to 'make build-test', many 'test -x' and 'test -f'
will fail because perf resides in a different directory. Fix this by
computing PERF_OUT according to 'O' and test correct output files.
For make_kernelsrc and make_kernelsrc_tools, set KBUILD_OUTPUT_DIR
instead because the path is different from others ($(O)/perf vs
$(O)/tools/perf).
Signed-off-by: Wang Nan <wangnan0@huawei.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
---
tools/perf/tests/make | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
diff --git a/tools/perf/tests/make b/tools/perf/tests/make
index 14d7b8d..1e59ce8 100644
--- a/tools/perf/tests/make
+++ b/tools/perf/tests/make
@@ -13,10 +13,12 @@ else
endif
else
PERF := .
+PERF_OUT := $(PERF)
O_OPT :=
ifneq ($(O),)
FULL_O := $(shell readlink -f $(O) || echo $(O))
+ PERF_OUT := $(FULL_O)
ifeq ($(SET_O),1)
O_OPT := 'O=$(FULL_O)'
endif
@@ -173,11 +175,11 @@ test_make_doc := $(test_ok)
test_make_help_O := $(test_ok)
test_make_doc_O := $(test_ok)
-test_make_python_perf_so := test -f $(PERF)/python/perf.so
+test_make_python_perf_so := test -f $(PERF_OUT)/python/perf.so
-test_make_perf_o := test -f $(PERF)/perf.o
-test_make_util_map_o := test -f $(PERF)/util/map.o
-test_make_util_pmu_bison_o := test -f $(PERF)/util/pmu-bison.o
+test_make_perf_o := test -f $(PERF_OUT)/perf.o
+test_make_util_map_o := test -f $(PERF_OUT)/util/map.o
+test_make_util_pmu_bison_o := test -f $(PERF_OUT)/util/pmu-bison.o
define test_dest_files
for file in $(1); do \
@@ -244,7 +246,7 @@ test_make_perf_o_O := test -f $$TMP_O/perf.o
test_make_util_map_o_O := test -f $$TMP_O/util/map.o
test_make_util_pmu_bison_o_O := test -f $$TMP_O/util/pmu-bison.o
-test_default = test -x $(PERF)/perf
+test_default = test -x $(PERF_OUT)/perf
test = $(if $(test_$1),$(test_$1),$(test_default))
test_default_O = test -x $$TMP_O/perf
@@ -264,7 +266,7 @@ endif
MAKEFLAGS := --no-print-directory
-clean := @(cd $(PERF); make -s -f $(MK) clean >/dev/null)
+clean := @(cd $(PERF); make -s -f $(MK) O=$(PERF_OUT) clean >/dev/null; make -s -f $(MK) clean >/dev/null)
$(run):
$(call clean)
@@ -293,17 +295,22 @@ tarpkg:
( eval $$cmd ) >> $@ 2>&1 && \
rm -f $@
+KBUILD_OUTPUT_DIR := ../..
+ifneq ($(O),)
+ KBUILD_OUTPUT_DIR := $(O)
+endif
+
make_kernelsrc:
@echo "- make -C <kernelsrc> $(PARALLEL_OPT) tools/perf"
$(call clean); \
(make -C ../.. $(PARALLEL_OPT) tools/perf) > $@ 2>&1 && \
- test -x perf && rm -f $@ || (cat $@ ; false)
+ test -x $(KBUILD_OUTPUT_DIR)/tools/perf && rm -f $@ || (cat $@ ; false)
make_kernelsrc_tools:
@echo "- make -C <kernelsrc>/tools $(PARALLEL_OPT) perf"
$(call clean); \
(make -C ../../tools $(PARALLEL_OPT) perf) > $@ 2>&1 && \
- test -x perf && rm -f $@ || (cat $@ ; false)
+ test -x $(KBUILD_OUTPUT_DIR)/tools/perf && rm -f $@ || (cat $@ ; false)
all: $(run) $(run_O) tarpkg make_kernelsrc make_kernelsrc_tools
@echo OK
--
1.8.3.4
[toc] | [prev] | [next] | [standalone]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2016-01-14 11:00 +0100 |
| Subject | Re: [PATCH 3/9] perf build: Test correct path of perf in build-test |
| Message-ID | <qQMRc-5dh-17@gated-at.bofh.it> |
| In reply to | #1308338 |
On Wed, Jan 13, 2016 at 12:17:16PM +0000, Wang Nan wrote: SNIP > +test_make_python_perf_so := test -f $(PERF_OUT)/python/perf.so > > -test_make_perf_o := test -f $(PERF)/perf.o > -test_make_util_map_o := test -f $(PERF)/util/map.o > -test_make_util_pmu_bison_o := test -f $(PERF)/util/pmu-bison.o > +test_make_perf_o := test -f $(PERF_OUT)/perf.o > +test_make_util_map_o := test -f $(PERF_OUT)/util/map.o > +test_make_util_pmu_bison_o := test -f $(PERF_OUT)/util/pmu-bison.o > > define test_dest_files > for file in $(1); do \ > @@ -244,7 +246,7 @@ test_make_perf_o_O := test -f $$TMP_O/perf.o > test_make_util_map_o_O := test -f $$TMP_O/util/map.o > test_make_util_pmu_bison_o_O := test -f $$TMP_O/util/pmu-bison.o > > -test_default = test -x $(PERF)/perf > +test_default = test -x $(PERF_OUT)/perf > test = $(if $(test_$1),$(test_$1),$(test_default)) > > test_default_O = test -x $$TMP_O/perf > @@ -264,7 +266,7 @@ endif > > MAKEFLAGS := --no-print-directory > > -clean := @(cd $(PERF); make -s -f $(MK) clean >/dev/null) > +clean := @(cd $(PERF); make -s -f $(MK) O=$(PERF_OUT) clean >/dev/null; make -s -f $(MK) clean >/dev/null) what's the second make clean for? thanks, jirka
[toc] | [prev] | [next] | [standalone]
| From | "Wangnan (F)" <wangnan0@huawei.com> |
|---|---|
| Date | 2016-01-14 11:00 +0100 |
| Subject | Re: [PATCH 3/9] perf build: Test correct path of perf in build-test |
| Message-ID | <qQMRd-5dh-25@gated-at.bofh.it> |
| In reply to | #1309130 |
On 2016/1/14 17:57, Jiri Olsa wrote: > On Wed, Jan 13, 2016 at 12:17:16PM +0000, Wang Nan wrote: > > SNIP > >> +test_make_python_perf_so := test -f $(PERF_OUT)/python/perf.so >> >> -test_make_perf_o := test -f $(PERF)/perf.o >> -test_make_util_map_o := test -f $(PERF)/util/map.o >> -test_make_util_pmu_bison_o := test -f $(PERF)/util/pmu-bison.o >> +test_make_perf_o := test -f $(PERF_OUT)/perf.o >> +test_make_util_map_o := test -f $(PERF_OUT)/util/map.o >> +test_make_util_pmu_bison_o := test -f $(PERF_OUT)/util/pmu-bison.o >> >> define test_dest_files >> for file in $(1); do \ >> @@ -244,7 +246,7 @@ test_make_perf_o_O := test -f $$TMP_O/perf.o >> test_make_util_map_o_O := test -f $$TMP_O/util/map.o >> test_make_util_pmu_bison_o_O := test -f $$TMP_O/util/pmu-bison.o >> >> -test_default = test -x $(PERF)/perf >> +test_default = test -x $(PERF_OUT)/perf >> test = $(if $(test_$1),$(test_$1),$(test_default)) >> >> test_default_O = test -x $$TMP_O/perf >> @@ -264,7 +266,7 @@ endif >> >> MAKEFLAGS := --no-print-directory >> >> -clean := @(cd $(PERF); make -s -f $(MK) clean >/dev/null) >> +clean := @(cd $(PERF); make -s -f $(MK) O=$(PERF_OUT) clean >/dev/null; make -s -f $(MK) clean >/dev/null) > what's the second make clean for? I want to ensure the source directory is also clean. Looks like I forget 'O' would be passed to the second make also... > thanks, > jirka
[toc] | [prev] | [next] | [standalone]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2016-01-14 11:00 +0100 |
| Subject | Re: [PATCH 3/9] perf build: Test correct path of perf in build-test |
| Message-ID | <qQMRd-5dh-31@gated-at.bofh.it> |
| In reply to | #1308338 |
On Wed, Jan 13, 2016 at 12:17:16PM +0000, Wang Nan wrote: > If an 'O' is passed to 'make build-test', many 'test -x' and 'test -f' > will fail because perf resides in a different directory. Fix this by > computing PERF_OUT according to 'O' and test correct output files. > For make_kernelsrc and make_kernelsrc_tools, set KBUILD_OUTPUT_DIR > instead because the path is different from others ($(O)/perf vs > $(O)/tools/perf). > > Signed-off-by: Wang Nan <wangnan0@huawei.com> > Cc: Arnaldo Carvalho de Melo <acme@redhat.com> > Cc: Jiri Olsa <jolsa@kernel.org> > Cc: Namhyung Kim <namhyung@kernel.org> > --- > tools/perf/tests/make | 23 +++++++++++++++-------- > 1 file changed, 15 insertions(+), 8 deletions(-) > > diff --git a/tools/perf/tests/make b/tools/perf/tests/make > index 14d7b8d..1e59ce8 100644 > --- a/tools/perf/tests/make > +++ b/tools/perf/tests/make > @@ -13,10 +13,12 @@ else > endif > else > PERF := . > +PERF_OUT := $(PERF) > O_OPT := given that we use _O suffix everywhere in here, would PERF_O suit better? thanks, jirka
[toc] | [prev] | [next] | [standalone]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2016-01-14 11:10 +0100 |
| Subject | Re: [PATCH 3/9] perf build: Test correct path of perf in build-test |
| Message-ID | <qQN0S-5vL-3@gated-at.bofh.it> |
| In reply to | #1308338 |
On Wed, Jan 13, 2016 at 12:17:16PM +0000, Wang Nan wrote: > If an 'O' is passed to 'make build-test', many 'test -x' and 'test -f' > will fail because perf resides in a different directory. Fix this by > computing PERF_OUT according to 'O' and test correct output files. > For make_kernelsrc and make_kernelsrc_tools, set KBUILD_OUTPUT_DIR > instead because the path is different from others ($(O)/perf vs > $(O)/tools/perf). > > Signed-off-by: Wang Nan <wangnan0@huawei.com> > Cc: Arnaldo Carvalho de Melo <acme@redhat.com> > Cc: Jiri Olsa <jolsa@kernel.org> > Cc: Namhyung Kim <namhyung@kernel.org> > --- > tools/perf/tests/make | 23 +++++++++++++++-------- > 1 file changed, 15 insertions(+), 8 deletions(-) > > diff --git a/tools/perf/tests/make b/tools/perf/tests/make > index 14d7b8d..1e59ce8 100644 > --- a/tools/perf/tests/make > +++ b/tools/perf/tests/make > @@ -13,10 +13,12 @@ else > endif > else > PERF := . > +PERF_OUT := $(PERF) > O_OPT := > > ifneq ($(O),) > FULL_O := $(shell readlink -f $(O) || echo $(O)) > + PERF_OUT := $(FULL_O) > ifeq ($(SET_O),1) > O_OPT := 'O=$(FULL_O)' > endif > @@ -173,11 +175,11 @@ test_make_doc := $(test_ok) > test_make_help_O := $(test_ok) > test_make_doc_O := $(test_ok) > > -test_make_python_perf_so := test -f $(PERF)/python/perf.so > +test_make_python_perf_so := test -f $(PERF_OUT)/python/perf.so > > -test_make_perf_o := test -f $(PERF)/perf.o > -test_make_util_map_o := test -f $(PERF)/util/map.o > -test_make_util_pmu_bison_o := test -f $(PERF)/util/pmu-bison.o > +test_make_perf_o := test -f $(PERF_OUT)/perf.o > +test_make_util_map_o := test -f $(PERF_OUT)/util/map.o > +test_make_util_pmu_bison_o := test -f $(PERF_OUT)/util/pmu-bison.o > > define test_dest_files > for file in $(1); do \ > @@ -244,7 +246,7 @@ test_make_perf_o_O := test -f $$TMP_O/perf.o > test_make_util_map_o_O := test -f $$TMP_O/util/map.o > test_make_util_pmu_bison_o_O := test -f $$TMP_O/util/pmu-bison.o > > -test_default = test -x $(PERF)/perf > +test_default = test -x $(PERF_OUT)/perf > test = $(if $(test_$1),$(test_$1),$(test_default)) > > test_default_O = test -x $$TMP_O/perf > @@ -264,7 +266,7 @@ endif > > MAKEFLAGS := --no-print-directory > > -clean := @(cd $(PERF); make -s -f $(MK) clean >/dev/null) > +clean := @(cd $(PERF); make -s -f $(MK) O=$(PERF_OUT) clean >/dev/null; make -s -f $(MK) clean >/dev/null) > > $(run): > $(call clean) > @@ -293,17 +295,22 @@ tarpkg: > ( eval $$cmd ) >> $@ 2>&1 && \ > rm -f $@ > > +KBUILD_OUTPUT_DIR := ../.. > +ifneq ($(O),) > + KBUILD_OUTPUT_DIR := $(O) > +endif hum, why kbuild? BUILD_O, KERNELSRC_O ... ? thanks, jirka
[toc] | [prev] | [next] | [standalone]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2016-01-14 11:10 +0100 |
| Subject | Re: [PATCH 3/9] perf build: Test correct path of perf in build-test |
| Message-ID | <qQN0S-5vL-9@gated-at.bofh.it> |
| In reply to | #1308338 |
On Wed, Jan 13, 2016 at 12:17:16PM +0000, Wang Nan wrote: SNIP > ( eval $$cmd ) >> $@ 2>&1 && \ > rm -f $@ > > +KBUILD_OUTPUT_DIR := ../.. > +ifneq ($(O),) > + KBUILD_OUTPUT_DIR := $(O) > +endif > + > make_kernelsrc: > @echo "- make -C <kernelsrc> $(PARALLEL_OPT) tools/perf" > $(call clean); \ > (make -C ../.. $(PARALLEL_OPT) tools/perf) > $@ 2>&1 && \ > - test -x perf && rm -f $@ || (cat $@ ; false) > + test -x $(KBUILD_OUTPUT_DIR)/tools/perf && rm -f $@ || (cat $@ ; false) do you miss one extra /perf in here? like it should be test -x $(KBUILD_OUTPUT_DIR)/tools/perf/perf > > make_kernelsrc_tools: > @echo "- make -C <kernelsrc>/tools $(PARALLEL_OPT) perf" > $(call clean); \ > (make -C ../../tools $(PARALLEL_OPT) perf) > $@ 2>&1 && \ > - test -x perf && rm -f $@ || (cat $@ ; false) > + test -x $(KBUILD_OUTPUT_DIR)/tools/perf && rm -f $@ || (cat $@ ; false) ditto thanks, jirka > > all: $(run) $(run_O) tarpkg make_kernelsrc make_kernelsrc_tools > @echo OK > -- > 1.8.3.4 >
[toc] | [prev] | [next] | [standalone]
| From | "Wangnan (F)" <wangnan0@huawei.com> |
|---|---|
| Date | 2016-01-14 11:20 +0100 |
| Subject | Re: [PATCH 3/9] perf build: Test correct path of perf in build-test |
| Message-ID | <qQNay-5z6-17@gated-at.bofh.it> |
| In reply to | #1309140 |
On 2016/1/14 18:04, Jiri Olsa wrote: > On Wed, Jan 13, 2016 at 12:17:16PM +0000, Wang Nan wrote: > > SNIP > >> ( eval $$cmd ) >> $@ 2>&1 && \ >> rm -f $@ >> >> +KBUILD_OUTPUT_DIR := ../.. >> +ifneq ($(O),) >> + KBUILD_OUTPUT_DIR := $(O) >> +endif >> + >> make_kernelsrc: >> @echo "- make -C <kernelsrc> $(PARALLEL_OPT) tools/perf" >> $(call clean); \ >> (make -C ../.. $(PARALLEL_OPT) tools/perf) > $@ 2>&1 && \ >> - test -x perf && rm -f $@ || (cat $@ ; false) >> + test -x $(KBUILD_OUTPUT_DIR)/tools/perf && rm -f $@ || (cat $@ ; false) > do you miss one extra /perf in here? like it should be > > test -x $(KBUILD_OUTPUT_DIR)/tools/perf/perf Right. Will fix. Thank you.
[toc] | [prev] | [next] | [standalone]
| From | Wang Nan <wangnan0@huawei.com> |
|---|---|
| Date | 2016-01-13 13:20 +0100 |
| Subject | [PATCH 9/9] perf build: Use feature dump file for build-test |
| Message-ID | <qQsz9-7YE-23@gated-at.bofh.it> |
| In reply to | #1308335 |
To prevent feature check run too many times, this patch utilizes previous introduced feature-dump make target and FEATURES_DUMP variable, makes sure the feature checkers run only once when doing build-test for normal test cases. Signed-off-by: Wang Nan <wangnan0@huawei.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> --- tools/perf/tests/make | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/tools/perf/tests/make b/tools/perf/tests/make index 336a6a6..10493ab 100644 --- a/tools/perf/tests/make +++ b/tools/perf/tests/make @@ -15,6 +15,7 @@ else PERF := . PERF_OUT := $(PERF) O_OPT := +FULL_O := $(shell readlink -f $(PERF_OUT) || echo $(PERF_OUT)) ifneq ($(O),) FULL_O := $(shell readlink -f $(O) || echo $(O)) @@ -319,5 +320,29 @@ all: $(run) $(run_O) tarpkg make_kernelsrc make_kernelsrc_tools out: $(run_O) @echo OK +FEATURES_DUMP_FILE := $(FULL_O)/BUILD_TEST_FEATURE_DUMP +FEATURES_DUMP_FILE_STATIC := $(FULL_O)/BUILD_TEST_FEATURE_DUMP_STATIC + +$(FEATURES_DUMP_FILE): + $(call clean) + @cmd="cd $(PERF) && make FEATURE_DUMP_COPY=$@ $(O_OPT) feature-dump"; \ + echo "- $@: $$cmd" && echo $$cmd && \ + ( eval $$cmd ) 2>&1 + +$(FEATURES_DUMP_FILE_STATIC): + $(call clean) + @cmd="cd $(PERF) && make FEATURE_DUMP_COPY=$@ $(O_OPT) LDFLAGS='-static' feature-dump"; \ + echo "- $@: $$cmd" && echo $$cmd && \ + ( eval $$cmd ) 2>&1 + +$(foreach t,$(run) $(run_O),$(eval \ + $(t): $(if $(findstring make_static,$(t)),\ + $(FEATURES_DUMP_FILE_STATIC),\ + $(FEATURES_DUMP_FILE)))) + +$(foreach t,$(run),$(if $(findstring make_static,$(t)),\ + $(eval $(t) := $($(t)) FEATURES_DUMP=$(FEATURES_DUMP_FILE_STATIC)),\ + $(eval $(t) := $($(t)) FEATURES_DUMP=$(FEATURES_DUMP_FILE)))) + .PHONY: all $(run) $(run_O) tarpkg clean make_kernelsrc make_kernelsrc_tools endif # ifndef MK -- 1.8.3.4
[toc] | [prev] | [next] | [standalone]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2016-01-14 11:20 +0100 |
| Subject | Re: [PATCH 9/9] perf build: Use feature dump file for build-test |
| Message-ID | <qQNay-5z6-15@gated-at.bofh.it> |
| In reply to | #1308339 |
On Wed, Jan 13, 2016 at 12:17:22PM +0000, Wang Nan wrote: SNIP > +$(FEATURES_DUMP_FILE_STATIC): > + $(call clean) > + @cmd="cd $(PERF) && make FEATURE_DUMP_COPY=$@ $(O_OPT) LDFLAGS='-static' feature-dump"; \ > + echo "- $@: $$cmd" && echo $$cmd && \ > + ( eval $$cmd ) 2>&1 > + > +$(foreach t,$(run) $(run_O),$(eval \ > + $(t): $(if $(findstring make_static,$(t)),\ > + $(FEATURES_DUMP_FILE_STATIC),\ > + $(FEATURES_DUMP_FILE)))) > + > +$(foreach t,$(run),$(if $(findstring make_static,$(t)),\ > + $(eval $(t) := $($(t)) FEATURES_DUMP=$(FEATURES_DUMP_FILE_STATIC)),\ > + $(eval $(t) := $($(t)) FEATURES_DUMP=$(FEATURES_DUMP_FILE)))) > + the BUILD_TEST_FEATURE_DUMP rebuild is not silent: [jolsa@krava perf]$ rm BUILD_TEST_FEATURE_DUMP [jolsa@krava perf]$ make -f tests/make Testing Makefile - /home/jolsa/kernel/linux-perf/tools/perf/BUILD_TEST_FEATURE_DUMP: cd . && make FEATURE_DUMP_COPY=/home/jolsa/kernel/linux-perf/tools/perf/BUILD_TEST_FEATURE_DUMP feature-dump cd . && make FEATURE_DUMP_COPY=/home/jolsa/kernel/linux-perf/tools/perf/BUILD_TEST_FEATURE_DUMP feature-dump BUILD: Doing 'make -j4' parallel build Auto-detecting system features: ... dwarf: [ on ] ... glibc: [ on ] ... gtk2: [ on ] ... libaudit: [ on ] ... libbfd: [ on ] ... libelf: [ on ] ... libnuma: [ on ] ... numa_num_possible_cpus: [ on ] ... libperl: [ on ] ... libpython: [ on ] ... libslang: [ on ] ... libunwind: [ on ] ... libdw-dwarf-unwind: [ on ] ... zlib: [ on ] ... lzma: [ on ] ... get_cpuid: [ on ] ... bpf: [ on ] ... also should 'make clean' remove BUILD_TEST_FEATURE_DUMP? thanks, jirka
[toc] | [prev] | [next] | [standalone]
| From | "Wangnan (F)" <wangnan0@huawei.com> |
|---|---|
| Date | 2016-01-14 11:30 +0100 |
| Subject | Re: [PATCH 9/9] perf build: Use feature dump file for build-test |
| Message-ID | <qQNke-5Dw-37@gated-at.bofh.it> |
| In reply to | #1309149 |
On 2016/1/14 18:19, Jiri Olsa wrote:
> On Wed, Jan 13, 2016 at 12:17:22PM +0000, Wang Nan wrote:
>
> SNIP
>
>> +$(FEATURES_DUMP_FILE_STATIC):
>> + $(call clean)
>> + @cmd="cd $(PERF) && make FEATURE_DUMP_COPY=$@ $(O_OPT) LDFLAGS='-static' feature-dump"; \
>> + echo "- $@: $$cmd" && echo $$cmd && \
>> + ( eval $$cmd ) 2>&1
>> +
>> +$(foreach t,$(run) $(run_O),$(eval \
>> + $(t): $(if $(findstring make_static,$(t)),\
>> + $(FEATURES_DUMP_FILE_STATIC),\
>> + $(FEATURES_DUMP_FILE))))
>> +
>> +$(foreach t,$(run),$(if $(findstring make_static,$(t)),\
>> + $(eval $(t) := $($(t)) FEATURES_DUMP=$(FEATURES_DUMP_FILE_STATIC)),\
>> + $(eval $(t) := $($(t)) FEATURES_DUMP=$(FEATURES_DUMP_FILE))))
>> +
> the BUILD_TEST_FEATURE_DUMP rebuild is not silent:
>
> [jolsa@krava perf]$ rm BUILD_TEST_FEATURE_DUMP
> [jolsa@krava perf]$ make -f tests/make
> Testing Makefile
> - /home/jolsa/kernel/linux-perf/tools/perf/BUILD_TEST_FEATURE_DUMP: cd . && make FEATURE_DUMP_COPY=/home/jolsa/kernel/linux-perf/tools/perf/BUILD_TEST_FEATURE_DUMP feature-dump
> cd . && make FEATURE_DUMP_COPY=/home/jolsa/kernel/linux-perf/tools/perf/BUILD_TEST_FEATURE_DUMP feature-dump
> BUILD: Doing 'make -j4' parallel build
>
> Auto-detecting system features:
> ... dwarf: [ on ]
> ... glibc: [ on ]
> ... gtk2: [ on ]
> ... libaudit: [ on ]
> ... libbfd: [ on ]
> ... libelf: [ on ]
> ... libnuma: [ on ]
> ... numa_num_possible_cpus: [ on ]
> ... libperl: [ on ]
> ... libpython: [ on ]
> ... libslang: [ on ]
> ... libunwind: [ on ]
> ... libdw-dwarf-unwind: [ on ]
> ... zlib: [ on ]
> ... lzma: [ on ]
> ... get_cpuid: [ on ]
> ... bpf: [ on ]
>
> ...
>
>
> also should 'make clean' remove BUILD_TEST_FEATURE_DUMP?
If a simple 'make clean' removes these two feature dump file then
they are unable to reused by multiple test cases. During build-test
'make clean' is called many times.
What about force removing these two files here:
ifeq ($(MAKECMDGOALS),)
# no target specified, trigger the whole suite
all:
@rm -f $(FEATURES_DUMP_FILE) $(FEATURES_DUMP_FILE_STATIC) <---
*HERE*
@echo "Testing Makefile"; $(MAKE) -sf tests/make MK=Makefile
@echo "Testing Makefile.perf"; $(MAKE) -sf tests/make
MK=Makefile.perf SET_PARALLEL=1 SET_O=1
else
# run only specific test over 'Makefile'
%:
@rm -f $(FEATURES_DUMP_FILE) $(FEATURES_DUMP_FILE_STATIC) <---
*and HERE*
@echo "Testing Makefile"; $(MAKE) -sf tests/make
MK=Makefile $@
endif
> thanks,
> jirka
[toc] | [prev] | [next] | [standalone]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2016-01-14 13:50 +0100 |
| Subject | Re: [PATCH 9/9] perf build: Use feature dump file for build-test |
| Message-ID | <qQPvI-75K-17@gated-at.bofh.it> |
| In reply to | #1309163 |
On Thu, Jan 14, 2016 at 06:24:00PM +0800, Wangnan (F) wrote: > > > On 2016/1/14 18:19, Jiri Olsa wrote: > >On Wed, Jan 13, 2016 at 12:17:22PM +0000, Wang Nan wrote: > > > >SNIP > > > >>+$(FEATURES_DUMP_FILE_STATIC): > >>+ $(call clean) > >>+ @cmd="cd $(PERF) && make FEATURE_DUMP_COPY=$@ $(O_OPT) LDFLAGS='-static' feature-dump"; \ > >>+ echo "- $@: $$cmd" && echo $$cmd && \ > >>+ ( eval $$cmd ) 2>&1 > >>+ > >>+$(foreach t,$(run) $(run_O),$(eval \ > >>+ $(t): $(if $(findstring make_static,$(t)),\ > >>+ $(FEATURES_DUMP_FILE_STATIC),\ > >>+ $(FEATURES_DUMP_FILE)))) > >>+ > >>+$(foreach t,$(run),$(if $(findstring make_static,$(t)),\ > >>+ $(eval $(t) := $($(t)) FEATURES_DUMP=$(FEATURES_DUMP_FILE_STATIC)),\ > >>+ $(eval $(t) := $($(t)) FEATURES_DUMP=$(FEATURES_DUMP_FILE)))) > >>+ > >the BUILD_TEST_FEATURE_DUMP rebuild is not silent: > > > >[jolsa@krava perf]$ rm BUILD_TEST_FEATURE_DUMP > >[jolsa@krava perf]$ make -f tests/make > >Testing Makefile > >- /home/jolsa/kernel/linux-perf/tools/perf/BUILD_TEST_FEATURE_DUMP: cd . && make FEATURE_DUMP_COPY=/home/jolsa/kernel/linux-perf/tools/perf/BUILD_TEST_FEATURE_DUMP feature-dump > >cd . && make FEATURE_DUMP_COPY=/home/jolsa/kernel/linux-perf/tools/perf/BUILD_TEST_FEATURE_DUMP feature-dump > > BUILD: Doing 'make -j4' parallel build > > > >Auto-detecting system features: > >... dwarf: [ on ] > >... glibc: [ on ] > >... gtk2: [ on ] > >... libaudit: [ on ] > >... libbfd: [ on ] > >... libelf: [ on ] > >... libnuma: [ on ] > >... numa_num_possible_cpus: [ on ] > >... libperl: [ on ] > >... libpython: [ on ] > >... libslang: [ on ] > >... libunwind: [ on ] > >... libdw-dwarf-unwind: [ on ] > >... zlib: [ on ] > >... lzma: [ on ] > >... get_cpuid: [ on ] > >... bpf: [ on ] > > > >... > > > > > >also should 'make clean' remove BUILD_TEST_FEATURE_DUMP? > > If a simple 'make clean' removes these two feature dump file then > they are unable to reused by multiple test cases. During build-test > 'make clean' is called many times. > > What about force removing these two files here: > > ifeq ($(MAKECMDGOALS),) > # no target specified, trigger the whole suite > all: > @rm -f $(FEATURES_DUMP_FILE) $(FEATURES_DUMP_FILE_STATIC) <--- > *HERE* > @echo "Testing Makefile"; $(MAKE) -sf tests/make MK=Makefile > @echo "Testing Makefile.perf"; $(MAKE) -sf tests/make > MK=Makefile.perf SET_PARALLEL=1 SET_O=1 > else > # run only specific test over 'Makefile' > %: > @rm -f $(FEATURES_DUMP_FILE) $(FEATURES_DUMP_FILE_STATIC) <--- *and > HERE* > @echo "Testing Makefile"; $(MAKE) -sf tests/make MK=Makefile $@ > endif wouldn't they be rebuilt right away? I think it'd be ok just to remove them right after the test jirka
[toc] | [prev] | [next] | [standalone]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2016-01-14 11:30 +0100 |
| Subject | Re: [PATCH 9/9] perf build: Use feature dump file for build-test |
| Message-ID | <qQNke-5Dw-27@gated-at.bofh.it> |
| In reply to | #1308339 |
On Wed, Jan 13, 2016 at 12:17:22PM +0000, Wang Nan wrote: > To prevent feature check run too many times, this patch utilizes > previous introduced feature-dump make target and FEATURES_DUMP > variable, makes sure the feature checkers run only once when doing > build-test for normal test cases. > > Signed-off-by: Wang Nan <wangnan0@huawei.com> > Cc: Jiri Olsa <jolsa@kernel.org> > Cc: Arnaldo Carvalho de Melo <acme@redhat.com> > Cc: Namhyung Kim <namhyung@kernel.org> > --- > tools/perf/tests/make | 25 +++++++++++++++++++++++++ > 1 file changed, 25 insertions(+) > > diff --git a/tools/perf/tests/make b/tools/perf/tests/make > index 336a6a6..10493ab 100644 > --- a/tools/perf/tests/make > +++ b/tools/perf/tests/make > @@ -15,6 +15,7 @@ else > PERF := . > PERF_OUT := $(PERF) > O_OPT := > +FULL_O := $(shell readlink -f $(PERF_OUT) || echo $(PERF_OUT)) > > ifneq ($(O),) > FULL_O := $(shell readlink -f $(O) || echo $(O)) > @@ -319,5 +320,29 @@ all: $(run) $(run_O) tarpkg make_kernelsrc make_kernelsrc_tools > out: $(run_O) > @echo OK > > +FEATURES_DUMP_FILE := $(FULL_O)/BUILD_TEST_FEATURE_DUMP > +FEATURES_DUMP_FILE_STATIC := $(FULL_O)/BUILD_TEST_FEATURE_DUMP_STATIC > + > +$(FEATURES_DUMP_FILE): > + $(call clean) > + @cmd="cd $(PERF) && make FEATURE_DUMP_COPY=$@ $(O_OPT) feature-dump"; \ > + echo "- $@: $$cmd" && echo $$cmd && \ > + ( eval $$cmd ) 2>&1 > + > +$(FEATURES_DUMP_FILE_STATIC): > + $(call clean) > + @cmd="cd $(PERF) && make FEATURE_DUMP_COPY=$@ $(O_OPT) LDFLAGS='-static' feature-dump"; \ > + echo "- $@: $$cmd" && echo $$cmd && \ > + ( eval $$cmd ) 2>&1 > + > +$(foreach t,$(run) $(run_O),$(eval \ > + $(t): $(if $(findstring make_static,$(t)),\ > + $(FEATURES_DUMP_FILE_STATIC),\ > + $(FEATURES_DUMP_FILE)))) could you please put comment in here.. it's not too obvious ;-) like saying it's just adding proper feature dump dependency for run/run_O targets.. or something like that > + > +$(foreach t,$(run),$(if $(findstring make_static,$(t)),\ > + $(eval $(t) := $($(t)) FEATURES_DUMP=$(FEATURES_DUMP_FILE_STATIC)),\ > + $(eval $(t) := $($(t)) FEATURES_DUMP=$(FEATURES_DUMP_FILE)))) > + ditto thanks, jirka
[toc] | [prev] | [next] | [standalone]
| From | Wang Nan <wangnan0@huawei.com> |
|---|---|
| Date | 2016-01-13 13:20 +0100 |
| Subject | [PATCH 4/9] perf build: Pass O option to kernel makefile in build-test |
| Message-ID | <qQsz9-7YE-21@gated-at.bofh.it> |
| In reply to | #1308335 |
Kernel makefile only follow 'O' option passed from command line
explicitely. In build-test with 'O' option set, kernel makefile
contaminate kernel source directory. Build test also fail if we
don't create output directory manually.
K_O_OPT is added and passed to kernel makefile if 'O' is passed
to build-test.
Signed-off-by: Wang Nan <wangnan0@huawei.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
---
tools/perf/tests/make | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/tools/perf/tests/make b/tools/perf/tests/make
index 1e59ce8..336a6a6 100644
--- a/tools/perf/tests/make
+++ b/tools/perf/tests/make
@@ -22,6 +22,7 @@ ifneq ($(O),)
ifeq ($(SET_O),1)
O_OPT := 'O=$(FULL_O)'
endif
+ K_O_OPT := 'O=$(FULL_O)'
endif
PARALLEL_OPT=
@@ -301,15 +302,15 @@ ifneq ($(O),)
endif
make_kernelsrc:
- @echo "- make -C <kernelsrc> $(PARALLEL_OPT) tools/perf"
+ @echo "- make -C <kernelsrc> $(PARALLEL_OPT) $(K_O_OPT) tools/perf"
$(call clean); \
- (make -C ../.. $(PARALLEL_OPT) tools/perf) > $@ 2>&1 && \
+ (make -C ../.. $(PARALLEL_OPT) $(K_O_OPT) tools/perf) > $@ 2>&1 && \
test -x $(KBUILD_OUTPUT_DIR)/tools/perf && rm -f $@ || (cat $@ ; false)
make_kernelsrc_tools:
- @echo "- make -C <kernelsrc>/tools $(PARALLEL_OPT) perf"
+ @echo "- make -C <kernelsrc>/tools $(PARALLEL_OPT) $(K_O_OPT) perf"
$(call clean); \
- (make -C ../../tools $(PARALLEL_OPT) perf) > $@ 2>&1 && \
+ (make -C ../../tools $(PARALLEL_OPT) $(K_O_OPT) perf) > $@ 2>&1 && \
test -x $(KBUILD_OUTPUT_DIR)/tools/perf && rm -f $@ || (cat $@ ; false)
all: $(run) $(run_O) tarpkg make_kernelsrc make_kernelsrc_tools
--
1.8.3.4
[toc] | [prev] | [next] | [standalone]
| From | Wang Nan <wangnan0@huawei.com> |
|---|---|
| Date | 2016-01-13 13:20 +0100 |
| Subject | [PATCH 5/9] perf build: Add feature-dump target |
| Message-ID | <qQsz9-7YE-37@gated-at.bofh.it> |
| In reply to | #1308335 |
From: Jiri Olsa <jolsa@kernel.org>
To provide FEATURE-DUMP into $(FEATURE_DUMP_COPY)
if defined, with no further action.
Get feature dump of the current build:
$ make feature-dump
BUILD: Doing 'make -j4' parallel build
Auto-detecting system features:
... dwarf: [ on ]
FEATURE-DUMP file available in FEATURE-DUMP
Get feature dump static build into /tmp/fd file:
$ make feature-dump FEATURE_DUMP_COPY=/tmp/fd LDFLAGS=-static
BUILD: Doing 'make -j4' parallel build
Auto-detecting system features:
... dwarf: [ OFF ]
SNIP
FEATURE-DUMP file copied into /tmp/fd
Suggested-by: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-xzqhfxw3euqmls3cve0ruuol@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Wang Nan <wangnan0@huawei.com>
---
tools/perf/Makefile.perf | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 0a22407..f758a72 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -611,6 +611,17 @@ clean: $(LIBTRACEEVENT)-clean $(LIBAPI)-clean $(LIBBPF)-clean $(LIBSUBCMD)-clean
$(python-clean)
#
+# To provide FEATURE-DUMP into $(FEATURE_DUMP_COPY)
+# file if defined, with no further action.
+feature-dump:
+ifdef FEATURE_DUMP_COPY
+ @cp $(OUTPUT)FEATURE-DUMP $(FEATURE_DUMP_COPY)
+ @echo "FEATURE-DUMP file copied into $(FEATURE_DUMP_COPY)"
+else
+ @echo "FEATURE-DUMP file available in $(OUTPUT)FEATURE-DUMP"
+endif
+
+#
# Trick: if ../../.git does not exist - we are building out of tree for example,
# then force version regeneration:
#
--
1.8.3.4
[toc] | [prev] | [next] | [standalone]
| From | Wang Nan <wangnan0@huawei.com> |
|---|---|
| Date | 2016-01-13 13:20 +0100 |
| Subject | [PATCH 7/9] tools build: Allow subprojects select all feature checkers |
| Message-ID | <qQsz9-7YE-33@gated-at.bofh.it> |
| In reply to | #1308335 |
Put feature checkers not in original FEATURE_TESTS to a new list and allow subproject select all feature checkers by setting FEATURE_TESTS to 'all'. Signed-off-by: Wang Nan <wangnan0@huawei.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> --- tools/build/Makefile.feature | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature index 02db3cd..674c47d 100644 --- a/tools/build/Makefile.feature +++ b/tools/build/Makefile.feature @@ -27,7 +27,7 @@ endef # the rule that uses them - an example for that is the 'bionic' # feature check. ] # -FEATURE_TESTS ?= \ +FEATURE_TESTS_BASIC := \ backtrace \ dwarf \ fortify-source \ @@ -56,6 +56,25 @@ FEATURE_TESTS ?= \ get_cpuid \ bpf +# 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 + +FEATURE_TESTS ?= $(FEATURE_TESTS_BASIC) + +ifeq ($(FEATURE_TESTS),all) + FEATURE_TESTS := $(FEATURE_TESTS_BASIC) $(FEATURE_TESTS_EXTRA) +endif + FEATURE_DISPLAY ?= \ dwarf \ glibc \ -- 1.8.3.4
[toc] | [prev] | [next] | [standalone]
| From | Wang Nan <wangnan0@huawei.com> |
|---|---|
| Date | 2016-01-13 13:30 +0100 |
| Subject | [PATCH 8/9] perf build: Select all feature checkers for feature-dump |
| Message-ID | <qQsIO-84i-11@gated-at.bofh.it> |
| In reply to | #1308335 |
Set FEATURE_TESTS to 'all' so all possible feature checkers are' executed. Without this setting the output feature dump file miss some feature, for example, liberity. Select all checker so we won't use a incomplete feature dump file. Signed-off-by: Wang Nan <wangnan0@huawei.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> --- tools/perf/Makefile.perf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 5d34815..a199fc4 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -166,6 +166,11 @@ endif endif ifeq ($(config),1) +ifdef MAKECMDGOALS +ifeq ($(filter feature-dump,$(MAKECMDGOALS)),feature-dump) +FEATURE_TESTS := all +endif +endif include config/Makefile endif -- 1.8.3.4
[toc] | [prev] | [next] | [standalone]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2016-01-14 11:20 +0100 |
| Subject | Re: [PATCH 8/9] perf build: Select all feature checkers for feature-dump |
| Message-ID | <qQNax-5z6-9@gated-at.bofh.it> |
| In reply to | #1308350 |
On Wed, Jan 13, 2016 at 12:17:21PM +0000, Wang Nan wrote: > Set FEATURE_TESTS to 'all' so all possible feature checkers are' > executed. Without this setting the output feature dump file miss > some feature, for example, liberity. Select all checker so we won't > use a incomplete feature dump file. > > Signed-off-by: Wang Nan <wangnan0@huawei.com> > Cc: Jiri Olsa <jolsa@kernel.org> > Cc: Arnaldo Carvalho de Melo <acme@redhat.com> > Cc: Namhyung Kim <namhyung@kernel.org> > --- > tools/perf/Makefile.perf | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf > index 5d34815..a199fc4 100644 > --- a/tools/perf/Makefile.perf > +++ b/tools/perf/Makefile.perf > @@ -166,6 +166,11 @@ endif > endif > > ifeq ($(config),1) > +ifdef MAKECMDGOALS > +ifeq ($(filter feature-dump,$(MAKECMDGOALS)),feature-dump) > +FEATURE_TESTS := all > +endif > +endif please put the changelog comment in here as well thanks, jirka
[toc] | [prev] | [next] | [standalone]
| From | Wang Nan <wangnan0@huawei.com> |
|---|---|
| Date | 2016-01-13 13:30 +0100 |
| Subject | [PATCH 2/9] perf build: Pass O option to Makefile.perf in build-test |
| Message-ID | <qQsIO-84i-15@gated-at.bofh.it> |
| In reply to | #1308335 |
Doesn't like tools/perf/Makefile, tools/perf/Makefile.perf obey 'O' option when it is passed through cmdline only, because of code in tools/scripts/Makefile.include: ifneq ($(O),) ifeq ($(origin O), command line) ... ABSOLUTE_O := $(shell cd $(O) ; pwd) OUTPUT := $(ABSOLUTE_O)/$(if $(subdir),$(subdir)/) endif endif This patch passes 'O' to Makefile.perf through cmdline explicitly to make it follow O variable during build-test. Signed-off-by: Wang Nan <wangnan0@huawei.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> --- tools/perf/tests/make | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tools/perf/tests/make b/tools/perf/tests/make index c0ee679..14d7b8d 100644 --- a/tools/perf/tests/make +++ b/tools/perf/tests/make @@ -5,7 +5,7 @@ ifeq ($(MAKECMDGOALS),) # no target specified, trigger the whole suite all: @echo "Testing Makefile"; $(MAKE) -sf tests/make MK=Makefile - @echo "Testing Makefile.perf"; $(MAKE) -sf tests/make MK=Makefile.perf SET_PARALLEL=1 + @echo "Testing Makefile.perf"; $(MAKE) -sf tests/make MK=Makefile.perf SET_PARALLEL=1 SET_O=1 else # run only specific test over 'Makefile' %: @@ -13,6 +13,14 @@ else endif else PERF := . +O_OPT := + +ifneq ($(O),) + FULL_O := $(shell readlink -f $(O) || echo $(O)) + ifeq ($(SET_O),1) + O_OPT := 'O=$(FULL_O)' + endif +endif PARALLEL_OPT= ifeq ($(SET_PARALLEL),1) @@ -261,7 +269,7 @@ clean := @(cd $(PERF); make -s -f $(MK) clean >/dev/null) $(run): $(call clean) @TMP_DEST=$$(mktemp -d); \ - cmd="cd $(PERF) && make -f $(MK) $(PARALLEL_OPT) DESTDIR=$$TMP_DEST $($@)"; \ + cmd="cd $(PERF) && make -f $(MK) $(PARALLEL_OPT) $(O_OPT) DESTDIR=$$TMP_DEST $($@)"; \ echo "- $@: $$cmd" && echo $$cmd > $@ && \ ( eval $$cmd ) >> $@ 2>&1; \ echo " test: $(call test,$@)" >> $@ 2>&1; \ -- 1.8.3.4
[toc] | [prev] | [next] | [standalone]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2016-01-14 10:40 +0100 |
| Subject | Re: [PATCH 2/9] perf build: Pass O option to Makefile.perf in build-test |
| Message-ID | <qQMxQ-54U-19@gated-at.bofh.it> |
| In reply to | #1308352 |
On Wed, Jan 13, 2016 at 12:17:15PM +0000, Wang Nan wrote: > Doesn't like tools/perf/Makefile, tools/perf/Makefile.perf obey 'O' > option when it is passed through cmdline only, because of code in > tools/scripts/Makefile.include: > > ifneq ($(O),) > ifeq ($(origin O), command line) > ... > ABSOLUTE_O := $(shell cd $(O) ; pwd) > OUTPUT := $(ABSOLUTE_O)/$(if $(subdir),$(subdir)/) > endif > endif > > This patch passes 'O' to Makefile.perf through cmdline explicitly > to make it follow O variable during build-test. > > Signed-off-by: Wang Nan <wangnan0@huawei.com> > Cc: Arnaldo Carvalho de Melo <acme@redhat.com> > Cc: Jiri Olsa <jolsa@kernel.org> > Cc: Namhyung Kim <namhyung@kernel.org> > --- > tools/perf/tests/make | 12 ++++++++++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > > diff --git a/tools/perf/tests/make b/tools/perf/tests/make > index c0ee679..14d7b8d 100644 > --- a/tools/perf/tests/make > +++ b/tools/perf/tests/make > @@ -5,7 +5,7 @@ ifeq ($(MAKECMDGOALS),) > # no target specified, trigger the whole suite > all: > @echo "Testing Makefile"; $(MAKE) -sf tests/make MK=Makefile > - @echo "Testing Makefile.perf"; $(MAKE) -sf tests/make MK=Makefile.perf SET_PARALLEL=1 > + @echo "Testing Makefile.perf"; $(MAKE) -sf tests/make MK=Makefile.perf SET_PARALLEL=1 SET_O=1 > else > # run only specific test over 'Makefile' > %: > @@ -13,6 +13,14 @@ else > endif > else > PERF := . > +O_OPT := > + > +ifneq ($(O),) > + FULL_O := $(shell readlink -f $(O) || echo $(O)) > + ifeq ($(SET_O),1) > + O_OPT := 'O=$(FULL_O)' > + endif > +endif > > PARALLEL_OPT= > ifeq ($(SET_PARALLEL),1) > @@ -261,7 +269,7 @@ clean := @(cd $(PERF); make -s -f $(MK) clean >/dev/null) > $(run): > $(call clean) > @TMP_DEST=$$(mktemp -d); \ > - cmd="cd $(PERF) && make -f $(MK) $(PARALLEL_OPT) DESTDIR=$$TMP_DEST $($@)"; \ > + cmd="cd $(PERF) && make -f $(MK) $(PARALLEL_OPT) $(O_OPT) DESTDIR=$$TMP_DEST $($@)"; \ hum, but this set is to test make without O=... so why would you set it? run_O is the target for O=... tests thanks, jirka
[toc] | [prev] | [next] | [standalone]
Page 1 of 2 [1] 2 Next page →
Back to top | Article view | linux.kernel
csiph-web