diff options
author | Jiri Olsa <jolsa@kernel.org> | 2014-12-29 17:52:25 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-02-12 09:44:18 -0500 |
commit | 709e679193c6e0e39222cd1fd51008225208cbc7 (patch) | |
tree | e4493df9bad7fedfbb33250e97f7f261b8bf6681 /tools/perf | |
parent | 9352aabad16af51c4c66fb2470ca01e4005bd282 (diff) |
perf build: Add probe objects building
Move the probe objects building under build framework to be included in
the libperf build object.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Tested-by: Will Deacon <will.deacon@arm.com>
Cc: Alexis Berlemont <alexis.berlemont@gmail.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: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-p39iitiu2ltgmtbn48bsh7nz@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/Build | 1 | ||||
-rw-r--r-- | tools/perf/Makefile.perf | 19 | ||||
-rw-r--r-- | tools/perf/config/Makefile | 1 | ||||
-rw-r--r-- | tools/perf/util/Build | 7 |
4 files changed, 10 insertions, 18 deletions
diff --git a/tools/perf/Build b/tools/perf/Build index 31c4c555cc81..170e4563bb24 100644 --- a/tools/perf/Build +++ b/tools/perf/Build | |||
@@ -20,6 +20,7 @@ perf-y += builtin-inject.o | |||
20 | perf-y += builtin-mem.o | 20 | perf-y += builtin-mem.o |
21 | 21 | ||
22 | perf-$(CONFIG_AUDIT) += builtin-trace.o | 22 | perf-$(CONFIG_AUDIT) += builtin-trace.o |
23 | perf-$(CONFIG_LIBELF) += builtin-probe.o | ||
23 | 24 | ||
24 | perf-y += bench/ | 25 | perf-y += bench/ |
25 | perf-y += tests/ | 26 | perf-y += tests/ |
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 8951cd9809a2..0997e2b33c77 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf | |||
@@ -327,9 +327,6 @@ LIB_H += util/data.h | |||
327 | LIB_H += util/kvm-stat.h | 327 | LIB_H += util/kvm-stat.h |
328 | LIB_H += util/thread-stack.h | 328 | LIB_H += util/thread-stack.h |
329 | 329 | ||
330 | LIB_OBJS += $(OUTPUT)util/symbol-elf.o | ||
331 | LIB_OBJS += $(OUTPUT)util/probe-event.o | ||
332 | |||
333 | LIB_OBJS += $(OUTPUT)ui/setup.o | 330 | LIB_OBJS += $(OUTPUT)ui/setup.o |
334 | LIB_OBJS += $(OUTPUT)ui/helpline.o | 331 | LIB_OBJS += $(OUTPUT)ui/helpline.o |
335 | LIB_OBJS += $(OUTPUT)ui/progress.o | 332 | LIB_OBJS += $(OUTPUT)ui/progress.o |
@@ -337,8 +334,6 @@ LIB_OBJS += $(OUTPUT)ui/util.o | |||
337 | LIB_OBJS += $(OUTPUT)ui/hist.o | 334 | LIB_OBJS += $(OUTPUT)ui/hist.o |
338 | LIB_OBJS += $(OUTPUT)ui/stdio/hist.o | 335 | LIB_OBJS += $(OUTPUT)ui/stdio/hist.o |
339 | 336 | ||
340 | BUILTIN_OBJS += $(OUTPUT)builtin-probe.o | ||
341 | |||
342 | PERFLIBS = $(LIB_FILE) $(LIBAPIKFS) $(LIBTRACEEVENT) | 337 | PERFLIBS = $(LIB_FILE) $(LIBAPIKFS) $(LIBTRACEEVENT) |
343 | 338 | ||
344 | # We choose to avoid "if .. else if .. else .. endif endif" | 339 | # We choose to avoid "if .. else if .. else .. endif endif" |
@@ -351,19 +346,7 @@ ifneq ($(OUTPUT),) | |||
351 | CFLAGS += -I$(OUTPUT) | 346 | CFLAGS += -I$(OUTPUT) |
352 | endif | 347 | endif |
353 | 348 | ||
354 | ifdef NO_LIBELF | 349 | ifndef NO_LIBELF |
355 | # Remove ELF/DWARF dependent codes | ||
356 | LIB_OBJS := $(filter-out $(OUTPUT)util/symbol-elf.o,$(LIB_OBJS)) | ||
357 | LIB_OBJS := $(filter-out $(OUTPUT)util/dwarf-aux.o,$(LIB_OBJS)) | ||
358 | LIB_OBJS := $(filter-out $(OUTPUT)util/probe-event.o,$(LIB_OBJS)) | ||
359 | LIB_OBJS := $(filter-out $(OUTPUT)util/probe-finder.o,$(LIB_OBJS)) | ||
360 | |||
361 | BUILTIN_OBJS := $(filter-out $(OUTPUT)builtin-probe.o,$(BUILTIN_OBJS)) | ||
362 | |||
363 | # Use minimal symbol handling | ||
364 | LIB_OBJS += $(OUTPUT)util/symbol-minimal.o | ||
365 | |||
366 | else # NO_LIBELF | ||
367 | ifndef NO_DWARF | 350 | ifndef NO_DWARF |
368 | LIB_OBJS += $(OUTPUT)util/probe-finder.o | 351 | LIB_OBJS += $(OUTPUT)util/probe-finder.o |
369 | LIB_OBJS += $(OUTPUT)util/dwarf-aux.o | 352 | LIB_OBJS += $(OUTPUT)util/dwarf-aux.o |
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile index 5b89bb7b2d7d..79ee4ccce3dc 100644 --- a/tools/perf/config/Makefile +++ b/tools/perf/config/Makefile | |||
@@ -371,6 +371,7 @@ endif # NO_LIBELF | |||
371 | ifndef NO_LIBELF | 371 | ifndef NO_LIBELF |
372 | CFLAGS += -DHAVE_LIBELF_SUPPORT | 372 | CFLAGS += -DHAVE_LIBELF_SUPPORT |
373 | EXTLIBS += -lelf | 373 | EXTLIBS += -lelf |
374 | $(call detected,CONFIG_LIBELF) | ||
374 | 375 | ||
375 | ifeq ($(feature-libelf-mmap), 1) | 376 | ifeq ($(feature-libelf-mmap), 1) |
376 | CFLAGS += -DHAVE_LIBELF_MMAP_SUPPORT | 377 | CFLAGS += -DHAVE_LIBELF_MMAP_SUPPORT |
diff --git a/tools/perf/util/Build b/tools/perf/util/Build index c107f309d29f..73a0411e2014 100644 --- a/tools/perf/util/Build +++ b/tools/perf/util/Build | |||
@@ -75,6 +75,13 @@ libperf-y += tsc.o | |||
75 | libperf-y += cloexec.o | 75 | libperf-y += cloexec.o |
76 | libperf-y += thread-stack.o | 76 | libperf-y += thread-stack.o |
77 | 77 | ||
78 | libperf-$(CONFIG_LIBELF) += symbol-elf.o | ||
79 | libperf-$(CONFIG_LIBELF) += probe-event.o | ||
80 | |||
81 | ifndef CONFIG_LIBELF | ||
82 | libperf-y += symbol-minimal.o | ||
83 | endif | ||
84 | |||
78 | CFLAGS_config.o += -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" | 85 | CFLAGS_config.o += -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" |
79 | CFLAGS_exec_cmd.o += -DPERF_EXEC_PATH="BUILD_STR($(perfexecdir_SQ))" -DPREFIX="BUILD_STR($(prefix_SQ))" | 86 | CFLAGS_exec_cmd.o += -DPERF_EXEC_PATH="BUILD_STR($(perfexecdir_SQ))" -DPREFIX="BUILD_STR($(prefix_SQ))" |
80 | 87 | ||