diff options
Diffstat (limited to 'tools/perf/Makefile.perf')
-rw-r--r-- | tools/perf/Makefile.perf | 42 |
1 files changed, 33 insertions, 9 deletions
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 7257e7e9e38a..50d875d970c4 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf | |||
@@ -7,6 +7,8 @@ include config/utilities.mak | |||
7 | 7 | ||
8 | # Define V to have a more verbose compile. | 8 | # Define V to have a more verbose compile. |
9 | # | 9 | # |
10 | # Define VF to have a more verbose feature check output. | ||
11 | # | ||
10 | # Define O to save output files in a separate directory. | 12 | # Define O to save output files in a separate directory. |
11 | # | 13 | # |
12 | # Define ARCH as name of target architecture if you want cross-builds. | 14 | # Define ARCH as name of target architecture if you want cross-builds. |
@@ -55,6 +57,9 @@ include config/utilities.mak | |||
55 | # Define NO_LIBAUDIT if you do not want libaudit support | 57 | # Define NO_LIBAUDIT if you do not want libaudit support |
56 | # | 58 | # |
57 | # Define NO_LIBBIONIC if you do not want bionic support | 59 | # Define NO_LIBBIONIC if you do not want bionic support |
60 | # | ||
61 | # Define NO_LIBDW_DWARF_UNWIND if you do not want libdw support | ||
62 | # for dwarf backtrace post unwind. | ||
58 | 63 | ||
59 | ifeq ($(srctree),) | 64 | ifeq ($(srctree),) |
60 | srctree := $(patsubst %/,%,$(dir $(shell pwd))) | 65 | srctree := $(patsubst %/,%,$(dir $(shell pwd))) |
@@ -208,7 +213,7 @@ LIB_H += ../../include/uapi/linux/perf_event.h | |||
208 | LIB_H += ../../include/linux/rbtree.h | 213 | LIB_H += ../../include/linux/rbtree.h |
209 | LIB_H += ../../include/linux/list.h | 214 | LIB_H += ../../include/linux/list.h |
210 | LIB_H += ../../include/uapi/linux/const.h | 215 | LIB_H += ../../include/uapi/linux/const.h |
211 | LIB_H += ../../include/linux/hash.h | 216 | LIB_H += ../include/linux/hash.h |
212 | LIB_H += ../../include/linux/stringify.h | 217 | LIB_H += ../../include/linux/stringify.h |
213 | LIB_H += util/include/linux/bitmap.h | 218 | LIB_H += util/include/linux/bitmap.h |
214 | LIB_H += util/include/linux/bitops.h | 219 | LIB_H += util/include/linux/bitops.h |
@@ -218,9 +223,7 @@ LIB_H += util/include/linux/ctype.h | |||
218 | LIB_H += util/include/linux/kernel.h | 223 | LIB_H += util/include/linux/kernel.h |
219 | LIB_H += util/include/linux/list.h | 224 | LIB_H += util/include/linux/list.h |
220 | LIB_H += util/include/linux/export.h | 225 | LIB_H += util/include/linux/export.h |
221 | LIB_H += util/include/linux/magic.h | ||
222 | LIB_H += util/include/linux/poison.h | 226 | LIB_H += util/include/linux/poison.h |
223 | LIB_H += util/include/linux/prefetch.h | ||
224 | LIB_H += util/include/linux/rbtree.h | 227 | LIB_H += util/include/linux/rbtree.h |
225 | LIB_H += util/include/linux/rbtree_augmented.h | 228 | LIB_H += util/include/linux/rbtree_augmented.h |
226 | LIB_H += util/include/linux/string.h | 229 | LIB_H += util/include/linux/string.h |
@@ -244,7 +247,6 @@ LIB_H += util/cache.h | |||
244 | LIB_H += util/callchain.h | 247 | LIB_H += util/callchain.h |
245 | LIB_H += util/build-id.h | 248 | LIB_H += util/build-id.h |
246 | LIB_H += util/debug.h | 249 | LIB_H += util/debug.h |
247 | LIB_H += util/fs.h | ||
248 | LIB_H += util/pmu.h | 250 | LIB_H += util/pmu.h |
249 | LIB_H += util/event.h | 251 | LIB_H += util/event.h |
250 | LIB_H += util/evsel.h | 252 | LIB_H += util/evsel.h |
@@ -306,7 +308,6 @@ LIB_OBJS += $(OUTPUT)util/annotate.o | |||
306 | LIB_OBJS += $(OUTPUT)util/build-id.o | 308 | LIB_OBJS += $(OUTPUT)util/build-id.o |
307 | LIB_OBJS += $(OUTPUT)util/config.o | 309 | LIB_OBJS += $(OUTPUT)util/config.o |
308 | LIB_OBJS += $(OUTPUT)util/ctype.o | 310 | LIB_OBJS += $(OUTPUT)util/ctype.o |
309 | LIB_OBJS += $(OUTPUT)util/fs.o | ||
310 | LIB_OBJS += $(OUTPUT)util/pmu.o | 311 | LIB_OBJS += $(OUTPUT)util/pmu.o |
311 | LIB_OBJS += $(OUTPUT)util/environment.o | 312 | LIB_OBJS += $(OUTPUT)util/environment.o |
312 | LIB_OBJS += $(OUTPUT)util/event.o | 313 | LIB_OBJS += $(OUTPUT)util/event.o |
@@ -408,6 +409,11 @@ endif | |||
408 | LIB_OBJS += $(OUTPUT)tests/code-reading.o | 409 | LIB_OBJS += $(OUTPUT)tests/code-reading.o |
409 | LIB_OBJS += $(OUTPUT)tests/sample-parsing.o | 410 | LIB_OBJS += $(OUTPUT)tests/sample-parsing.o |
410 | LIB_OBJS += $(OUTPUT)tests/parse-no-sample-id-all.o | 411 | LIB_OBJS += $(OUTPUT)tests/parse-no-sample-id-all.o |
412 | ifndef NO_DWARF_UNWIND | ||
413 | ifeq ($(ARCH),x86) | ||
414 | LIB_OBJS += $(OUTPUT)tests/dwarf-unwind.o | ||
415 | endif | ||
416 | endif | ||
411 | 417 | ||
412 | BUILTIN_OBJS += $(OUTPUT)builtin-annotate.o | 418 | BUILTIN_OBJS += $(OUTPUT)builtin-annotate.o |
413 | BUILTIN_OBJS += $(OUTPUT)builtin-bench.o | 419 | BUILTIN_OBJS += $(OUTPUT)builtin-bench.o |
@@ -420,6 +426,9 @@ BUILTIN_OBJS += $(OUTPUT)bench/mem-memset-x86-64-asm.o | |||
420 | endif | 426 | endif |
421 | BUILTIN_OBJS += $(OUTPUT)bench/mem-memcpy.o | 427 | BUILTIN_OBJS += $(OUTPUT)bench/mem-memcpy.o |
422 | BUILTIN_OBJS += $(OUTPUT)bench/mem-memset.o | 428 | BUILTIN_OBJS += $(OUTPUT)bench/mem-memset.o |
429 | BUILTIN_OBJS += $(OUTPUT)bench/futex-hash.o | ||
430 | BUILTIN_OBJS += $(OUTPUT)bench/futex-wake.o | ||
431 | BUILTIN_OBJS += $(OUTPUT)bench/futex-requeue.o | ||
423 | 432 | ||
424 | BUILTIN_OBJS += $(OUTPUT)builtin-diff.o | 433 | BUILTIN_OBJS += $(OUTPUT)builtin-diff.o |
425 | BUILTIN_OBJS += $(OUTPUT)builtin-evlist.o | 434 | BUILTIN_OBJS += $(OUTPUT)builtin-evlist.o |
@@ -475,8 +484,13 @@ ifndef NO_DWARF | |||
475 | endif # NO_DWARF | 484 | endif # NO_DWARF |
476 | endif # NO_LIBELF | 485 | endif # NO_LIBELF |
477 | 486 | ||
487 | ifndef NO_LIBDW_DWARF_UNWIND | ||
488 | LIB_OBJS += $(OUTPUT)util/unwind-libdw.o | ||
489 | LIB_H += util/unwind-libdw.h | ||
490 | endif | ||
491 | |||
478 | ifndef NO_LIBUNWIND | 492 | ifndef NO_LIBUNWIND |
479 | LIB_OBJS += $(OUTPUT)util/unwind.o | 493 | LIB_OBJS += $(OUTPUT)util/unwind-libunwind.o |
480 | endif | 494 | endif |
481 | LIB_OBJS += $(OUTPUT)tests/keep-tracking.o | 495 | LIB_OBJS += $(OUTPUT)tests/keep-tracking.o |
482 | 496 | ||
@@ -533,6 +547,7 @@ ifeq ($(NO_PERF_REGS),0) | |||
533 | ifeq ($(ARCH),x86) | 547 | ifeq ($(ARCH),x86) |
534 | LIB_H += arch/x86/include/perf_regs.h | 548 | LIB_H += arch/x86/include/perf_regs.h |
535 | endif | 549 | endif |
550 | LIB_OBJS += $(OUTPUT)util/perf_regs.o | ||
536 | endif | 551 | endif |
537 | 552 | ||
538 | ifndef NO_LIBNUMA | 553 | ifndef NO_LIBNUMA |
@@ -655,6 +670,9 @@ $(OUTPUT)tests/python-use.o: tests/python-use.c $(OUTPUT)PERF-CFLAGS | |||
655 | -DPYTHON='"$(PYTHON_WORD)"' \ | 670 | -DPYTHON='"$(PYTHON_WORD)"' \ |
656 | $< | 671 | $< |
657 | 672 | ||
673 | $(OUTPUT)tests/dwarf-unwind.o: tests/dwarf-unwind.c | ||
674 | $(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) -fno-optimize-sibling-calls $< | ||
675 | |||
658 | $(OUTPUT)util/config.o: util/config.c $(OUTPUT)PERF-CFLAGS | 676 | $(OUTPUT)util/config.o: util/config.c $(OUTPUT)PERF-CFLAGS |
659 | $(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) -DETC_PERFCONFIG='"$(ETC_PERFCONFIG_SQ)"' $< | 677 | $(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) -DETC_PERFCONFIG='"$(ETC_PERFCONFIG_SQ)"' $< |
660 | 678 | ||
@@ -707,9 +725,15 @@ $(patsubst perf-%,%.o,$(PROGRAMS)): $(LIB_H) $(wildcard */*.h) | |||
707 | # we depend the various files onto their directories. | 725 | # we depend the various files onto their directories. |
708 | DIRECTORY_DEPS = $(LIB_OBJS) $(BUILTIN_OBJS) $(GTK_OBJS) | 726 | DIRECTORY_DEPS = $(LIB_OBJS) $(BUILTIN_OBJS) $(GTK_OBJS) |
709 | DIRECTORY_DEPS += $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h | 727 | DIRECTORY_DEPS += $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h |
710 | $(DIRECTORY_DEPS): | $(sort $(dir $(DIRECTORY_DEPS))) | 728 | # no need to add flex objects, because they depend on bison ones |
729 | DIRECTORY_DEPS += $(OUTPUT)util/parse-events-bison.c | ||
730 | DIRECTORY_DEPS += $(OUTPUT)util/pmu-bison.c | ||
731 | |||
732 | OUTPUT_DIRECTORIES := $(sort $(dir $(DIRECTORY_DEPS))) | ||
733 | |||
734 | $(DIRECTORY_DEPS): | $(OUTPUT_DIRECTORIES) | ||
711 | # In the second step, we make a rule to actually create these directories | 735 | # In the second step, we make a rule to actually create these directories |
712 | $(sort $(dir $(DIRECTORY_DEPS))): | 736 | $(OUTPUT_DIRECTORIES): |
713 | $(QUIET_MKDIR)$(MKDIR) -p $@ 2>/dev/null | 737 | $(QUIET_MKDIR)$(MKDIR) -p $@ 2>/dev/null |
714 | 738 | ||
715 | $(LIB_FILE): $(LIB_OBJS) | 739 | $(LIB_FILE): $(LIB_OBJS) |
@@ -886,7 +910,7 @@ config-clean: | |||
886 | clean: $(LIBTRACEEVENT)-clean $(LIBAPIKFS)-clean config-clean | 910 | clean: $(LIBTRACEEVENT)-clean $(LIBAPIKFS)-clean config-clean |
887 | $(call QUIET_CLEAN, core-objs) $(RM) $(LIB_OBJS) $(BUILTIN_OBJS) $(LIB_FILE) $(OUTPUT)perf-archive $(OUTPUT)perf.o $(LANG_BINDINGS) $(GTK_OBJS) | 911 | $(call QUIET_CLEAN, core-objs) $(RM) $(LIB_OBJS) $(BUILTIN_OBJS) $(LIB_FILE) $(OUTPUT)perf-archive $(OUTPUT)perf.o $(LANG_BINDINGS) $(GTK_OBJS) |
888 | $(call QUIET_CLEAN, core-progs) $(RM) $(ALL_PROGRAMS) perf | 912 | $(call QUIET_CLEAN, core-progs) $(RM) $(ALL_PROGRAMS) perf |
889 | $(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)util/*-bison* $(OUTPUT)util/*-flex* | 913 | $(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* |
890 | $(QUIET_SUBDIR0)Documentation $(QUIET_SUBDIR1) clean | 914 | $(QUIET_SUBDIR0)Documentation $(QUIET_SUBDIR1) clean |
891 | $(python-clean) | 915 | $(python-clean) |
892 | 916 | ||