diff options
author | Jiri Olsa <jolsa@kernel.org> | 2014-12-29 07:52:36 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-02-12 09:32:32 -0500 |
commit | 72965b87c5d5d15e33c620901b46c5ca1a3d6b8b (patch) | |
tree | 5e8a7d08ba1222699227a402b3ac340032a97267 /tools/perf/Makefile.perf | |
parent | 6dd280cdb8a2cf53deacd6240707ec2f22222b20 (diff) |
perf build: Add bench objects building
Move bench objects building under build framework and enable perf-in.o
rule.
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-b0gxubmn3qjabaq0lune53y3@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/Makefile.perf')
-rw-r--r-- | tools/perf/Makefile.perf | 38 |
1 files changed, 16 insertions, 22 deletions
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 0a256fe193ce..77f67941dfc8 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf | |||
@@ -93,6 +93,7 @@ $(OUTPUT)PERF-VERSION-FILE: ../../.git/HEAD | |||
93 | @touch $(OUTPUT)PERF-VERSION-FILE | 93 | @touch $(OUTPUT)PERF-VERSION-FILE |
94 | 94 | ||
95 | CC = $(CROSS_COMPILE)gcc | 95 | CC = $(CROSS_COMPILE)gcc |
96 | LD = $(CROSS_COMPILE)ld | ||
96 | AR = $(CROSS_COMPILE)ar | 97 | AR = $(CROSS_COMPILE)ar |
97 | PKG_CONFIG = $(CROSS_COMPILE)pkg-config | 98 | PKG_CONFIG = $(CROSS_COMPILE)pkg-config |
98 | 99 | ||
@@ -464,21 +465,6 @@ LIB_OBJS += $(OUTPUT)tests/thread-mg-share.o | |||
464 | LIB_OBJS += $(OUTPUT)tests/switch-tracking.o | 465 | LIB_OBJS += $(OUTPUT)tests/switch-tracking.o |
465 | 466 | ||
466 | BUILTIN_OBJS += $(OUTPUT)builtin-annotate.o | 467 | BUILTIN_OBJS += $(OUTPUT)builtin-annotate.o |
467 | BUILTIN_OBJS += $(OUTPUT)builtin-bench.o | ||
468 | # Benchmark modules | ||
469 | BUILTIN_OBJS += $(OUTPUT)bench/sched-messaging.o | ||
470 | BUILTIN_OBJS += $(OUTPUT)bench/sched-pipe.o | ||
471 | ifeq ($(ARCH), x86) | ||
472 | ifeq ($(IS_64_BIT), 1) | ||
473 | BUILTIN_OBJS += $(OUTPUT)bench/mem-memcpy-x86-64-asm.o | ||
474 | BUILTIN_OBJS += $(OUTPUT)bench/mem-memset-x86-64-asm.o | ||
475 | endif | ||
476 | endif | ||
477 | BUILTIN_OBJS += $(OUTPUT)bench/mem-memcpy.o | ||
478 | BUILTIN_OBJS += $(OUTPUT)bench/futex-hash.o | ||
479 | BUILTIN_OBJS += $(OUTPUT)bench/futex-wake.o | ||
480 | BUILTIN_OBJS += $(OUTPUT)bench/futex-requeue.o | ||
481 | |||
482 | BUILTIN_OBJS += $(OUTPUT)builtin-diff.o | 468 | BUILTIN_OBJS += $(OUTPUT)builtin-diff.o |
483 | BUILTIN_OBJS += $(OUTPUT)builtin-evlist.o | 469 | BUILTIN_OBJS += $(OUTPUT)builtin-evlist.o |
484 | BUILTIN_OBJS += $(OUTPUT)builtin-help.o | 470 | BUILTIN_OBJS += $(OUTPUT)builtin-help.o |
@@ -597,10 +583,6 @@ ifeq ($(NO_PERF_REGS),0) | |||
597 | LIB_OBJS += $(OUTPUT)util/perf_regs.o | 583 | LIB_OBJS += $(OUTPUT)util/perf_regs.o |
598 | endif | 584 | endif |
599 | 585 | ||
600 | ifndef NO_LIBNUMA | ||
601 | BUILTIN_OBJS += $(OUTPUT)bench/numa.o | ||
602 | endif | ||
603 | |||
604 | ifndef NO_ZLIB | 586 | ifndef NO_ZLIB |
605 | LIB_OBJS += $(OUTPUT)util/zlib.o | 587 | LIB_OBJS += $(OUTPUT)util/zlib.o |
606 | endif | 588 | endif |
@@ -627,14 +609,22 @@ shell_compatibility_test: please_set_SHELL_PATH_to_a_more_modern_shell | |||
627 | strip: $(PROGRAMS) $(OUTPUT)perf | 609 | strip: $(PROGRAMS) $(OUTPUT)perf |
628 | $(STRIP) $(STRIP_OPTS) $(PROGRAMS) $(OUTPUT)perf | 610 | $(STRIP) $(STRIP_OPTS) $(PROGRAMS) $(OUTPUT)perf |
629 | 611 | ||
612 | PERF_IN := $(OUTPUT)perf-in.o | ||
613 | |||
614 | export srctree OUTPUT RM CC LD AR CFLAGS V | ||
615 | build := -f $(srctree)/tools/build/Makefile.build dir=. obj | ||
616 | |||
617 | $(PERF_IN): FORCE | ||
618 | @$(MAKE) $(build)=perf | ||
619 | |||
630 | $(OUTPUT)perf.o: perf.c $(OUTPUT)common-cmds.h $(OUTPUT)PERF-CFLAGS | 620 | $(OUTPUT)perf.o: perf.c $(OUTPUT)common-cmds.h $(OUTPUT)PERF-CFLAGS |
631 | $(QUIET_CC)$(CC) -include $(OUTPUT)PERF-VERSION-FILE \ | 621 | $(QUIET_CC)$(CC) -include $(OUTPUT)PERF-VERSION-FILE \ |
632 | '-DPERF_HTML_PATH="$(htmldir_SQ)"' \ | 622 | '-DPERF_HTML_PATH="$(htmldir_SQ)"' \ |
633 | $(CFLAGS) -c $(filter %.c,$^) -o $@ | 623 | $(CFLAGS) -c $(filter %.c,$^) -o $@ |
634 | 624 | ||
635 | $(OUTPUT)perf: $(OUTPUT)perf.o $(BUILTIN_OBJS) $(PERFLIBS) | 625 | $(OUTPUT)perf: $(OUTPUT)perf.o $(BUILTIN_OBJS) $(PERFLIBS) $(PERF_IN) |
636 | $(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $(OUTPUT)perf.o \ | 626 | $(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $(OUTPUT)perf.o \ |
637 | $(BUILTIN_OBJS) $(LIBS) -o $@ | 627 | $(BUILTIN_OBJS) $(PERF_IN) $(LIBS) -o $@ |
638 | 628 | ||
639 | $(GTK_OBJS): $(OUTPUT)%.o: %.c $(LIB_H) | 629 | $(GTK_OBJS): $(OUTPUT)%.o: %.c $(LIB_H) |
640 | $(QUIET_CC)$(CC) -o $@ -c -fPIC $(CFLAGS) $(GTK_CFLAGS) $< | 630 | $(QUIET_CC)$(CC) -o $@ -c -fPIC $(CFLAGS) $(GTK_CFLAGS) $< |
@@ -989,6 +979,8 @@ config-clean: | |||
989 | 979 | ||
990 | clean: $(LIBTRACEEVENT)-clean $(LIBAPIKFS)-clean config-clean | 980 | clean: $(LIBTRACEEVENT)-clean $(LIBAPIKFS)-clean config-clean |
991 | $(call QUIET_CLEAN, core-objs) $(RM) $(LIB_OBJS) $(BUILTIN_OBJS) $(LIB_FILE) $(OUTPUT)perf-archive $(OUTPUT)perf-with-kcore $(OUTPUT)perf.o $(LANG_BINDINGS) $(GTK_OBJS) | 981 | $(call QUIET_CLEAN, core-objs) $(RM) $(LIB_OBJS) $(BUILTIN_OBJS) $(LIB_FILE) $(OUTPUT)perf-archive $(OUTPUT)perf-with-kcore $(OUTPUT)perf.o $(LANG_BINDINGS) $(GTK_OBJS) |
982 | @find . -name '*.o' -delete -o -name '\.*.cmd' -delete -o -name '\.*.d' -delete | ||
983 | @$(RM) .config-detected | ||
992 | $(call QUIET_CLEAN, core-progs) $(RM) $(ALL_PROGRAMS) perf perf-read-vdso32 perf-read-vdsox32 | 984 | $(call QUIET_CLEAN, core-progs) $(RM) $(ALL_PROGRAMS) perf perf-read-vdso32 perf-read-vdsox32 |
993 | $(call QUIET_CLEAN, core-gen) $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo $(OUTPUT)common-cmds.h TAGS tags cscope* $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)PERF-CFLAGS $(OUTPUT)PERF-FEATURES $(OUTPUT)util/*-bison* $(OUTPUT)util/*-flex* | 985 | $(call QUIET_CLEAN, core-gen) $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo $(OUTPUT)common-cmds.h TAGS tags cscope* $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)PERF-CFLAGS $(OUTPUT)PERF-FEATURES $(OUTPUT)util/*-bison* $(OUTPUT)util/*-flex* |
994 | $(QUIET_SUBDIR0)Documentation $(QUIET_SUBDIR1) clean | 986 | $(QUIET_SUBDIR0)Documentation $(QUIET_SUBDIR1) clean |
@@ -1004,7 +996,9 @@ else | |||
1004 | GIT-HEAD-PHONY = | 996 | GIT-HEAD-PHONY = |
1005 | endif | 997 | endif |
1006 | 998 | ||
999 | FORCE: | ||
1000 | |||
1007 | .PHONY: all install clean config-clean strip install-gtk | 1001 | .PHONY: all install clean config-clean strip install-gtk |
1008 | .PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell | 1002 | .PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell |
1009 | .PHONY: $(GIT-HEAD-PHONY) TAGS tags cscope .FORCE-PERF-CFLAGS | 1003 | .PHONY: $(GIT-HEAD-PHONY) TAGS tags cscope .FORCE-PERF-CFLAGS FORCE |
1010 | 1004 | ||