From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753805AbcANKZs (ORCPT ); Thu, 14 Jan 2016 05:25:48 -0500 Received: from szxga02-in.huawei.com ([119.145.14.65]:7171 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753523AbcANKZp (ORCPT ); Thu, 14 Jan 2016 05:25:45 -0500 Message-ID: <56977740.20704@huawei.com> Date: Thu, 14 Jan 2016 18:24:00 +0800 From: "Wangnan (F)" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Jiri Olsa CC: , , , , Jiri Olsa , Arnaldo Carvalho de Melo , Namhyung Kim Subject: Re: [PATCH 9/9] perf build: Use feature dump file for build-test References: <1452687442-6186-1-git-send-email-wangnan0@huawei.com> <1452687442-6186-10-git-send-email-wangnan0@huawei.com> <20160114101923.GB3540@krava.brq.redhat.com> In-Reply-To: <20160114101923.GB3540@krava.brq.redhat.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.111.66.109] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090201.569777A1.0020,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: 89cb2ff1bb7fd1963e6725003904a3c8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2016/1/14 18:19, Jiri Olsa wrote: > On Wed, Jan 13, 2016 at 12:17:22PM +0000, Wang Nan wrote: > > SNIP > >> +$(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)))) >> + > the BUILD_TEST_FEATURE_DUMP rebuild is not silent: > > [jolsa@krava perf]$ rm BUILD_TEST_FEATURE_DUMP > [jolsa@krava perf]$ make -f tests/make > Testing Makefile > - /home/jolsa/kernel/linux-perf/tools/perf/BUILD_TEST_FEATURE_DUMP: cd . && make FEATURE_DUMP_COPY=/home/jolsa/kernel/linux-perf/tools/perf/BUILD_TEST_FEATURE_DUMP feature-dump > cd . && make FEATURE_DUMP_COPY=/home/jolsa/kernel/linux-perf/tools/perf/BUILD_TEST_FEATURE_DUMP feature-dump > BUILD: Doing 'make -j4' parallel build > > Auto-detecting system features: > ... dwarf: [ on ] > ... glibc: [ on ] > ... gtk2: [ on ] > ... libaudit: [ on ] > ... libbfd: [ on ] > ... libelf: [ on ] > ... libnuma: [ on ] > ... numa_num_possible_cpus: [ on ] > ... libperl: [ on ] > ... libpython: [ on ] > ... libslang: [ on ] > ... libunwind: [ on ] > ... libdw-dwarf-unwind: [ on ] > ... zlib: [ on ] > ... lzma: [ on ] > ... get_cpuid: [ on ] > ... bpf: [ on ] > > ... > > > also should 'make clean' remove BUILD_TEST_FEATURE_DUMP? If a simple 'make clean' removes these two feature dump file then they are unable to reused by multiple test cases. During build-test 'make clean' is called many times. What about force removing these two files here: ifeq ($(MAKECMDGOALS),) # no target specified, trigger the whole suite all: @rm -f $(FEATURES_DUMP_FILE) $(FEATURES_DUMP_FILE_STATIC) <--- *HERE* @echo "Testing Makefile"; $(MAKE) -sf tests/make MK=Makefile @echo "Testing Makefile.perf"; $(MAKE) -sf tests/make MK=Makefile.perf SET_PARALLEL=1 SET_O=1 else # run only specific test over 'Makefile' %: @rm -f $(FEATURES_DUMP_FILE) $(FEATURES_DUMP_FILE_STATIC) <--- *and HERE* @echo "Testing Makefile"; $(MAKE) -sf tests/make MK=Makefile $@ endif > thanks, > jirka