public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@kernel.org>
To: linux-kernel@vger.kernel.org
Cc: Jiri Olsa <jolsa@kernel.org>,
	Alexis Berlemont <alexis.berlemont@gmail.com>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Borislav Petkov <bp@alien8.de>,
	Corey Ashford <cjashfor@linux.vnet.ibm.com>,
	David Ahern <dsahern@gmail.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Ingo Molnar <mingo@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	Paul Mackerras <paulus@samba.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Stephane Eranian <eranian@google.com>
Subject: [PATCH 04/30] perf build: Add bench objects building
Date: Fri,  2 Jan 2015 16:35:46 +0100	[thread overview]
Message-ID: <1420212972-21595-5-git-send-email-jolsa@kernel.org> (raw)
In-Reply-To: <1420212972-21595-1-git-send-email-jolsa@kernel.org>

Move bench objects building under build framework
and enable perf-in.o rule.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexis Berlemont <alexis.berlemont@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
---
 tools/perf/Build           |  2 ++
 tools/perf/Makefile.perf   | 21 ++-------------------
 tools/perf/bench/Build     | 11 +++++++++++
 tools/perf/config/Makefile |  2 ++
 4 files changed, 17 insertions(+), 19 deletions(-)
 create mode 100644 tools/perf/bench/Build

diff --git a/tools/perf/Build b/tools/perf/Build
index e69de29bb2d1..9ea828de3fde 100644
--- a/tools/perf/Build
+++ b/tools/perf/Build
@@ -0,0 +1,2 @@
+perf-y += builtin-bench.o
+perf-y += bench/
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index f578e1a91250..6d0be78763ec 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -459,19 +459,6 @@ LIB_OBJS += $(OUTPUT)tests/thread-mg-share.o
 LIB_OBJS += $(OUTPUT)tests/switch-tracking.o
 
 BUILTIN_OBJS += $(OUTPUT)builtin-annotate.o
-BUILTIN_OBJS += $(OUTPUT)builtin-bench.o
-# Benchmark modules
-BUILTIN_OBJS += $(OUTPUT)bench/sched-messaging.o
-BUILTIN_OBJS += $(OUTPUT)bench/sched-pipe.o
-ifeq ($(RAW_ARCH),x86_64)
-BUILTIN_OBJS += $(OUTPUT)bench/mem-memcpy-x86-64-asm.o
-BUILTIN_OBJS += $(OUTPUT)bench/mem-memset-x86-64-asm.o
-endif
-BUILTIN_OBJS += $(OUTPUT)bench/mem-memcpy.o
-BUILTIN_OBJS += $(OUTPUT)bench/futex-hash.o
-BUILTIN_OBJS += $(OUTPUT)bench/futex-wake.o
-BUILTIN_OBJS += $(OUTPUT)bench/futex-requeue.o
-
 BUILTIN_OBJS += $(OUTPUT)builtin-diff.o
 BUILTIN_OBJS += $(OUTPUT)builtin-evlist.o
 BUILTIN_OBJS += $(OUTPUT)builtin-help.o
@@ -590,10 +577,6 @@ ifeq ($(NO_PERF_REGS),0)
   LIB_OBJS += $(OUTPUT)util/perf_regs.o
 endif
 
-ifndef NO_LIBNUMA
-  BUILTIN_OBJS += $(OUTPUT)bench/numa.o
-endif
-
 ifndef NO_ZLIB
   LIB_OBJS += $(OUTPUT)util/zlib.o
 endif
@@ -633,9 +616,9 @@ $(OUTPUT)perf.o: perf.c $(OUTPUT)common-cmds.h $(OUTPUT)PERF-CFLAGS
 		'-DPERF_HTML_PATH="$(htmldir_SQ)"' \
 		$(CFLAGS) -c $(filter %.c,$^) -o $@
 
