summaryrefslogtreecommitdiffstats
path: root/tools/perf/config/Makefile
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2013-10-02 09:54:43 +0200
committerIngo Molnar <mingo@kernel.org>2013-10-09 08:48:53 +0200
commitf1138ec66e839ce90c58af0c264db33271d73466 (patch)
tree684820b98aa66aea8f02aa0b0c8be1abb4f0152f /tools/perf/config/Makefile
parentde0f03fb8dc268de63d366e735cc576a22df201b (diff)
downloadop-kernel-dev-f1138ec66e839ce90c58af0c264db33271d73466.zip
op-kernel-dev-f1138ec66e839ce90c58af0c264db33271d73466.tar.gz
tools/perf/build: Speed up auto-detection
The detection of certain rarely detected features can be delayed to when they are actually needed. So speed up the common case of auto-detection by pre-building only a core set of features and populating only their feature-flags. [ Features not listed in CORE_FEATURES need to built explicitly via the feature_check() function. ] (Also order the feature names alphabetically, while at it.) Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Namhyung Kim <namhyung@kernel.org> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Link: http://lkml.kernel.org/n/tip-xQkuveknd0gqla1dfxrqKpkl@git.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/config/Makefile')
-rw-r--r--tools/perf/config/Makefile49
1 files changed, 29 insertions, 20 deletions
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index cbd7cdc..581a942 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -105,30 +105,36 @@ endef
$(info )
$(info Auto-detecting system features:)
-FEATURE_TESTS = \
- hello \
- stackprotector-all \
- stackprotector \
- volatile-register-var \
+#
+# Note that this is not a complete list of all feature tests, just
+# those that are typically built on a fully configured system.
+#
+# [ Feature tests not mentioned here have to be built explicitly in
+# the rule that uses them - an example for that is the 'bionic'
+# feature check. ]
+#
+CORE_FEATURE_TESTS = \
+ backtrace \
+ dwarf \
fortify-source \
- bionic \
- libelf \
glibc \
- dwarf \
- libelf-mmap \
- libelf-getphdrnum \
- libunwind \
- libaudit \
- libslang \
gtk2 \
gtk2-infobar \
+ libaudit \
+ libbfd \
+ libelf \
+ libelf-getphdrnum \
+ libelf-mmap \
+ libnuma \
libperl \
libpython \
libpython-version \
- libbfd \
+ libslang \
+ libunwind \
on-exit \
- backtrace \
- libnuma
+ stackprotector \
+ stackprotector-all \
+ volatile-register-var
#
# Special fast-path for the 'all features are available' case:
@@ -136,10 +142,13 @@ FEATURE_TESTS = \
$(call feature_check,all)
ifeq ($(feature-all), 1)
- $(foreach feat,$(FEATURE_TESTS),$(call feature_set,$(feat)))
+ #
+ # test-all.c passed - just set all the core feature flags to 1:
+ #
+ $(foreach feat,$(CORE_FEATURE_TESTS),$(call feature_set,$(feat)))
else
- $(shell $(MAKE) -i -j -C config/feature-checks >/dev/null 2>&1)
- $(foreach feat,$(FEATURE_TESTS),$(call feature_check,$(feat)))
+ $(shell $(MAKE) -i -j -C config/feature-checks $(CORE_FEATURE_TESTS) >/dev/null 2>&1)
+ $(foreach feat,$(CORE_FEATURE_TESTS),$(call feature_check,$(feat)))
endif
feature_print = $(eval $(feature_print_code))
@@ -156,7 +165,7 @@ define feature_print_code
$(info $(MSG))
endef
-$(foreach feat,$(FEATURE_TESTS) DUMMY,$(call feature_print,$(feat)))
+$(foreach feat,$(CORE_FEATURE_TESTS) DUMMY,$(call feature_print,$(feat)))
# newline at the end of the feature printouts:
$(info )
OpenPOWER on IntegriCloud