Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1308354
| From | Wang Nan <wangnan0@huawei.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 6/9] perf build: Introduce FEATURES_DUMP make variable |
| Date | 2016-01-13 13:30 +0100 |
| Message-ID | <qQsIO-84i-19@gated-at.bofh.it> (permalink) |
| References | <qQsz8-7YE-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Jiri Olsa <jolsa@kernel.org>
Introducing FEATURES_DUMP make variable to provide features
detection dump file and bypass the feature detection.
The intention is to use this during build tests to skip
repeated features detection, like:
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
Use /tmp/fd to build perf:
$ make FEATURES_DUMP=/tmp/fd LDFLAGS=-static
$ file perf
perf: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, for ...
Suggested-by: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-fhb47m6t18txuwrzu33is2bo@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
tools/perf/Makefile.perf | 14 +++++++++++++-
tools/perf/config/Makefile | 4 ++++
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index f758a72..5d34815 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -77,6 +77,9 @@ include config/utilities.mak
# Define NO_AUXTRACE if you do not want AUX area tracing support
#
# Define NO_LIBBPF if you do not want BPF support
+#
+# Define FEATURES_DUMP to provide features detection dump file
+# and bypass the feature detection
# As per kernel Makefile, avoid funny character set dependencies
unexport LC_ALL
@@ -166,6 +169,15 @@ ifeq ($(config),1)
include config/Makefile
endif
+# The FEATURE_DUMP_EXPORT holds location of the actual
+# FEATURE_DUMP file to be used to bypass feature detection
+# (for bpf or any other subproject)
+ifeq ($(FEATURES_DUMP),)
+FEATURE_DUMP_EXPORT := $(realpath $(OUTPUT)FEATURE-DUMP)
+else
+FEATURE_DUMP_EXPORT := $(FEATURES_DUMP)
+endif
+
export prefix bindir sharedir sysconfdir DESTDIR
# sparse is architecture-neutral, which means that we need to tell it
@@ -436,7 +448,7 @@ $(LIBAPI)-clean:
$(Q)$(MAKE) -C $(LIB_DIR) O=$(OUTPUT) clean >/dev/null
$(LIBBPF): fixdep FORCE
- $(Q)$(MAKE) -C $(BPF_DIR) O=$(OUTPUT) $(OUTPUT)libbpf.a FEATURES_DUMP=$(realpath $(OUTPUT)FEATURE-DUMP)
+ $(Q)$(MAKE) -C $(BPF_DIR) O=$(OUTPUT) $(OUTPUT)libbpf.a FEATURES_DUMP=$(FEATURE_DUMP_EXPORT)
$(LIBBPF)-clean:
$(call QUIET_CLEAN, libbpf)
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index e5959c1..511141b 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -181,7 +181,11 @@ LDFLAGS += -Wl,-z,noexecstack
EXTLIBS = -lpthread -lrt -lm -ldl
+ifeq ($(FEATURES_DUMP),)
include $(srctree)/tools/build/Makefile.feature
+else
+include $(FEATURES_DUMP)
+endif
ifeq ($(feature-stackprotector-all), 1)
CFLAGS += -fstack-protector-all
--
1.8.3.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[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
csiph-web