diff options
author | Chunwei Chen <tuxoko@gmail.com> | 2013-12-21 00:48:11 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-12-23 14:49:51 -0500 |
commit | 56560ec692c142bb9ee404764e3b67999031ad19 (patch) | |
tree | c0572c84f434033736bf938f8b5b0ce6a3edffc2 | |
parent | c239c25a82808ad2cbc795b69e621c4c24f154d6 (diff) |
perf config: Ignore generated files in feature-checks
1. Rename the test-* binary files to test-*.bin for easier pattern matching as
suggested by Ingo.
2. Ignore *.bin and *.d files.
Signed-off-by: Chunwei Chen <tuxoko@gmail.com>
Reviewed-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/52B52B9B.50708@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r-- | tools/perf/config/Makefile | 6 | ||||
-rw-r--r-- | tools/perf/config/feature-checks/.gitignore | 2 | ||||
-rw-r--r-- | tools/perf/config/feature-checks/Makefile | 110 |
3 files changed, 60 insertions, 58 deletions
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile index 5a1f4df3c3a8..14faeeb0d752 100644 --- a/tools/perf/config/Makefile +++ b/tools/perf/config/Makefile | |||
@@ -126,7 +126,7 @@ endif | |||
126 | 126 | ||
127 | feature_check = $(eval $(feature_check_code)) | 127 | feature_check = $(eval $(feature_check_code)) |
128 | define feature_check_code | 128 | define feature_check_code |
129 | feature-$(1) := $(shell $(MAKE) OUTPUT=$(OUTPUT_FEATURES) CFLAGS="$(EXTRA_CFLAGS) $(FEATURE_CHECK_CFLAGS-$(1))" LDFLAGS="$(LDFLAGS) $(FEATURE_CHECK_LDFLAGS-$(1))" -C config/feature-checks test-$1 >/dev/null 2>/dev/null && echo 1 || echo 0) | 129 | feature-$(1) := $(shell $(MAKE) OUTPUT=$(OUTPUT_FEATURES) CFLAGS="$(EXTRA_CFLAGS) $(FEATURE_CHECK_CFLAGS-$(1))" LDFLAGS="$(LDFLAGS) $(FEATURE_CHECK_LDFLAGS-$(1))" -C config/feature-checks test-$1.bin >/dev/null 2>/dev/null && echo 1 || echo 0) |
130 | endef | 130 | endef |
131 | 131 | ||
132 | feature_set = $(eval $(feature_set_code)) | 132 | feature_set = $(eval $(feature_set_code)) |
@@ -173,7 +173,7 @@ CORE_FEATURE_TESTS = \ | |||
173 | # to skip the print-out of the long features list if the file | 173 | # to skip the print-out of the long features list if the file |
174 | # existed before and after it was built: | 174 | # existed before and after it was built: |
175 | # | 175 | # |
176 | ifeq ($(wildcard $(OUTPUT)config/feature-checks/test-all),) | 176 | ifeq ($(wildcard $(OUTPUT)config/feature-checks/test-all.bin),) |
177 | test-all-failed := 1 | 177 | test-all-failed := 1 |
178 | else | 178 | else |
179 | test-all-failed := 0 | 179 | test-all-failed := 0 |
@@ -203,7 +203,7 @@ ifeq ($(feature-all), 1) | |||
203 | # | 203 | # |
204 | $(foreach feat,$(CORE_FEATURE_TESTS),$(call feature_set,$(feat))) | 204 | $(foreach feat,$(CORE_FEATURE_TESTS),$(call feature_set,$(feat))) |
205 | else | 205 | else |
206 | $(shell $(MAKE) OUTPUT=$(OUTPUT_FEATURES) CFLAGS="$(EXTRA_CFLAGS)" LDFLAGS=$(LDFLAGS) -i -j -C config/feature-checks $(CORE_FEATURE_TESTS) >/dev/null 2>&1) | 206 | $(shell $(MAKE) OUTPUT=$(OUTPUT_FEATURES) CFLAGS="$(EXTRA_CFLAGS)" LDFLAGS=$(LDFLAGS) -i -j -C config/feature-checks $(addsuffix .bin,$(CORE_FEATURE_TESTS)) >/dev/null 2>&1) |
207 | $(foreach feat,$(CORE_FEATURE_TESTS),$(call feature_check,$(feat))) | 207 | $(foreach feat,$(CORE_FEATURE_TESTS),$(call feature_check,$(feat))) |
208 | endif | 208 | endif |
209 | 209 | ||
diff --git a/tools/perf/config/feature-checks/.gitignore b/tools/perf/config/feature-checks/.gitignore new file mode 100644 index 000000000000..80f3da0c3515 --- /dev/null +++ b/tools/perf/config/feature-checks/.gitignore | |||
@@ -0,0 +1,2 @@ | |||
1 | *.d | ||
2 | *.bin | ||
diff --git a/tools/perf/config/feature-checks/Makefile b/tools/perf/config/feature-checks/Makefile index bc86462e80a2..7cf6fcdacebe 100644 --- a/tools/perf/config/feature-checks/Makefile +++ b/tools/perf/config/feature-checks/Makefile | |||
@@ -1,90 +1,90 @@ | |||
1 | 1 | ||
2 | FILES= \ | 2 | FILES= \ |
3 | test-all \ | 3 | test-all.bin \ |
4 | test-backtrace \ | 4 | test-backtrace.bin \ |
5 | test-bionic \ | 5 | test-bionic.bin \ |
6 | test-dwarf \ | 6 | test-dwarf.bin \ |
7 | test-fortify-source \ | 7 | test-fortify-source.bin \ |
8 | test-glibc \ | 8 | test-glibc.bin \ |
9 | test-gtk2 \ | 9 | test-gtk2.bin \ |
10 | test-gtk2-infobar \ | 10 | test-gtk2-infobar.bin \ |
11 | test-hello \ | 11 | test-hello.bin \ |
12 | test-libaudit \ | 12 | test-libaudit.bin \ |
13 | test-libbfd \ | 13 | test-libbfd.bin \ |
14 | test-liberty \ | 14 | test-liberty.bin \ |
15 | test-liberty-z \ | 15 | test-liberty-z.bin \ |
16 | test-cplus-demangle \ | 16 | test-cplus-demangle.bin \ |
17 | test-libelf \ | 17 | test-libelf.bin \ |
18 | test-libelf-getphdrnum \ | 18 | test-libelf-getphdrnum.bin \ |
19 | test-libelf-mmap \ | 19 | test-libelf-mmap.bin \ |
20 | test-libnuma \ | 20 | test-libnuma.bin \ |
21 | test-libperl \ | 21 | test-libperl.bin \ |
22 | test-libpython \ | 22 | test-libpython.bin \ |
23 | test-libpython-version \ | 23 | test-libpython-version.bin \ |
24 | test-libslang \ | 24 | test-libslang.bin \ |
25 | test-libunwind \ | 25 | test-libunwind.bin \ |
26 | test-libunwind-debug-frame \ | 26 | test-libunwind-debug-frame.bin \ |
27 | test-on-exit \ | 27 | test-on-exit.bin \ |
28 | test-stackprotector-all \ | 28 | test-stackprotector-all.bin \ |
29 | test-timerfd | 29 | test-timerfd.bin |
30 | 30 | ||
31 | CC := $(CC) -MD | 31 | CC := $(CC) -MD |
32 | 32 | ||
33 | all: $(FILES) | 33 | all: $(FILES) |
34 | 34 | ||
35 | BUILD = $(CC) $(CFLAGS) -o $(OUTPUT)$@ $@.c $(LDFLAGS) | 35 | BUILD = $(CC) $(CFLAGS) -o $(OUTPUT)$@ $(patsubst %.bin,%.c,$@) $(LDFLAGS) |
36 | 36 | ||
37 | ############################### | 37 | ############################### |
38 | 38 | ||
39 | test-all: | 39 | test-all.bin: |
40 | $(BUILD) -Werror -fstack-protector-all -O2 -Werror -D_FORTIFY_SOURCE=2 -ldw -lelf -lnuma -lelf -laudit -I/usr/include/slang -lslang $(shell pkg-config --libs --cflags gtk+-2.0 2>/dev/null) $(FLAGS_PERL_EMBED) $(FLAGS_PYTHON_EMBED) -DPACKAGE='"perf"' -lbfd -ldl | 40 | $(BUILD) -Werror -fstack-protector-all -O2 -Werror -D_FORTIFY_SOURCE=2 -ldw -lelf -lnuma -lelf -laudit -I/usr/include/slang -lslang $(shell pkg-config --libs --cflags gtk+-2.0 2>/dev/null) $(FLAGS_PERL_EMBED) $(FLAGS_PYTHON_EMBED) -DPACKAGE='"perf"' -lbfd -ldl |
41 | 41 | ||
42 | test-hello: | 42 | test-hello.bin: |
43 | $(BUILD) | 43 | $(BUILD) |
44 | 44 | ||
45 | test-stackprotector-all: | 45 | test-stackprotector-all.bin: |
46 | $(BUILD) -Werror -fstack-protector-all | 46 | $(BUILD) -Werror -fstack-protector-all |
47 | 47 | ||
48 | test-fortify-source: | 48 | test-fortify-source.bin: |
49 | $(BUILD) -O2 -Werror -D_FORTIFY_SOURCE=2 | 49 | $(BUILD) -O2 -Werror -D_FORTIFY_SOURCE=2 |
50 | 50 | ||
51 | test-bionic: | 51 | test-bionic.bin: |
52 | $(BUILD) | 52 | $(BUILD) |
53 | 53 | ||
54 | test-libelf: | 54 | test-libelf.bin: |
55 | $(BUILD) -lelf | 55 | $(BUILD) -lelf |
56 | 56 | ||
57 | test-glibc: | 57 | test-glibc.bin: |
58 | $(BUILD) | 58 | $(BUILD) |
59 | 59 | ||
60 | test-dwarf: | 60 | test-dwarf.bin: |
61 | $(BUILD) -ldw | 61 | $(BUILD) -ldw |
62 | 62 | ||
63 | test-libelf-mmap: | 63 | test-libelf-mmap.bin: |
64 | $(BUILD) -lelf | 64 | $(BUILD) -lelf |
65 | 65 | ||
66 | test-libelf-getphdrnum: | 66 | test-libelf-getphdrnum.bin: |
67 | $(BUILD) -lelf | 67 | $(BUILD) -lelf |
68 | 68 | ||
69 | test-libnuma: | 69 | test-libnuma.bin: |
70 | $(BUILD) -lnuma | 70 | $(BUILD) -lnuma |
71 | 71 | ||
72 | test-libunwind: | 72 | test-libunwind.bin: |
73 | $(BUILD) -lelf | 73 | $(BUILD) -lelf |
74 | 74 | ||
75 | test-libunwind-debug-frame: | 75 | test-libunwind-debug-frame.bin: |
76 | $(BUILD) -lelf | 76 | $(BUILD) -lelf |
77 | 77 | ||
78 | test-libaudit: | 78 | test-libaudit.bin: |
79 | $(BUILD) -laudit | 79 | $(BUILD) -laudit |
80 | 80 | ||
81 | test-libslang: | 81 | test-libslang.bin: |
82 | $(BUILD) -I/usr/include/slang -lslang | 82 | $(BUILD) -I/usr/include/slang -lslang |
83 | 83 | ||
84 | test-gtk2: | 84 | test-gtk2.bin: |
85 | $(BUILD) $(shell pkg-config --libs --cflags gtk+-2.0 2>/dev/null) | 85 | $(BUILD) $(shell pkg-config --libs --cflags gtk+-2.0 2>/dev/null) |
86 | 86 | ||
87 | test-gtk2-infobar: | 87 | test-gtk2-infobar.bin: |
88 | $(BUILD) $(shell pkg-config --libs --cflags gtk+-2.0 2>/dev/null) | 88 | $(BUILD) $(shell pkg-config --libs --cflags gtk+-2.0 2>/dev/null) |
89 | 89 | ||
90 | grep-libs = $(filter -l%,$(1)) | 90 | grep-libs = $(filter -l%,$(1)) |
@@ -96,7 +96,7 @@ PERL_EMBED_LIBADD = $(call grep-libs,$(PERL_EMBED_LDOPTS)) | |||
96 | PERL_EMBED_CCOPTS = `perl -MExtUtils::Embed -e ccopts 2>/dev/null` | 96 | PERL_EMBED_CCOPTS = `perl -MExtUtils::Embed -e ccopts 2>/dev/null` |
97 | FLAGS_PERL_EMBED=$(PERL_EMBED_CCOPTS) $(PERL_EMBED_LDOPTS) | 97 | FLAGS_PERL_EMBED=$(PERL_EMBED_CCOPTS) $(PERL_EMBED_LDOPTS) |
98 | 98 | ||
99 | test-libperl: | 99 | test-libperl.bin: |
100 | $(BUILD) $(FLAGS_PERL_EMBED) | 100 | $(BUILD) $(FLAGS_PERL_EMBED) |
101 | 101 | ||
102 | override PYTHON := python | 102 | override PYTHON := python |
@@ -113,31 +113,31 @@ PYTHON_EMBED_LIBADD = $(call grep-libs,$(PYTHON_EMBED_LDOPTS)) | |||
113 | PYTHON_EMBED_CCOPTS = $(shell $(PYTHON_CONFIG_SQ) --cflags 2>/dev/null) | 113 | PYTHON_EMBED_CCOPTS = $(shell $(PYTHON_CONFIG_SQ) --cflags 2>/dev/null) |
114 | FLAGS_PYTHON_EMBED = $(PYTHON_EMBED_CCOPTS) $(PYTHON_EMBED_LDOPTS) | 114 | FLAGS_PYTHON_EMBED = $(PYTHON_EMBED_CCOPTS) $(PYTHON_EMBED_LDOPTS) |
115 | 115 | ||
116 | test-libpython: | 116 | test-libpython.bin: |
117 | $(BUILD) $(FLAGS_PYTHON_EMBED) | 117 | $(BUILD) $(FLAGS_PYTHON_EMBED) |
118 | 118 | ||
119 | test-libpython-version: | 119 | test-libpython-version.bin: |
120 | $(BUILD) $(FLAGS_PYTHON_EMBED) | 120 | $(BUILD) $(FLAGS_PYTHON_EMBED) |
121 | 121 | ||
122 | test-libbfd: | 122 | test-libbfd.bin: |
123 | $(BUILD) -DPACKAGE='"perf"' -lbfd -ldl | 123 | $(BUILD) -DPACKAGE='"perf"' -lbfd -ldl |
124 | 124 | ||
125 | test-liberty: | 125 | test-liberty.bin: |
126 | $(CC) -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' -lbfd -ldl -liberty | 126 | $(CC) -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' -lbfd -ldl -liberty |
127 | 127 | ||
128 | test-liberty-z: | 128 | test-liberty-z.bin: |
129 | $(CC) -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' -lbfd -ldl -liberty -lz | 129 | $(CC) -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' -lbfd -ldl -liberty -lz |
130 | 130 | ||
131 | test-cplus-demangle: | 131 | test-cplus-demangle.bin: |
132 | $(BUILD) -liberty | 132 | $(BUILD) -liberty |
133 | 133 | ||
134 | test-on-exit: | 134 | test-on-exit.bin: |
135 | $(BUILD) | 135 | $(BUILD) |
136 | 136 | ||
137 | test-backtrace: | 137 | test-backtrace.bin: |
138 | $(BUILD) | 138 | $(BUILD) |
139 | 139 | ||
140 | test-timerfd: | 140 | test-timerfd.bin: |
141 | $(BUILD) | 141 | $(BUILD) |
142 | 142 | ||
143 | -include *.d | 143 | -include *.d |