perf/tests improvements
Arnaldo Carvalho de Melo
maintainerHi Jiri,
Experimenting with more topic branches, this time for things you're the
are the original developer and de facto maintainer, the tools/perf/tests/ harness.
This was done on top of your perf/core branch, please let me know if all is
ok and then you can try pulling from it or perhaps you could just ack it and then Ingo could pull it directly, opinions? Ingo?
- Arnaldo
The following changes since commit 1bb7b24b0457eeea549262780c0b9d0755416e2f:
perf tools: Support spark lines in perf stat (2014-06-06 11:54:06 +0200)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-tests-for-jirka
for you to fetch changes up to 38b8d135293e110780eaa02b021eb9c13c4009a6:
perf tests: Show the inner make output when an error happens (2014-06-06 10:45:09 -0300)
----------------------------------------------------------------
perf/tests improvements:
Developer stuff.
. Emit more precise message for missing glibc static library,
from Arnaldo Carvalho de Melo.
. Show the 'make -f tests/make' inner make output when an error happens.
The perf build tests harness, invoked with:
make -C tools/perf -f tests/make
Will call many combinations of builds, trying to check if all of them continue to work over time, for instance, if removing perl support, or if building using static libraries still builds fine.
But one would have to check the contents of a per build test entry file to figure out what the error was about. Do it automatically, speeding up the process of, for instance, installing missing static libraries.
from Arnaldo Carvalho de Melo.
----------------------------------------------------------------
Arnaldo Carvalho de Melo (2):
perf tools: Emit more precise message for missing glibc static library perf tests: Show the inner make output when an error happens
tools/perf/config/Makefile | 6 +++++- tools/perf/tests/make | 3 +-- 2 files changed, 6 insertions(+), 3 deletions(-)
Arnaldo Carvalho de Melo
maintainerPATCH 1/2 perf tools: Emit more precise message for missing glibc static library
From: Arnaldo Carvalho de Melo <[email protected]>
When the user does:
make -C tools/perf LDFLAGS=-static
asking for a static build, and the glibc-static (or equivalent) is not found, the message wasn't clear, stating that one of glibc-devel or glibc-static wasn't installed, clarify it checking if -static is present in LDFLAGS.
--- tools/perf/config/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
tools/perf/config/Makefile +5 -1
@@ -299,7 +299,11 @@ else NO_LIBUNWIND := 1 NO_LIBDW_DWARF_UNWIND := 1 else - msg := $(error No gnu/libc-version.h found, please install glibc-dev[el]/glibc-static); + ifneq ($(filter s% -static%,$(LDFLAGS),),) + msg := $(error No static glibc found, please install glibc-static); + else + msg := $(error No gnu/libc-version.h found, please install glibc-dev[el]); + endif endif else ifndef NO_LIBDW_DWARF_UNWIND
Signature · 1 line
1.9.3
Re: [PATCH 1/2] perf tools: Emit more precise message for missing glibc static library
Hi Arnaldo,
I am hijacking your thread for another Makefile problem. It seems like you were doing some cleanups here, so I wanted to throw another problem at you. :-)
It seems the fedora-kernel guys found a multilib packaging problem and posted a patch to clean it up. It is from Kyle McMartin (copy-n-pasted).
tools/perf/config/Makefile +4 -0
@@ -621,8 +621,12 @@ endif ifeq ($(IS_X86_64),1) lib = lib64 else +ifdef MULTILIBDIR +lib = $(MULTILIBDIR) +else lib = lib endif +endif libdir = $(prefix)/$(lib) # Shell quote (do not use $(call) to accommodate ancient setups);
Not sure if this is the right way to do this or if you had a better solution.
Cheers,
Don
Arnaldo Carvalho de Melo
maintainerperf tools: MULTILIB install issues. was Re: [PATCH 1/2] perf tools: Emit more precise message for missing glibc static library
Em Tue, Jun 10, 2014 at 11:50:31AM -0400, Don Zickus escreveu:
Quoted 3 lines
I am hijacking your thread for another
Makefileproblem. It seems like you were doing some cleanups here, so I wanted to throw another problem at you. :-)
Yeah, I skimmed that discussion about our home grown autoconf replacement 8-)
Quoted 19 lines
It seems the fedora-kernel guys found a multilib packaging problem and posted a patch to clean it up. It is from Kyle McMartin (copy-n-pasted).
+++ b/tools/perf/config/Makefile
tools/perf/config/Makefile +4
-0@@ -621,8 +621,12 @@ endif ifeq ($(IS_X86_64),1) lib = lib64 else +ifdef MULTILIBDIR +lib = $(MULTILIBDIR) +else lib = lib endif +endif libdir = $(prefix)/$(lib) # Shell quote (do not use $(call) to accommodate ancient setups);
Quoted 2 lines
Not sure if this is the right way to do this or if you had a better solution.
I'm unsure as well, but it looks like something that suits the needs of distros, right? Anyone?
- Arnaldo
Arnaldo Carvalho de Melo
maintainerPATCH 2/2 perf tests: Show the inner make output when an error happens
In reply to Arnaldo Carvalho de MeloFrom: Arnaldo Carvalho de Melo <[email protected]>
Before:
[acme@zoo linux]$ make -C tools/perf -f tests/make make_static
make: Entering directory `/home/git/linux/tools/perf'
- make_static: cd . && make -f Makefile DESTDIR=/tmp/tmp.JcWuM4Zu9f LDFLAGS=-static
make: *** [make_static] Error 1
make: Leaving directory `/home/git/linux/tools/perf'
[acme@zoo linux]$
After:
[acme@zoo linux]$ make -C tools/perf -f tests/make make_static
make: Entering directory `/home/git/linux/tools/perf'
- make_static: cd . && make -f Makefile DESTDIR=/tmp/tmp.X3su83i14u LDFLAGS=-static cd . && make -f Makefile DESTDIR=/tmp/tmp.X3su83i14u LDFLAGS=-static
BUILD: Doing 'make -j4' parallel build
config/Makefile:303: *** No static glibc found, please install glibc-static. Stop. make[1]: *** [all] Error 2
test: test -x ./perf
make: Leaving directory `/home/git/linux/tools/perf'
[acme@zoo linux]$
--- tools/perf/tests/make | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
tools/perf/tests/make +1 -2
@@ -205,8 +205,7 @@ $(run): ( eval $$cmd ) >> $@ 2>&1; \ echo " test: $(call test,$@)" >> $@ 2>&1; \ $(call test,$@) && \ - rm -f $@ \ - rm -rf $$TMP_DEST + rm -rf $@ $$TMP_DEST || cat $@ $(run_O): $(call clean)
Signature · 1 line
1.9.3
Re: [PATCH 2/2] perf tests: Show the inner make output when an error happens
Quoted 45 lines · Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo <[email protected]>
Before:
[acme@zoo linux]$ make -C
tools/perf-f tests/makemake_static
make: Entering directory `/home/git/linux/tools/perf'
-make_static: cd . && make -fMakefileDESTDIR=/tmp/tmp.JcWuM4Zu9f LDFLAGS=-static
make: *** [make_static] Error 1
make: Leaving directory `/home/git/linux/tools/perf'
[acme@zoo linux]$After:
[acme@zoo linux]$ make -C
tools/perf-f tests/makemake_static
make: Entering directory `/home/git/linux/tools/perf'
-make_static: cd . && make -fMakefileDESTDIR=/tmp/tmp.X3su83i14u LDFLAGS=-static cd . && make -fMakefileDESTDIR=/tmp/tmp.X3su83i14u LDFLAGS=-static
BUILD: Doing 'make -j4' parallel build
config/Makefile:303: *** No static glibc found, please install glibc-static. Stop. make[1]: *** [all] Error 2
test: test -x ./perf
make: Leaving directory `/home/git/linux/tools/perf'
[acme@zoo linux]$Cc Adrian Hunter <[email protected]>Cc David Ahern <[email protected]>Cc Don Zickus <[email protected]>Cc Frederic Weisbecker <[email protected]>Cc Ingo Molnar <[email protected]>Cc Mike Galbraith <[email protected]>Cc Namhyung Kim <[email protected]>Cc Paul Mackerras <[email protected]>Cc Peter Zijlstra <[email protected]>Cc Stephane Eranian <[email protected]>Signed-off-by Arnaldo Carvalho de Melo <[email protected]>--- tools/perf/tests/make | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)tools/perf/tests/make +0
-0
tools/perf/tests/make $(run): · line 208
Quoted 6 lines
tools/perf/tests/make +1
-2@@ -205,8 +205,7 @@ $(run): ( eval $$cmd ) >> $@ 2>&1; \ echo " test: $(call test,$@)" >> $@ 2>&1; \ $(call test,$@) && \ - rm -f $@ \ - rm -rf $$TMP_DEST + rm -rf $@ $$TMP_DEST || cat $@
I like that we show the log, but we need to fail the target so the processing is stopped and the rest is not executed, like adding this:
.... cat $@ && false
tools/perf/tests/make $(run): · line 211
Quoted 3 lines
tools/perf/tests/make +0
-0$(run_O): $(call clean)
also you need to put same change to $(run_O) target
thanks,
jirka
Arnaldo Carvalho de Melo
maintainerRe: [PATCH 2/2] perf tests: Show the inner make output when an error happens
Em Fri, Jun 06, 2014 at 04:50:23PM +0200, Jiri Olsa escreveu:
Quoted 15 lines · Arnaldo Carvalho de Melo
Review $(run): · line 208
Quoted 9 lines
From: Arnaldo Carvalho de Melo <[email protected]>
+++ b/tools/perf/tests/make(quoted diff) +1
-2@@ -205,8 +205,7 @@ $(run): ( eval $$cmd ) >> $@ 2>&1; \ echo " test: $(call test,$@)" >> $@ 2>&1; \ $(call test,$@) && \ - rm -f $@ \ - rm -rf $$TMP_DEST + rm -rf $@ $$TMP_DEST || cat $@I like that we show the log, but we need to fail the target so the processing is stopped and the rest is not executed, like adding this:
Quoted 6 lines
.... cat $@ && falseReview $(run): · line 210
Quoted 2 lines
(quoted diff) +0
-0$(run_O): $(call clean)also you need to put same change to $(run_O) target
Updated patch:
commit 40cb3da56c614bb3ea42ce4b99e379859d8be9a5
Author: Arnaldo Carvalho de Melo <[email protected]> Date: Thu Jun 5 17:15:47 2014 -0300
perf tests: Show the inner make output when an error happens
Before:
[acme@zoo linux]$ make -C tools/perf -f tests/make make_static
make: Entering directory `/home/git/linux/tools/perf'
- make_static: cd . && make -f Makefile DESTDIR=/tmp/tmp.JcWuM4Zu9f LDFLAGS=-static
make: *** [make_static] Error 1
make: Leaving directory `/home/git/linux/tools/perf'
[acme@zoo linux]$
After:
[acme@zoo linux]$ make -C tools/perf -f tests/make make_static
make: Entering directory `/home/git/linux/tools/perf'
- make_static: cd . && make -f Makefile DESTDIR=/tmp/tmp.X3su83i14u LDFLAGS=-static cd . && make -f Makefile DESTDIR=/tmp/tmp.X3su83i14u LDFLAGS=-static
BUILD: Doing 'make -j4' parallel build
config/Makefile:303: *** No static glibc found, please install glibc-static. Stop. make[1]: *** [all] Error 2
test: test -x ./perf
make: Leaving directory `/home/git/linux/tools/perf'
[acme@zoo linux]$
tools/perf/tests/make +2 -5
@@ -205,8 +205,7 @@ $(run): ( eval $$cmd ) >> $@ 2>&1; \ echo " test: $(call test,$@)" >> $@ 2>&1; \ $(call test,$@) && \ - rm -f $@ \ - rm -rf $$TMP_DEST + rm -rf $@ $$TMP_DEST || (cat $@ ; false) $(run_O): $(call clean)
@@ -217,9 +216,7 @@ $(run_O): ( eval $$cmd ) >> $@ 2>&1 && \ echo " test: $(call test_O,$@)" >> $@ 2>&1; \ $(call test_O,$@) && \ - rm -f $@ && \ - rm -rf $$TMP_O \ - rm -rf $$TMP_DEST + rm -rf $@ $$TMP_O $$TMP_DEST || (cat $@ ; false) tarpkg: @cmd="$(PERF)/tests/perf-targz-src-pkg $(PERF)"; \
Quoted 8 lines · Arnaldo Carvalho de Melo
Hi Jiri,
Experimenting with more topic branches, this time for things you're the
are the original developer and de facto maintainer, thetools/perf/tests/harness.This was done on top of your perf/core branch, please let me know if all is
ok and then you can try pulling from it or perhaps you could just ack it and then Ingo could pull it directly, opinions? Ingo?
either way works for me,
thanks,
jirka
Arnaldo Carvalho de Melo
maintainerEm Fri, Jun 06, 2014 at 04:51:11PM +0200, Jiri Olsa escreveu:
Quoted 11 lines · Arnaldo Carvalho de Melo
Quoted 8 lines
Hi Jiri,
Experimenting with more topic branches, this time for things you're the
are the original developer and de facto maintainer, thetools/perf/tests/harness.This was done on top of your perf/core branch, please let me know if all is
ok and then you can try pulling from it or perhaps you could just ack it and then Ingo could pull it directly, opinions? Ingo?either way works for me,
Ok, I'll fix up the problem you mentioned and refresh the branch.
- Arnaldo