diff options
| author | Ingo Molnar <mingo@kernel.org> | 2012-10-05 04:04:33 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2012-10-05 04:04:33 -0400 |
| commit | c942ee2e62dff1a7bc6f809965e93e46808d554c (patch) | |
| tree | 430d4730be24416f03fd992017e47605342d9b61 /tools/perf | |
| parent | e717bf4e4fe8adc519f25c4ff93ee50ed0a36710 (diff) | |
| parent | 139c0815903de1a7865fe1d6beac5e995fefdf46 (diff) | |
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
* Remove several cases of needless global variables, on most builtins.
* Look up thread using tid instead of pid in 'perf sched'.
* Move global variables into a perf_kvm struct, from David Ahern.
* Hists refactorings, preparatory for improved 'diff' command, from Jiri Olsa.
* Hists refactorings, preparatory for event group viewieng work, from Namhyung Kim.
* Remove double negation on optional feature macro definitions, from Namhyung Kim.
* Bash auto completion improvements, now we can auto complete the tools long
options, tracepoint event names, etc, from Namhyung Kim.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf')
46 files changed, 1193 insertions, 1175 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index e5e71e7d95a0..f9126f89efef 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile | |||
| @@ -45,6 +45,8 @@ include config/utilities.mak | |||
| 45 | # | 45 | # |
| 46 | # Define NO_LIBUNWIND if you do not want libunwind dependency for dwarf | 46 | # Define NO_LIBUNWIND if you do not want libunwind dependency for dwarf |
| 47 | # backtrace post unwind. | 47 | # backtrace post unwind. |
| 48 | # | ||
| 49 | # Define NO_BACKTRACE if you do not want stack backtrace debug feature | ||
| 48 | 50 | ||
| 49 | $(OUTPUT)PERF-VERSION-FILE: .FORCE-PERF-VERSION-FILE | 51 | $(OUTPUT)PERF-VERSION-FILE: .FORCE-PERF-VERSION-FILE |
| 50 | @$(SHELL_PATH) util/PERF-VERSION-GEN $(OUTPUT) | 52 | @$(SHELL_PATH) util/PERF-VERSION-GEN $(OUTPUT) |
| @@ -185,7 +187,7 @@ strip-libs = $(filter-out -l%,$(1)) | |||
| 185 | PYTHON_EXT_SRCS := $(shell grep -v ^\# util/python-ext-sources) | 187 | PYTHON_EXT_SRCS := $(shell grep -v ^\# util/python-ext-sources) |
| 186 | PYTHON_EXT_DEPS := util/python-ext-sources util/setup.py | 188 | PYTHON_EXT_DEPS := util/python-ext-sources util/setup.py |
| 187 | 189 | ||
| 188 | $(OUTPUT)python/perf.so: $(PYRF_OBJS) $(PYTHON_EXT_SRCS) $(PYTHON_EXT_DEPS) | 190 | $(OUTPUT)python/perf.so: $(PYTHON_EXT_SRCS) $(PYTHON_EXT_DEPS) |
| 189 | $(QUIET_GEN)CFLAGS='$(BASIC_CFLAGS)' $(PYTHON_WORD) util/setup.py \ | 191 | $(QUIET_GEN)CFLAGS='$(BASIC_CFLAGS)' $(PYTHON_WORD) util/setup.py \ |
| 190 | --quiet build_ext; \ | 192 | --quiet build_ext; \ |
| 191 | mkdir -p $(OUTPUT)python && \ | 193 | mkdir -p $(OUTPUT)python && \ |
| @@ -446,20 +448,6 @@ BUILTIN_OBJS += $(OUTPUT)builtin-inject.o | |||
| 446 | 448 | ||
| 447 | PERFLIBS = $(LIB_FILE) $(LIBTRACEEVENT) | 449 | PERFLIBS = $(LIB_FILE) $(LIBTRACEEVENT) |
| 448 | 450 | ||
| 449 | # Files needed for the python binding, perf.so | ||
| 450 | # pyrf is just an internal name needed for all those wrappers. | ||
| 451 | # This has to be in sync with what is in the 'sources' variable in | ||
| 452 | # tools/perf/util/setup.py | ||
| 453 | |||
| 454 | PYRF_OBJS += $(OUTPUT)util/cpumap.o | ||
| 455 | PYRF_OBJS += $(OUTPUT)util/ctype.o | ||
| 456 | PYRF_OBJS += $(OUTPUT)util/evlist.o | ||
| 457 | PYRF_OBJS += $(OUTPUT)util/evsel.o | ||
| 458 | PYRF_OBJS += $(OUTPUT)util/python.o | ||
| 459 | PYRF_OBJS += $(OUTPUT)util/thread_map.o | ||
| 460 | PYRF_OBJS += $(OUTPUT)util/util.o | ||
| 461 | PYRF_OBJS += $(OUTPUT)util/xyarray.o | ||
| 462 | |||
| 463 | # | 451 | # |
| 464 | # Platform specific tweaks | 452 | # Platform specific tweaks |
| 465 | # | 453 | # |
| @@ -486,7 +474,13 @@ ifneq ($(call try-cc,$(SOURCE_LIBELF),$(FLAGS_LIBELF)),y) | |||
| 486 | NO_DWARF := 1 | 474 | NO_DWARF := 1 |
| 487 | NO_DEMANGLE := 1 | 475 | NO_DEMANGLE := 1 |
| 488 | endif | 476 | endif |
| 489 | endif | 477 | else |
| 478 | FLAGS_DWARF=$(ALL_CFLAGS) -ldw -lelf $(ALL_LDFLAGS) $(EXTLIBS) | ||
| 479 | ifneq ($(call try-cc,$(SOURCE_DWARF),$(FLAGS_DWARF)),y) | ||
| 480 | 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); | ||
| 481 | NO_DWARF := 1 | ||
| 482 | endif # Dwarf support | ||
| 483 | endif # SOURCE_LIBELF | ||
| 490 | endif # NO_LIBELF | 484 | endif # NO_LIBELF |
| 491 | 485 | ||
| 492 | ifndef NO_LIBUNWIND | 486 | ifndef NO_LIBUNWIND |
| @@ -511,8 +505,6 @@ ifneq ($(OUTPUT),) | |||
| 511 | endif | 505 | endif |
| 512 | 506 | ||
| 513 | ifdef NO_LIBELF | 507 | ifdef NO_LIBELF |
| 514 | BASIC_CFLAGS += -DNO_LIBELF_SUPPORT | ||
| 515 | |||
| 516 | EXTLIBS := $(filter-out -lelf,$(EXTLIBS)) | 508 | EXTLIBS := $(filter-out -lelf,$(EXTLIBS)) |
| 517 | 509 | ||
| 518 | # Remove ELF/DWARF dependent codes | 510 | # Remove ELF/DWARF dependent codes |
| @@ -527,17 +519,12 @@ BUILTIN_OBJS := $(filter-out $(OUTPUT)builtin-probe.o,$(BUILTIN_OBJS)) | |||
| 527 | LIB_OBJS += $(OUTPUT)util/symbol-minimal.o | 519 | LIB_OBJS += $(OUTPUT)util/symbol-minimal.o |
| 528 | 520 | ||
| 529 | else # NO_LIBELF | 521 | else # NO_LIBELF |
| 522 | BASIC_CFLAGS += -DLIBELF_SUPPORT | ||
| 530 | 523 | ||
| 531 | ifneq ($(call try-cc,$(SOURCE_ELF_MMAP),$(FLAGS_COMMON)),y) | 524 | ifeq ($(call try-cc,$(SOURCE_ELF_MMAP),$(FLAGS_COMMON)),y) |
| 532 | BASIC_CFLAGS += -DLIBELF_NO_MMAP | 525 | BASIC_CFLAGS += -DLIBELF_MMAP |
| 533 | endif | 526 | endif |
| 534 | 527 | ||
| 535 | FLAGS_DWARF=$(ALL_CFLAGS) -ldw -lelf $(ALL_LDFLAGS) $(EXTLIBS) | ||
| 536 | ifneq ($(call try-cc,$(SOURCE_DWARF),$(FLAGS_DWARF)),y) | ||
| 537 | 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); | ||
| 538 | NO_DWARF := 1 | ||
| 539 | endif # Dwarf support | ||
| 540 | |||
| 541 | ifndef NO_DWARF | 528 | ifndef NO_DWARF |
| 542 | ifeq ($(origin PERF_HAVE_DWARF_REGS), undefined) | 529 | ifeq ($(origin PERF_HAVE_DWARF_REGS), undefined) |
| 543 | msg := $(warning DWARF register mappings have not been defined for architecture $(ARCH), DWARF support disabled); | 530 | msg := $(warning DWARF register mappings have not been defined for architecture $(ARCH), DWARF support disabled); |
| @@ -550,38 +537,33 @@ endif # PERF_HAVE_DWARF_REGS | |||
| 550 | endif # NO_DWARF | 537 | endif # NO_DWARF |
| 551 | endif # NO_LIBELF | 538 | endif # NO_LIBELF |
| 552 | 539 | ||
| 553 | ifdef NO_LIBUNWIND | 540 | ifndef NO_LIBUNWIND |
| 554 | BASIC_CFLAGS += -DNO_LIBUNWIND_SUPPORT | 541 | BASIC_CFLAGS += -DLIBUNWIND_SUPPORT |
| 555 | else | ||
| 556 | EXTLIBS += $(LIBUNWIND_LIBS) | 542 | EXTLIBS += $(LIBUNWIND_LIBS) |
| 557 | BASIC_CFLAGS := $(LIBUNWIND_CFLAGS) $(BASIC_CFLAGS) | 543 | BASIC_CFLAGS := $(LIBUNWIND_CFLAGS) $(BASIC_CFLAGS) |
| 558 | BASIC_LDFLAGS := $(LIBUNWIND_LDFLAGS) $(BASIC_LDFLAGS) | 544 | BASIC_LDFLAGS := $(LIBUNWIND_LDFLAGS) $(BASIC_LDFLAGS) |
| 559 | LIB_OBJS += $(OUTPUT)util/unwind.o | 545 | LIB_OBJS += $(OUTPUT)util/unwind.o |
| 560 | endif | 546 | endif |
| 561 | 547 | ||
| 562 | ifdef NO_LIBAUDIT | 548 | ifndef NO_LIBAUDIT |
| 563 | BASIC_CFLAGS += -DNO_LIBAUDIT_SUPPORT | ||
| 564 | else< | ||
