mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Ingo Molnar <mingo@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
	linux-kernel@vger.kernel.org, David Ahern <dsahern@gmail.com>,
	Jan Kratochvil <jkratoch@redhat.com>,
	Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
	Milian Wolff <milian.wolff@kdab.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Taeung Song <treeze.taeung@gmail.com>,
	Wang Nan <wangnan0@huawei.com>,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: Re: [GIT PULL 0/7] perf/core improvements and fixes
Date: Tue, 24 Nov 2015 11:28:55 +0100	[thread overview]
Message-ID: <20151124102855.GC5359@krava.brq.redhat.com> (raw)
In-Reply-To: <20151124081042.GA3651@gmail.com>

On Tue, Nov 24, 2015 at 09:10:42AM +0100, Ingo Molnar wrote:

SNIP

> >  tools/perf/util/unwind-libdw.c           |  53 +++++++++++-----
> >  tools/perf/util/unwind-libdw.h           |   2 +
> >  tools/perf/util/unwind-libunwind.c       |  60 +++++++++++-------
> >  11 files changed, 272 insertions(+), 39 deletions(-)
> >  create mode 100644 tools/perf/Documentation/perf-config.txt
> >  create mode 100644 tools/perf/builtin-config.c
> 
> Hm, I noticed something weird - I think it started with this pull request - the 
> feature detection build messages come mixed with the regular build:
> 
> triton:~/tip/tools/perf> make
>   BUILD:   Doing 'make -j12' 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  ]
> 
>   GEN      common-cmds.h
>   CC       perf-read-vdso32
>   CC       perf-read-vdsox32
>   CC       ui/gtk/browser.o
>   CC       ui/gtk/hists.o
>   CC       ui/gtk/setup.o
>   CC       ui/gtk/util.o
>   CC       ui/gtk/helpline.o
>   CC       ui/gtk/progress.o
>   CC       ui/gtk/annotate.o
>   CC       util/abspath.o
>   CC       fd/array.o
> 
> Auto-detecting system features:
>   CC       event-parse.o
> ...                        libelf: [ on  ]
>   PERF_VERSION = 4.4.rc2.g9327ca
> ...                           bpf: [ on  ]
> 
>   CC       util/alias.o
>   CC       libbpf.o


so how about we let perf do the overall checking and propagate
that via include file that will setup feature-$(feature) variables

if bpf is built by perf, perf passes this makefile include path
and bpf includes it.. otherwise it runs the standard detection

please test attached patch (bpf guys mainly ;-) )

if that works for you, I'll clean it up a bit and post

thanks,
jirka


---
diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature
index 37ff4c9f92f1..a8a65ff010a4 100644
--- a/tools/build/Makefile.feature
+++ b/tools/build/Makefile.feature
@@ -131,6 +131,8 @@ ifeq ($(dwarf-post-unwind),1)
   FEATURE_DUMP += dwarf-post-unwind($(dwarf-post-unwind-text))
 endif
 
+FEATURE_INCLUDE_FILENAME = $(OUTPUT)FEATURE-DUMP$(FEATURE_USER).include
+
 # The $(feature_display) controls the default detection message
 # output. It's set if:
 # - detected features differes from stored features from
@@ -140,6 +142,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/Makefile b/tools/lib/bpf/Makefile
index a3caaf3eafbd..0177bf81f826 100644
--- a/tools/lib/bpf/Makefile
+++ b/tools/lib/bpf/Makefile
@@ -71,7 +71,11 @@ FEATURE_DISPLAY = libelf bpf
 INCLUDES = -I. -I$(srctree)/tools/include -I$(srctree)/arch/$(ARCH)/include/uapi -I$(srctree)/include/uapi
 FEATURE_CHECK_CFLAGS-bpf = $(INCLUDES)
 
+ifeq ($(FEATURES),)
 include $(srctree)/tools/build/Makefile.feature
+else
+include $(FEATURES)
+endif
 
 export prefix libdir src obj
 
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 929a32ba15f5..4f18c1210509 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -431,7 +431,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
+	$(Q)$(MAKE) -C $(BPF_DIR) O=$(OUTPUT) $(OUTPUT)libbpf.a FEATURES=$(realpath $(OUTPUT)FEATURE-DUMP.include)
 
 $(LIBBPF)-clean:
 	$(call QUIET_CLEAN, libbpf)

  parent reply	other threads:[~2015-11-24 10:29 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-23 21:53 Arnaldo Carvalho de Melo
2015-11-23 21:53 ` [PATCH 1/7] perf callchain: Move initial entry call into get_entries function Arnaldo Carvalho de Melo
2015-11-23 21:53 ` [PATCH 2/7] perf callchain: Add order support for libunwind DWARF unwinder Arnaldo Carvalho de Melo
2015-11-23 21:53 ` [PATCH 3/7] perf test: Add callchain order setup for DWARF unwinder test Arnaldo Carvalho de Melo
2015-11-23 21:53 ` [PATCH 4/7] perf callchain: Add order support for libdw DWARF unwinder Arnaldo Carvalho de Melo
2015-11-23 21:53 ` [PATCH 5/7] perf tools: Add 'perf config' command Arnaldo Carvalho de Melo
2015-11-23 21:53 ` [PATCH 6/7] perf config: Add initial man page Arnaldo Carvalho de Melo
2015-11-23 21:53 ` [PATCH 7/7] perf callchain: Add missing parent_val initialization Arnaldo Carvalho de Melo
2015-11-24  8:10 ` [GIT PULL 0/7] perf/core improvements and fixes Ingo Molnar
2015-11-24  8:28   ` Jiri Olsa
2015-11-24  8:42     ` Ingo Molnar
2015-11-24  9:26       ` Jiri Olsa
2015-11-24  9:47         ` Jiri Olsa
2015-11-26 11:00           ` Ingo Molnar
2015-11-26 12:47             ` Jiri Olsa
2015-11-26  7:56         ` Ingo Molnar
2015-11-26  8:12           ` Ingo Molnar
2015-11-26  9:09             ` Jiri Olsa
2015-11-24 10:28   ` Jiri Olsa [this message]
2015-11-26  8:13   ` Ingo Molnar
  -- strict thread matches above, loose matches on Subject: below --
2017-04-13 19:35 Arnaldo Carvalho de Melo
2017-04-14 16:07 ` Arnaldo Carvalho de Melo
2017-04-17  8:15   ` Ingo Molnar
2015-06-12  2:15 Arnaldo Carvalho de Melo
2015-06-12  8:09 ` Ingo Molnar
2015-04-10 21:40 Arnaldo Carvalho de Melo
2015-04-11  6:33 ` Ingo Molnar
2014-06-23  7:59 Jiri Olsa
2014-06-25  5:44 ` Ingo Molnar
2014-04-28 11:59 Jiri Olsa
2014-04-29  6:42 ` Ingo Molnar
2013-11-07 15:04 Arnaldo Carvalho de Melo
2013-11-07 15:26 ` Ingo Molnar
2012-06-27 19:20 Arnaldo Carvalho de Melo
2012-06-29 13:12 ` Ingo Molnar
2012-07-02  8:01   ` Dmitry Antipov
2012-03-05 15:55 Arnaldo Carvalho de Melo
2012-03-05 16:02 ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151124102855.GC5359@krava.brq.redhat.com \
    --to=jolsa@redhat.com \
    --cc=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=dsahern@gmail.com \
    --cc=jkratoch@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=milian.wolff@kdab.com \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=treeze.taeung@gmail.com \
    --cc=wangnan0@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome