diff options
author | Jiri Olsa <jolsa@kernel.org> | 2014-12-29 09:03:09 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-02-12 09:40:32 -0500 |
commit | f39e042a133485e4b1aa73d3bc2249d01421f765 (patch) | |
tree | ebda0890d0cd2d8ceb758afb105c7a04f2875ebb | |
parent | 72965b87c5d5d15e33c620901b46c5ca1a3d6b8b (diff) |
perf build: Add tests objects building
Move test objects building under build framework.
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-azbkwd1fl32t997a4shz4lgp@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r-- | tools/perf/Build | 1 | ||||
-rw-r--r-- | tools/perf/Makefile.perf | 55 | ||||
-rw-r--r-- | tools/perf/config/Makefile | 10 | ||||
-rw-r--r-- | tools/perf/tests/Build | 42 |
4 files changed, 53 insertions, 55 deletions
diff --git a/tools/perf/Build b/tools/perf/Build index 9ea828de3fde..b4b6a7ca760b 100644 --- a/tools/perf/Build +++ b/tools/perf/Build | |||
@@ -1,2 +1,3 @@ | |||
1 | perf-y += builtin-bench.o | 1 | perf-y += builtin-bench.o |
2 | perf-y += bench/ | 2 | perf-y += bench/ |
3 | perf-y += tests/ | ||
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 77f67941dfc8..80c2a8f875ff 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf | |||
@@ -425,45 +425,6 @@ LIB_OBJS += $(OUTPUT)ui/stdio/hist.o | |||
425 | 425 | ||
426 | LIB_OBJS += $(OUTPUT)arch/common.o | 426 | LIB_OBJS += $(OUTPUT)arch/common.o |
427 | 427 | ||
428 | LIB_OBJS += $(OUTPUT)tests/parse-events.o | ||
429 | LIB_OBJS += $(OUTPUT)tests/dso-data.o | ||
430 | LIB_OBJS += $(OUTPUT)tests/attr.o | ||
431 | LIB_OBJS += $(OUTPUT)tests/vmlinux-kallsyms.o | ||
432 | LIB_OBJS += $(OUTPUT)tests/open-syscall.o | ||
433 | LIB_OBJS += $(OUTPUT)tests/open-syscall-all-cpus.o | ||
434 | LIB_OBJS += $(OUTPUT)tests/open-syscall-tp-fields.o | ||
435 | LIB_OBJS += $(OUTPUT)tests/mmap-basic.o | ||
436 | LIB_OBJS += $(OUTPUT)tests/perf-record.o | ||
437 | LIB_OBJS += $(OUTPUT)tests/rdpmc.o | ||
438 | LIB_OBJS += $(OUTPUT)tests/evsel-roundtrip-name.o | ||
439 | LIB_OBJS += $(OUTPUT)tests/evsel-tp-sched.o | ||
440 | LIB_OBJS += $(OUTPUT)tests/fdarray.o | ||
441 | LIB_OBJS += $(OUTPUT)tests/pmu.o | ||
442 | LIB_OBJS += $(OUTPUT)tests/hists_common.o | ||
443 | LIB_OBJS += $(OUTPUT)tests/hists_link.o | ||
444 | LIB_OBJS += $(OUTPUT)tests/hists_filter.o | ||
445 | LIB_OBJS += $(OUTPUT)tests/hists_output.o | ||
446 | LIB_OBJS += $(OUTPUT)tests/hists_cumulate.o | ||
447 | LIB_OBJS += $(OUTPUT)tests/python-use.o | ||
448 | LIB_OBJS += $(OUTPUT)tests/bp_signal.o | ||
449 | LIB_OBJS += $(OUTPUT)tests/bp_signal_overflow.o | ||
450 | LIB_OBJS += $(OUTPUT)tests/task-exit.o | ||
451 | LIB_OBJS += $(OUTPUT)tests/sw-clock.o | ||
452 | ifeq ($(ARCH),x86) | ||
453 | LIB_OBJS += $(OUTPUT)tests/perf-time-to-tsc.o | ||
454 | endif | ||
455 | LIB_OBJS += $(OUTPUT)tests/code-reading.o | ||
456 | LIB_OBJS += $(OUTPUT)tests/sample-parsing.o | ||
457 | LIB_OBJS += $(OUTPUT)tests/parse-no-sample-id-all.o | ||
458 | ifndef NO_DWARF_UNWIND | ||
459 | ifeq ($(ARCH),$(filter $(ARCH),x86 arm)) | ||
460 | LIB_OBJS += $(OUTPUT)tests/dwarf-unwind.o | ||
461 | endif | ||
462 | endif | ||
463 | LIB_OBJS += $(OUTPUT)tests/mmap-thread-lookup.o | ||
464 | LIB_OBJS += $(OUTPUT)tests/thread-mg-share.o | ||
465 | LIB_OBJS += $(OUTPUT)tests/switch-tracking.o | ||
466 | |||
467 | BUILTIN_OBJS += $(OUTPUT)builtin-annotate.o | 428 | BUILTIN_OBJS += $(OUTPUT)builtin-annotate.o |
468 | BUILTIN_OBJS += $(OUTPUT)builtin-diff.o | 429 | BUILTIN_OBJS += $(OUTPUT)builtin-diff.o |
469 | BUILTIN_OBJS += $(OUTPUT)builtin-evlist.o | 430 | BUILTIN_OBJS += $(OUTPUT)builtin-evlist.o |
@@ -483,7 +444,6 @@ BUILTIN_OBJS += $(OUTPUT)builtin-kmem.o | |||
483 | BUILTIN_OBJS += $(OUTPUT)builtin-lock.o | 444 | BUILTIN_OBJS += $(OUTPUT)builtin-lock.o |
484 | BUILTIN_OBJS += $(OUTPUT)builtin-kvm.o | 445 | BUILTIN_OBJS += $(OUTPUT)builtin-kvm.o |
485 | BUILTIN_OBJS += $(OUTPUT)builtin-inject.o | 446 | BUILTIN_OBJS += $(OUTPUT)builtin-inject.o |
486 | BUILTIN_OBJS += $(OUTPUT)tests/builtin-test.o | ||
487 | BUILTIN_OBJS += $(OUTPUT)builtin-mem.o | 447 | BUILTIN_OBJS += $(OUTPUT)builtin-mem.o |
488 | 448 | ||
489 | PERFLIBS = $(LIB_FILE) $(LIBAPIKFS) $(LIBTRACEEVENT) | 449 | PERFLIBS = $(LIB_FILE) $(LIBAPIKFS) $(LIBTRACEEVENT) |
@@ -525,7 +485,6 @@ endif | |||
525 | ifndef NO_LIBUNWIND | 485 | ifndef NO_LIBUNWIND |
526 | LIB_OBJS += $(OUTPUT)util/unwind-libunwind.o | 486 | LIB_OBJS += $(OUTPUT)util/unwind-libunwind.o |
527 | endif | 487 | endif |
528 | LIB_OBJS += $(OUTPUT)tests/keep-tracking.o | ||
529 | 488 | ||
530 | ifndef NO_LIBAUDIT | 489 | ifndef NO_LIBAUDIT |
531 | BUILTIN_OBJS += $(OUTPUT)builtin-trace.o | 490 | BUILTIN_OBJS += $(OUTPUT)builtin-trace.o |
@@ -700,20 +659,6 @@ $(OUTPUT)util/exec_cmd.o: util/exec_cmd.c $(OUTPUT)PERF-CFLAGS | |||
700 | '-DPREFIX="$(prefix_SQ)"' \ | 659 | '-DPREFIX="$(prefix_SQ)"' \ |
701 | $< | 660 | $< |
702 | 661 | ||
703 | $(OUTPUT)tests/attr.o: tests/attr.c $(OUTPUT)PERF-CFLAGS | ||
704 | $(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) \ | ||
705 | '-DBINDIR="$(bindir_SQ)"' -DPYTHON='"$(PYTHON_WORD)"' \ | ||
706 | $< | ||
707 | |||
708 | $(OUTPUT)tests/python-use.o: tests/python-use.c $(OUTPUT)PERF-CFLAGS | ||
709 | $(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) \ | ||
710 | -DPYTHONPATH='"$(OUTPUT)python"' \ | ||
711 | -DPYTHON='"$(PYTHON_WORD)"' \ | ||
712 | $< | ||
713 | |||
714 | $(OUTPUT)tests/dwarf-unwind.o: tests/dwarf-unwind.c | ||
715 | $(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) -fno-optimize-sibling-calls $< | ||
716 | |||
717 | $(OUTPUT)util/config.o: util/config.c $(OUTPUT)PERF-CFLAGS | 662 | $(OUTPUT)util/config.o: util/config.c $(OUTPUT)PERF-CFLAGS |
718 | $(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) -DETC_PERFCONFIG='"$(ETC_PERFCONFIG_SQ)"' $< | 663 | $(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) -DETC_PERFCONFIG='"$(ETC_PERFCONFIG_SQ)"' $< |
719 | 664 | ||
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile index 3e90fcab709d..2fd018529b95 100644 --- a/tools/perf/config/Makefile +++ b/tools/perf/config/Makefile | |||
@@ -20,10 +20,13 @@ CFLAGS := $(EXTRA_CFLAGS) $(EXTRA_WARNINGS) | |||
20 | 20 | ||
21 | include $(src-perf)/config/Makefile.arch | 21 | include $(src-perf)/config/Makefile.arch |
22 | 22 | ||
23 | $(call detected_var,ARCH) | ||
24 | |||
23 | NO_PERF_REGS := 1 | 25 | NO_PERF_REGS := 1 |
24 | 26 | ||
25 | # Additional ARCH settings for x86 | 27 | # Additional ARCH settings for x86 |
26 | ifeq ($(ARCH),x86) | 28 | ifeq ($(ARCH),x86) |
29 | $(call detected,CONFIG_X86) | ||
27 | ifeq (${IS_64_BIT}, 1) | 30 | ifeq (${IS_64_BIT}, 1) |
28 | CFLAGS += -DHAVE_ARCH_X86_64_SUPPORT | 31 | CFLAGS += -DHAVE_ARCH_X86_64_SUPPORT |
29 | ARCH_INCLUDE = ../../arch/x86/lib/memcpy_64.S ../../arch/x86/lib/memset_64.S | 32 | ARCH_INCLUDE = ../../arch/x86/lib/memcpy_64.S ../../arch/x86/lib/memset_64.S |
@@ -424,6 +427,7 @@ endif | |||
424 | 427 | ||
425 | ifeq ($(dwarf-post-unwind),1) | 428 | ifeq ($(dwarf-post-unwind),1) |
426 | CFLAGS += -DHAVE_DWARF_UNWIND_SUPPORT | 429 | CFLAGS += -DHAVE_DWARF_UNWIND_SUPPORT |
430 | $(call detected,CONFIG_DWARF_UNWIND) | ||
427 | else | 431 | else |
428 | NO_DWARF_UNWIND := 1 | 432 | NO_DWARF_UNWIND := 1 |
429 | endif | 433 | endif |
@@ -821,3 +825,9 @@ endif | |||
821 | ifeq ($(display_lib),1) | 825 | ifeq ($(display_lib),1) |
822 | $(info ) | 826 | $(info ) |
823 | endif | 827 | endif |
828 | |||
829 | $(call detected_var,bindir_SQ) | ||
830 | $(call detected_var,PYTHON_WORD) | ||
831 | ifneq ($(OUTPUT),) | ||
832 | $(call detected_var,OUTPUT) | ||
833 | endif | ||
diff --git a/tools/perf/tests/Build b/tools/perf/tests/Build new file mode 100644 index 000000000000..2de01a4b4084 --- /dev/null +++ b/tools/perf/tests/Build | |||
@@ -0,0 +1,42 @@ | |||
1 | perf-y += builtin-test.o | ||
2 | perf-y += parse-events.o | ||
3 | perf-y += dso-data.o | ||
4 | perf-y += attr.o | ||
5 | perf-y += vmlinux-kallsyms.o | ||
6 | perf-y += open-syscall.o | ||
7 | perf-y += open-syscall-all-cpus.o | ||
8 | perf-y += open-syscall-tp-fields.o | ||
9 | perf-y += mmap-basic.o | ||
10 | perf-y += perf-record.o | ||
11 | perf-y += rdpmc.o | ||
12 | perf-y += evsel-roundtrip-name.o | ||
13 | perf-y += evsel-tp-sched.o | ||
14 | perf-y += fdarray.o | ||
15 | perf-y += pmu.o | ||
16 | perf-y += hists_common.o | ||
17 | perf-y += hists_link.o | ||
18 | perf-y += hists_filter.o | ||
19 | perf-y += hists_output.o | ||
20 | perf-y += hists_cumulate.o | ||
21 | perf-y += python-use.o | ||
22 | perf-y += bp_signal.o | ||
23 | perf-y += bp_signal_overflow.o | ||
24 | perf-y += task-exit.o | ||
25 | perf-y += sw-clock.o | ||
26 | perf-y += mmap-thread-lookup.o | ||
27 | perf-y += thread-mg-share.o | ||
28 | perf-y += switch-tracking.o | ||
29 | perf-y += keep-tracking.o | ||
30 | perf-y += code-reading.o | ||
31 | perf-y += sample-parsing.o | ||
32 | perf-y += parse-no-sample-id-all.o | ||
33 | |||
34 | perf-$(CONFIG_X86) += perf-time-to-tsc.o | ||
35 | |||
36 | ifeq ($(ARCH),$(filter $(ARCH),x86 arm)) | ||
37 | perf-$(CONFIG_DWARF_UNWIND) += dwarf-unwind.o | ||
38 | endif | ||
39 | |||
40 | CFLAGS_attr.o += -DBINDIR="BUILD_STR($(bindir_SQ))" -DPYTHON="BUILD_STR($(PYTHON_WORD))" | ||
41 | CFLAGS_python-use.o += -DPYTHONPATH="BUILD_STR($(OUTPUT)python)" -DPYTHON="BUILD_STR($(PYTHON_WORD))" | ||
42 | CFLAGS_dwarf-unwind.o += -fno-optimize-sibling-calls | ||