-$(OUTPUT)perf: $(OUTPUT)perf.o $(BUILTIN_OBJS) $(PERFLIBS)
+$(OUTPUT)perf: $(OUTPUT)perf.o $(BUILTIN_OBJS) $(PERFLIBS) $(PERF_IN)
 	$(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $(OUTPUT)perf.o \
-               $(BUILTIN_OBJS) $(LIBS) -o $@
+               $(BUILTIN_OBJS) $(PERF_IN) $(LIBS) -o $@
 
 $(GTK_OBJS): $(OUTPUT)%.o: %.c $(LIB_H)
 	$(QUIET_CC)$(CC) -o $@ -c -fPIC $(CFLAGS) $(GTK_CFLAGS) $<
diff --git a/tools/perf/bench/Build b/tools/perf/bench/Build
new file mode 100644
index 000000000000..5ce98023d518
--- /dev/null
+++ b/tools/perf/bench/Build
@@ -0,0 +1,11 @@
+perf-y += sched-messaging.o
+perf-y += sched-pipe.o
+perf-y += mem-memcpy.o
+perf-y += futex-hash.o
+perf-y += futex-wake.o
+perf-y += futex-requeue.o
+
+perf-$(CONFIG_X86_64) += mem-memcpy-x86-64-asm.o
+perf-$(CONFIG_X86_64) += mem-memset-x86-64-asm.o
+
+perf-$(CONFIG_NUMA) += numa.o
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index f6538544c740..3c73e11954ea 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -28,6 +28,7 @@ ifeq ($(ARCH),x86)
     CFLAGS += -DHAVE_ARCH_X86_64_SUPPORT
     ARCH_INCLUDE = ../../arch/x86/lib/memcpy_64.S ../../arch/x86/lib/memset_64.S
     LIBUNWIND_LIBS = -lunwind -lunwind-x86_64
+    $(call detected,CONFIG_X86_64)
   else
     LIBUNWIND_LIBS = -lunwind -lunwind-x86
   endif
@@ -633,6 +634,7 @@ ifndef NO_LIBNUMA
   else
     CFLAGS += -DHAVE_LIBNUMA_SUPPORT
     EXTLIBS += -lnuma
+    $(call detected,CONFIG_NUMA)
   endif
 endif
 
-- 
1.9.3


  parent reply	other threads:[~2015-01-02 15:37 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-02 15:35 [RFC/PATCHSET 00/30] perf tools: New build framework Jiri Olsa
2015-01-02 15:35 ` [PATCH 01/30] perf tools: Add new build framework support Jiri Olsa
2015-01-05 10:57   ` Borislav Petkov
2015-01-05 11:13     ` Jiri Olsa
2015-01-06 13:41       ` Arnaldo Carvalho de Melo
2015-01-06 14:06         ` Jiri Olsa
2015-01-08  6:18   ` Namhyung Kim
2015-01-08 14:45     ` Jiri Olsa
2015-01-02 15:35 ` [PATCH 02/30] perf build: Add detected config " Jiri Olsa
2015-01-02 15:35 ` [PATCH 03/30] perf build: Add subdir " Jiri Olsa
2015-01-02 15:35 ` Jiri Olsa [this message]
2015-01-02 15:35 ` [PATCH 05/30] perf build: Add tests objects building Jiri Olsa
2015-01-02 15:35 ` [PATCH 06/30] perf build: Add builtin " Jiri Olsa
2015-01-02 15:35 ` [PATCH 07/30] perf build: Add libperf " Jiri Olsa
2015-01-08  6:15   ` Namhyung Kim
2015-01-08 14:45     ` Jiri Olsa
2015-01-02 15:35 ` [PATCH 08/30] perf build: Add probe " Jiri Olsa
2015-01-02 15:35 ` [PATCH 09/30] perf build: Add dwarf " Jiri Olsa
2015-01-02 15:35 ` [PATCH 10/30] perf build: Add dwarf unwind " Jiri Olsa
2015-01-02 15:35 ` [PATCH 11/30] perf build: Add ui " Jiri Olsa
2015-01-02 15:35 ` [PATCH 12/30] perf build: Add slang " Jiri Olsa
2015-01-02 15:35 ` [PATCH 13/30] perf build: Add gtk " Jiri Olsa
2015-01-02 15:35 ` [PATCH 14/30] perf build: Add scripts " Jiri Olsa
2015-01-02 15:35 ` [PATCH 15/30] perf build: Add perf regs " Jiri Olsa
2015-01-02 15:35 ` [PATCH 16/30] perf build: Add zlib " Jiri Olsa
2015-01-02 15:35 ` [PATCH 17/30] perf build: Add perf.o object building Jiri Olsa
2015-01-02 15:36 ` [PATCH 18/30] perf build: Add arch x86 objects building Jiri Olsa
2015-01-02 15:36 ` [PATCH 19/30] perf build: Add arch arm " Jiri Olsa
2015-01-02 15:36 ` [PATCH 20/30] perf build: Add arch arm64 " Jiri Olsa
2015-01-02 15:36 ` [PATCH 21/30] perf build: Add arch powerpc " Jiri Olsa
2015-01-02 15:36 ` [PATCH 22/30] perf build: Add arch s390 " Jiri Olsa
2015-01-02 15:36 ` [PATCH 23/30] perf build: Add arch sh " Jiri Olsa
2015-01-02 15:36 ` [PATCH 24/30] perf build: Add arch sparc " Jiri Olsa
2015-01-02 15:36 ` [PATCH 25/30] perf build: Add single target build framework support Jiri Olsa
2015-01-02 15:36 ` [PATCH 26/30] perf make: Remove directory dependency rules Jiri Olsa
2015-01-02 15:36 ` [PATCH 27/30] perf make: Remove uneeded variables Jiri Olsa
2015-01-02 15:36 ` [PATCH 28/30] perf make: Remove PERF-CFLAGS file Jiri Olsa
2015-01-02 15:36 ` [PATCH 29/30] perf tools: Add support to configure builtin commands inclusion Jiri Olsa
2015-01-08  7:15   ` Namhyung Kim
2015-01-08 14:44     ` Jiri Olsa
2015-01-02 15:36 ` [PATCH 30/30] perf tools: Disable test code Jiri Olsa
2015-01-02 16:29   ` David Ahern
2015-01-02 17:36 ` [RFC/PATCHSET 00/30] perf tools: New build framework Ingo Molnar
2015-01-04 15:49   ` Jiri Olsa

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=1420212972-21595-5-git-send-email-jolsa@kernel.org \
    --to=jolsa@kernel.org \
    --cc=acme@redhat.com \
    --cc=alexis.berlemont@gmail.com \
    --cc=bp@alien8.de \
    --cc=cjashfor@linux.vnet.ibm.com \
    --cc=dsahern@gmail.com \
    --cc=eranian@google.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    /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