diff options
Diffstat (limited to 'tools/perf/Makefile')
-rw-r--r-- | tools/perf/Makefile | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index d1db0f676a4b..1b9b13ee2a72 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile | |||
@@ -185,7 +185,10 @@ ifeq ($(ARCH),i386) | |||
185 | ARCH := x86 | 185 | ARCH := x86 |
186 | endif | 186 | endif |
187 | ifeq ($(ARCH),x86_64) | 187 | ifeq ($(ARCH),x86_64) |
188 | RAW_ARCH := x86_64 | ||
188 | ARCH := x86 | 189 | ARCH := x86 |
190 | ARCH_CFLAGS := -DARCH_X86_64 | ||
191 | ARCH_INCLUDE = ../../arch/x86/lib/memcpy_64.S | ||
189 | endif | 192 | endif |
190 | 193 | ||
191 | # CFLAGS and LDFLAGS are for the users to override from the command line. | 194 | # CFLAGS and LDFLAGS are for the users to override from the command line. |
@@ -375,6 +378,7 @@ LIB_H += util/include/linux/prefetch.h | |||
375 | LIB_H += util/include/linux/rbtree.h | 378 | LIB_H += util/include/linux/rbtree.h |
376 | LIB_H += util/include/linux/string.h | 379 | LIB_H += util/include/linux/string.h |
377 | LIB_H += util/include/linux/types.h | 380 | LIB_H += util/include/linux/types.h |
381 | LIB_H += util/include/linux/linkage.h | ||
378 | LIB_H += util/include/asm/asm-offsets.h | 382 | LIB_H += util/include/asm/asm-offsets.h |
379 | LIB_H += util/include/asm/bug.h | 383 | LIB_H += util/include/asm/bug.h |
380 | LIB_H += util/include/asm/byteorder.h | 384 | LIB_H += util/include/asm/byteorder.h |
@@ -383,6 +387,8 @@ LIB_H += util/include/asm/swab.h | |||
383 | LIB_H += util/include/asm/system.h | 387 | LIB_H += util/include/asm/system.h |
384 | LIB_H += util/include/asm/uaccess.h | 388 | LIB_H += util/include/asm/uaccess.h |
385 | LIB_H += util/include/dwarf-regs.h | 389 | LIB_H += util/include/dwarf-regs.h |
390 | LIB_H += util/include/asm/dwarf2.h | ||
391 | LIB_H += util/include/asm/cpufeature.h | ||
386 | LIB_H += perf.h | 392 | LIB_H += perf.h |
387 | LIB_H += util/cache.h | 393 | LIB_H += util/cache.h |
388 | LIB_H += util/callchain.h | 394 | LIB_H += util/callchain.h |
@@ -390,6 +396,7 @@ LIB_H += util/build-id.h | |||
390 | LIB_H += util/debug.h | 396 | LIB_H += util/debug.h |
391 | LIB_H += util/debugfs.h | 397 | LIB_H += util/debugfs.h |
392 | LIB_H += util/event.h | 398 | LIB_H += util/event.h |
399 | LIB_H += util/evsel.h | ||
393 | LIB_H += util/exec_cmd.h | 400 | LIB_H += util/exec_cmd.h |
394 | LIB_H += util/types.h | 401 | LIB_H += util/types.h |
395 | LIB_H += util/levenshtein.h | 402 | LIB_H += util/levenshtein.h |
@@ -398,6 +405,7 @@ LIB_H += util/parse-options.h | |||
398 | LIB_H += util/parse-events.h | 405 | LIB_H += util/parse-events.h |
399 | LIB_H += util/quote.h | 406 | LIB_H += util/quote.h |
400 | LIB_H += util/util.h | 407 | LIB_H += util/util.h |
408 | LIB_H += util/xyarray.h | ||
401 | LIB_H += util/header.h | 409 | LIB_H += util/header.h |
402 | LIB_H += util/help.h | 410 | LIB_H += util/help.h |
403 | LIB_H += util/session.h | 411 | LIB_H += util/session.h |
@@ -417,6 +425,7 @@ LIB_H += util/probe-finder.h | |||
417 | LIB_H += util/probe-event.h | 425 | LIB_H += util/probe-event.h |
418 | LIB_H += util/pstack.h | 426 | LIB_H += util/pstack.h |
419 | LIB_H += util/cpumap.h | 427 | LIB_H += util/cpumap.h |
428 | LIB_H += $(ARCH_INCLUDE) | ||
420 | 429 | ||
421 | LIB_OBJS += $(OUTPUT)util/abspath.o | 430 | LIB_OBJS += $(OUTPUT)util/abspath.o |
422 | LIB_OBJS += $(OUTPUT)util/alias.o | 431 | LIB_OBJS += $(OUTPUT)util/alias.o |
@@ -426,6 +435,7 @@ LIB_OBJS += $(OUTPUT)util/ctype.o | |||
426 | LIB_OBJS += $(OUTPUT)util/debugfs.o | 435 | LIB_OBJS += $(OUTPUT)util/debugfs.o |
427 | LIB_OBJS += $(OUTPUT)util/environment.o | 436 | LIB_OBJS += $(OUTPUT)util/environment.o |
428 | LIB_OBJS += $(OUTPUT)util/event.o | 437 | LIB_OBJS += $(OUTPUT)util/event.o |
438 | LIB_OBJS += $(OUTPUT)util/evsel.o | ||
429 | LIB_OBJS += $(OUTPUT)util/exec_cmd.o | 439 | LIB_OBJS += $(OUTPUT)util/exec_cmd.o |
430 | LIB_OBJS += $(OUTPUT)util/help.o | 440 | LIB_OBJS += $(OUTPUT)util/help.o |
431 | LIB_OBJS += $(OUTPUT)util/levenshtein.o | 441 | LIB_OBJS += $(OUTPUT)util/levenshtein.o |
@@ -463,6 +473,7 @@ LIB_OBJS += $(OUTPUT)util/sort.o | |||
463 | LIB_OBJS += $(OUTPUT)util/hist.o | 473 | LIB_OBJS += $(OUTPUT)util/hist.o |
464 | LIB_OBJS += $(OUTPUT)util/probe-event.o | 474 | LIB_OBJS += $(OUTPUT)util/probe-event.o |
465 | LIB_OBJS += $(OUTPUT)util/util.o | 475 | LIB_OBJS += $(OUTPUT)util/util.o |
476 | LIB_OBJS += $(OUTPUT)util/xyarray.o | ||
466 | LIB_OBJS += $(OUTPUT)util/cpumap.o | 477 | LIB_OBJS += $(OUTPUT)util/cpumap.o |
467 | 478 | ||
468 | BUILTIN_OBJS += $(OUTPUT)builtin-annotate.o | 479 | BUILTIN_OBJS += $(OUTPUT)builtin-annotate.o |
@@ -472,6 +483,9 @@ BUILTIN_OBJS += $(OUTPUT)builtin-bench.o | |||
472 | # Benchmark modules | 483 | # Benchmark modules |
473 | BUILTIN_OBJS += $(OUTPUT)bench/sched-messaging.o | 484 | BUILTIN_OBJS += $(OUTPUT)bench/sched-messaging.o |
474 | BUILTIN_OBJS += $(OUTPUT)bench/sched-pipe.o | 485 | BUILTIN_OBJS += $(OUTPUT)bench/sched-pipe.o |
486 | ifeq ($(RAW_ARCH),x86_64) | ||
487 | BUILTIN_OBJS += $(OUTPUT)bench/mem-memcpy-x86-64-asm.o | ||
488 | endif | ||
475 | BUILTIN_OBJS += $(OUTPUT)bench/mem-memcpy.o | 489 | BUILTIN_OBJS += $(OUTPUT)bench/mem-memcpy.o |
476 | 490 | ||
477 | BUILTIN_OBJS += $(OUTPUT)builtin-diff.o | 491 | BUILTIN_OBJS += $(OUTPUT)builtin-diff.o |
@@ -485,7 +499,7 @@ BUILTIN_OBJS += $(OUTPUT)builtin-report.o | |||
485 | BUILTIN_OBJS += $(OUTPUT)builtin-stat.o | 499 | BUILTIN_OBJS += $(OUTPUT)builtin-stat.o |
486 | BUILTIN_OBJS += $(OUTPUT)builtin-timechart.o | 500 | BUILTIN_OBJS += $(OUTPUT)builtin-timechart.o |
487 | BUILTIN_OBJS += $(OUTPUT)builtin-top.o | 501 | BUILTIN_OBJS += $(OUTPUT)builtin-top.o |
488 | BUILTIN_OBJS += $(OUTPUT)builtin-trace.o | 502 | BUILTIN_OBJS += $(OUTPUT)builtin-script.o |
489 | BUILTIN_OBJS += $(OUTPUT)builtin-probe.o | 503 | BUILTIN_OBJS += $(OUTPUT)builtin-probe.o |
490 | BUILTIN_OBJS += $(OUTPUT)builtin-kmem.o | 504 | BUILTIN_OBJS += $(OUTPUT)builtin-kmem.o |
491 | BUILTIN_OBJS += $(OUTPUT)builtin-lock.o | 505 | BUILTIN_OBJS += $(OUTPUT)builtin-lock.o |
@@ -507,7 +521,7 @@ PERFLIBS = $(LIB_FILE) | |||
507 | -include config.mak | 521 | -include config.mak |
508 | 522 | ||
509 | ifndef NO_DWARF | 523 | ifndef NO_DWARF |
510 | FLAGS_DWARF=$(ALL_CFLAGS) -I/usr/include/elfutils -ldw -lelf $(ALL_LDFLAGS) $(EXTLIBS) | 524 | FLAGS_DWARF=$(ALL_CFLAGS) -ldw -lelf $(ALL_LDFLAGS) $(EXTLIBS) |
511 | ifneq ($(call try-cc,$(SOURCE_DWARF),$(FLAGS_DWARF)),y) | 525 | ifneq ($(call try-cc,$(SOURCE_DWARF),$(FLAGS_DWARF)),y) |
512 | msg := $(warning No libdw.h found or old libdw.h found or elfutils is older than 0.138, disables dwarf support. Please install new elfutils-devel/libdw-dev); | 526 | msg := $(warning No libdw.h found or old libdw.h found or elfutils is older than 0.138, disables dwarf support. Please install new elfutils-devel/libdw-dev); |
513 | NO_DWARF := 1 | 527 | NO_DWARF := 1 |
@@ -554,7 +568,7 @@ ifndef NO_DWARF | |||
554 | ifeq ($(origin PERF_HAVE_DWARF_REGS), undefined) | 568 | ifeq ($(origin PERF_HAVE_DWARF_REGS), undefined) |
555 | msg := $(warning DWARF register mappings have not been defined for architecture $(ARCH), DWARF support disabled); | 569 | msg := $(warning DWARF register mappings have not been defined for architecture $(ARCH), DWARF support disabled); |
556 | else | 570 | else |
557 | BASIC_CFLAGS += -I/usr/include/elfutils -DDWARF_SUPPORT | 571 | BASIC_CFLAGS += -DDWARF_SUPPORT |
558 | EXTLIBS += -lelf -ldw | 572 | EXTLIBS += -lelf -ldw |
559 | LIB_OBJS += $(OUTPUT)util/probe-finder.o | 573 | LIB_OBJS += $(OUTPUT)util/probe-finder.o |
560 | endif # PERF_HAVE_DWARF_REGS | 574 | endif # PERF_HAVE_DWARF_REGS |
@@ -891,13 +905,14 @@ prefix_SQ = $(subst ','\'',$(prefix)) | |||
891 | SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH)) | 905 | SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH)) |
892 | PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH)) | 906 | PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH)) |
893 | 907 | ||
894 | LIBS = $(PERFLIBS) $(EXTLIBS) | 908 | LIBS = -Wl,--whole-archive $(PERFLIBS) -Wl,--no-whole-archive $(EXTLIBS) |
895 | 909 | ||
896 | BASIC_CFLAGS += -DSHA1_HEADER='$(SHA1_HEADER_SQ)' \ | 910 | BASIC_CFLAGS += -DSHA1_HEADER='$(SHA1_HEADER_SQ)' \ |
897 | $(COMPAT_CFLAGS) | 911 | $(COMPAT_CFLAGS) |
898 | LIB_OBJS += $(COMPAT_OBJS) | 912 | LIB_OBJS += $(COMPAT_OBJS) |
899 | 913 | ||
900 | ALL_CFLAGS += $(BASIC_CFLAGS) | 914 | ALL_CFLAGS += $(BASIC_CFLAGS) |
915 | ALL_CFLAGS += $(ARCH_CFLAGS) | ||
901 | ALL_LDFLAGS += $(BASIC_LDFLAGS) | 916 | ALL_LDFLAGS += $(BASIC_LDFLAGS) |
902 | 917 | ||
903 | export TAR INSTALL DESTDIR SHELL_PATH | 918 | export TAR INSTALL DESTDIR SHELL_PATH |