From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755544AbbLGJah (ORCPT ); Mon, 7 Dec 2015 04:30:37 -0500 Received: from szxga02-in.huawei.com ([119.145.14.65]:31474 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754784AbbLGJaf (ORCPT ); Mon, 7 Dec 2015 04:30:35 -0500 Message-ID: <56654FE1.50304@huawei.com> Date: Mon, 7 Dec 2015 17:22:41 +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: Arnaldo Carvalho de Melo , lkml , David Ahern , Ingo Molnar , Namhyung Kim , Jiri Olsa , Peter Zijlstra Subject: Re: [PATCH 1/2] tools build: Introduce features dump include makefile References: <1448615211-16074-1-git-send-email-jolsa@kernel.org> <20151207085613.GA21484@krava.brq.redhat.com> In-Reply-To: <20151207085613.GA21484@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.0A090203.56654FF4.00C8,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: bc6454593936401a84a6ce06393cacd1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sorry for the late response... Tested-by: Wang Nan But I'm thinking whether we can remove FEATURE-DUMP and rely on FEATURE-INCLUDE only, since they contain same information... Thank you. On 2015/12/7 16:56, Jiri Olsa wrote: > ping, Wang Nan, any comments on these 2? > > thanks, > jirka > > On Fri, Nov 27, 2015 at 10:06:50AM +0100, Jiri Olsa wrote: >> Creating the FEATURE-INCLUDE file, that contains all features >> status dumped in make's variable format: >> ... >> feature-backtrace=1 >> feature-dwarf=1 >> ... >> >> It's purpose is to be included in sub-project makefiles to get >> features detection state. This way we can run the detection only >> in top level project and propagate it down. >> >> Cc: Wang Nan >> Link: http://lkml.kernel.org/n/tip-fcq5rtdhcu4300sjp2p8l936@git.kernel.org >> Signed-off-by: Jiri Olsa >> --- >> tools/build/Makefile.feature | 12 ++++++++++++ >> tools/lib/bpf/.gitignore | 1 + >> tools/lib/bpf/Makefile | 2 +- >> tools/perf/.gitignore | 1 + >> tools/perf/Makefile.perf | 2 +- >> 5 files changed, 16 insertions(+), 2 deletions(-) >> >> diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature >> index 37ff4c9f92f1..51f8d5928f98 100644 >> --- a/tools/build/Makefile.feature >> +++ b/tools/build/Makefile.feature >> @@ -131,6 +131,16 @@ ifeq ($(dwarf-post-unwind),1) >> FEATURE_DUMP += dwarf-post-unwind($(dwarf-post-unwind-text)) >> endif >> >> +# The FEATURE-INCLUDE file contains all features status >> +# dumped in make's variable format: >> +# ... >> +# feature-backtrace=1 >> +# feature-dwarf=1 >> +# ... >> +# It's to be included in sub-project makefiles to get >> +# features detection state. >> +FEATURE_INCLUDE_FILENAME = $(OUTPUT)FEATURE-INCLUDE$(FEATURE_USER) >> + >> # The $(feature_display) controls the default detection message >> # output. It's set if: >> # - detected features differes from stored features from >> @@ -140,6 +150,8 @@ endif >> >> ifneq ("$(FEATURE_DUMP)","$(FEATURE_DUMP_FILE)") >> $(shell echo "$(FEATURE_DUMP)" > $(FEATURE_DUMP_FILENAME)) >> + $(shell rm -f $(FEATURE_INCLUDE_FILENAME)) >> + $(foreach feat,$(FEATURE_TESTS),$(shell echo "feature-$(feat)=$(feature-$(feat))" >> $(FEATURE_INCLUDE_FILENAME))) >> feature_display := 1 >> endif >> >> diff --git a/tools/lib/bpf/.gitignore b/tools/lib/bpf/.gitignore >> index f81e549ddfdb..4019b8e4021a 100644 >> --- a/tools/lib/bpf/.gitignore >> +++ b/tools/lib/bpf/.gitignore >> @@ -1,2 +1,3 @@ >> libbpf_version.h >> FEATURE-DUMP.libbpf >> +FEATURE-INCLUDE.libbpf >> diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile >> index 636e3ddb93a1..6916cbe962a5 100644 >> --- a/tools/lib/bpf/Makefile >> +++ b/tools/lib/bpf/Makefile >> @@ -190,7 +190,7 @@ config-clean: >> clean: >> $(call QUIET_CLEAN, libbpf) $(RM) *.o *~ $(TARGETS) *.a *.so $(VERSION_FILES) .*.d \ >> $(RM) LIBBPF-CFLAGS >> - $(call QUIET_CLEAN, core-gen) $(RM) $(OUTPUT)FEATURE-DUMP.libbpf >> + $(call QUIET_CLEAN, core-gen) $(RM) $(OUTPUT)FEATURE-DUMP.libbpf $(OUTPUT)FEATURE-INCLUDE.libbpf >> >> >> >> diff --git a/tools/perf/.gitignore b/tools/perf/.gitignore >> index 3d1bb802dbf4..4a3eb8dedc54 100644 >> --- a/tools/perf/.gitignore >> +++ b/tools/perf/.gitignore >> @@ -2,6 +2,7 @@ PERF-CFLAGS >> PERF-GUI-VARS >> PERF-VERSION-FILE >> FEATURE-DUMP >> +FEATURE-INCLUDE >> perf >> perf-read-vdso32 >> perf-read-vdsox32 >> diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf >> index 929a32ba15f5..b74f924185b7 100644 >> --- a/tools/perf/Makefile.perf >> +++ b/tools/perf/Makefile.perf >> @@ -589,7 +589,7 @@ clean: $(LIBTRACEEVENT)-clean $(LIBAPI)-clean $(LIBBPF)-clean config-clean >> $(Q)find . -name '*.o' -delete -o -name '\.*.cmd' -delete -o -name '\.*.d' -delete >> $(Q)$(RM) $(OUTPUT).config-detected >> $(call QUIET_CLEAN, core-progs) $(RM) $(ALL_PROGRAMS) perf perf-read-vdso32 perf-read-vdsox32 >> - $(call QUIET_CLEAN, core-gen) $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo $(OUTPUT)common-cmds.h TAGS tags cscope* $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)FEATURE-DUMP $(OUTPUT)util/*-bison* $(OUTPUT)util/*-flex* \ >> + $(call QUIET_CLEAN, core-gen) $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo $(OUTPUT)common-cmds.h TAGS tags cscope* $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)FEATURE-DUMP $(OUTPUT)FEATURE-INCLUDE $(OUTPUT)util/*-bison* $(OUTPUT)util/*-flex* \ >> $(OUTPUT)util/intel-pt-decoder/inat-tables.c >> $(QUIET_SUBDIR0)Documentation $(QUIET_SUBDIR1) clean >> $(python-clean) >> -- >> 2.4.3 >>