From patchwork Wed Jan 13 12:17:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wang Nan X-Patchwork-Id: 59662 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp3327904lbb; Wed, 13 Jan 2016 04:18:56 -0800 (PST) X-Received: by 10.66.232.202 with SMTP id tq10mr189393372pac.156.1452687534984; Wed, 13 Jan 2016 04:18:54 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n2si1727633pap.201.2016.01.13.04.18.54; Wed, 13 Jan 2016 04:18:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755993AbcAMMSq (ORCPT + 29 others); Wed, 13 Jan 2016 07:18:46 -0500 Received: from szxga01-in.huawei.com ([58.251.152.64]:60867 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754248AbcAMMR6 (ORCPT ); Wed, 13 Jan 2016 07:17:58 -0500 Received: from 172.24.1.50 (EHLO szxeml428-hub.china.huawei.com) ([172.24.1.50]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id DCY55044; Wed, 13 Jan 2016 20:17:41 +0800 (CST) Received: from linux-4hy3.site (10.107.193.248) by szxeml428-hub.china.huawei.com (10.82.67.183) with Microsoft SMTP Server id 14.3.235.1; Wed, 13 Jan 2016 20:17:33 +0800 From: Wang Nan To: , CC: , , , Wang Nan , Jiri Olsa , "Arnaldo Carvalho de Melo" , Namhyung Kim Subject: [PATCH 9/9] perf build: Use feature dump file for build-test Date: Wed, 13 Jan 2016 12:17:22 +0000 Message-ID: <1452687442-6186-10-git-send-email-wangnan0@huawei.com> X-Mailer: git-send-email 1.8.3.4 In-Reply-To: <1452687442-6186-1-git-send-email-wangnan0@huawei.com> References: <1452687442-6186-1-git-send-email-wangnan0@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.107.193.248] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020203.56964066.0019, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 3189122dad71c389df2d6a2e9815c065 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Cc: Jiri Olsa Cc: Arnaldo Carvalho de Melo Cc: Namhyung Kim --- tools/perf/tests/make | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) -- 1.8.3.4 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