aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/Makefile
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2013-01-24 10:30:45 -0500
committerIngo Molnar <mingo@kernel.org>2013-01-24 10:30:45 -0500
commit203e04c16330c880538588e932743f404ee4fd66 (patch)
tree5f566e468756dd414651146f2c0042eeba1b3da7 /tools/perf/Makefile
parentba6fdda46b377034c782c0b89c8f1090b31eabd8 (diff)
parent2376c67a7bbc7849b806688ba2efb8520c21c458 (diff)
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: . perf build-id cache now can show DSOs present in a perf.data file that are not in the cache, to integrate with build-id servers being put in place by organizations such as Fedora. . perf buildid-list -i an-elf-file-instead-of-a-perf.data is back showing its build-id. . No need to do feature checks when doing a 'make tags' . Fix some 'perf test' errors and make them use the tracepoint evsel constructor. . perf top now shares more of the evsel config/creation routines with 'record', paving the way for further integration like 'top' snapshots, etc. . perf top now supports DWARF callchains. . perf evlist decodes sample_type and read_format, helping diagnose problems. . Fix mmap limitations on 32-bit, fix from David Miller. . perf diff fixes from Jiri Olsa. . Ignore ABS symbols when loading data maps, fix from Namhyung Kim . Hists improvements from Namhyung Kim . Don't check configuration on make clean, from Namhyung Kim . Fix dso__fprintf() print statement, from Stephane Eranian. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/Makefile')
-rw-r--r--tools/perf/Makefile51
1 files changed, 28 insertions, 23 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 8ab05e543ef4..2cbaad83a6e2 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -153,6 +153,8 @@ INSTALL = install
153# explicitly what architecture to check for. Fix this up for yours.. 153# explicitly what architecture to check for. Fix this up for yours..
154SPARSE_FLAGS = -D__BIG_ENDIAN__ -D__powerpc__ 154SPARSE_FLAGS = -D__BIG_ENDIAN__ -D__powerpc__
155 155
156ifneq ($(MAKECMDGOALS),clean)
157ifneq ($(MAKECMDGOALS),tags)
156-include config/feature-tests.mak 158-include config/feature-tests.mak
157 159
158ifeq ($(call try-cc,$(SOURCE_HELLO),$(CFLAGS) -Werror -fstack-protector-all,-fstack-protector-all),y) 160ifeq ($(call try-cc,$(SOURCE_HELLO),$(CFLAGS) -Werror -fstack-protector-all,-fstack-protector-all),y)
@@ -206,6 +208,8 @@ ifeq ($(call try-cc,$(SOURCE_BIONIC),$(CFLAGS),bionic),y)
206 EXTLIBS := $(filter-out -lpthread,$(EXTLIBS)) 208 EXTLIBS := $(filter-out -lpthread,$(EXTLIBS))
207 BASIC_CFLAGS += -I. 209 BASIC_CFLAGS += -I.
208endif 210endif
211endif # MAKECMDGOALS != tags
212endif # MAKECMDGOALS != clean
209 213
210# Guard against environment variables 214# Guard against environment variables
211BUILTIN_OBJS = 215BUILTIN_OBJS =
@@ -230,11 +234,19 @@ endif
230LIBTRACEEVENT = $(TE_PATH)libtraceevent.a 234LIBTRACEEVENT = $(TE_PATH)libtraceevent.a
231TE_LIB := -L$(TE_PATH) -ltraceevent 235TE_LIB := -L$(TE_PATH) -ltraceevent
232 236
237export LIBTRACEEVENT
238
239# python extension build directories
240PYTHON_EXTBUILD := $(OUTPUT)python_ext_build/
241PYTHON_EXTBUILD_LIB := $(PYTHON_EXTBUILD)lib/
242PYTHON_EXTBUILD_TMP := $(PYTHON_EXTBUILD)tmp/
243export PYTHON_EXTBUILD_LIB PYTHON_EXTBUILD_TMP
244
245python-clean := rm -rf $(PYTHON_EXTBUILD) $(OUTPUT)python/perf.so
246
233PYTHON_EXT_SRCS := $(shell grep -v ^\# util/python-ext-sources) 247PYTHON_EXT_SRCS := $(shell grep -v ^\# util/python-ext-sources)
234PYTHON_EXT_DEPS := util/python-ext-sources util/setup.py 248PYTHON_EXT_DEPS := util/python-ext-sources util/setup.py
235 249
236export LIBTRACEEVENT
237
238$(OUTPUT)python/perf.so: $(PYTHON_EXT_SRCS) $(PYTHON_EXT_DEPS) 250$(OUTPUT)python/perf.so: $(PYTHON_EXT_SRCS) $(PYTHON_EXT_DEPS)
239 $(QUIET_GEN)CFLAGS='$(BASIC_CFLAGS)' $(PYTHON_WORD) util/setup.py \ 251 $(QUIET_GEN)CFLAGS='$(BASIC_CFLAGS)' $(PYTHON_WORD) util/setup.py \
240 --quiet build_ext; \ 252 --quiet build_ext; \
@@ -378,8 +390,11 @@ LIB_H += util/rblist.h
378LIB_H += util/intlist.h 390LIB_H += util/intlist.h
379LIB_H += util/perf_regs.h 391LIB_H += util/perf_regs.h
380LIB_H += util/unwind.h 392LIB_H += util/unwind.h
381LIB_H += ui/helpline.h
382LIB_H += util/vdso.h 393LIB_H += util/vdso.h
394LIB_H += ui/helpline.h
395LIB_H += ui/progress.h
396LIB_H += ui/util.h
397LIB_H += ui/ui.h
383 398
384LIB_OBJS += $(OUTPUT)util/abspath.o 399LIB_OBJS += $(OUTPUT)util/abspath.o
385LIB_OBJS += $(OUTPUT)util/alias.o 400LIB_OBJS += $(OUTPUT)util/alias.o
@@ -453,6 +468,7 @@ LIB_OBJS += $(OUTPUT)util/stat.o
453LIB_OBJS += $(OUTPUT)ui/setup.o 468LIB_OBJS += $(OUTPUT)ui/setup.o
454LIB_OBJS += $(OUTPUT)ui/helpline.o 469LIB_OBJS += $(OUTPUT)ui/helpline.o
455LIB_OBJS += $(OUTPUT)ui/progress.o 470LIB_OBJS += $(OUTPUT)ui/progress.o
471LIB_OBJS += $(OUTPUT)ui/util.o
456LIB_OBJS += $(OUTPUT)ui/hist.o 472LIB_OBJS += $(OUTPUT)ui/hist.o
457LIB_OBJS += $(OUTPUT)ui/stdio/hist.o 473LIB_OBJS += $(OUTPUT)ui/stdio/hist.o
458 474
@@ -471,7 +487,6 @@ LIB_OBJS += $(OUTPUT)tests/rdpmc.o
471LIB_OBJS += $(OUTPUT)tests/evsel-roundtrip-name.o 487LIB_OBJS += $(OUTPUT)tests/evsel-roundtrip-name.o
472LIB_OBJS += $(OUTPUT)tests/evsel-tp-sched.o 488LIB_OBJS += $(OUTPUT)tests/evsel-tp-sched.o
473LIB_OBJS += $(OUTPUT)tests/pmu.o 489LIB_OBJS += $(OUTPUT)tests/pmu.o
474LIB_OBJS += $(OUTPUT)tests/util.o
475 490
476BUILTIN_OBJS += $(OUTPUT)builtin-annotate.o 491BUILTIN_OBJS += $(OUTPUT)builtin-annotate.o
477BUILTIN_OBJS += $(OUTPUT)builtin-bench.o 492BUILTIN_OBJS += $(OUTPUT)builtin-bench.o
@@ -510,6 +525,8 @@ PERFLIBS = $(LIB_FILE) $(LIBTRACEEVENT)
510# 525#
511# Platform specific tweaks 526# Platform specific tweaks
512# 527#
528ifneq ($(MAKECMDGOALS),clean)
529ifneq ($(MAKECMDGOALS),tags)
513 530
514# We choose to avoid "if .. else if .. else .. endif endif" 531# We choose to avoid "if .. else if .. else .. endif endif"
515# because maintaining the nesting to match is a pain. If 532# because maintaining the nesting to match is a pain. If
@@ -646,7 +663,6 @@ ifndef NO_NEWT
646 LIB_OBJS += $(OUTPUT)ui/browsers/hists.o 663 LIB_OBJS += $(OUTPUT)ui/browsers/hists.o
647 LIB_OBJS += $(OUTPUT)ui/browsers/map.o 664 LIB_OBJS += $(OUTPUT)ui/browsers/map.o
648 LIB_OBJS += $(OUTPUT)ui/browsers/scripts.o 665 LIB_OBJS += $(OUTPUT)ui/browsers/scripts.o
649 LIB_OBJS += $(OUTPUT)ui/util.o
650 LIB_OBJS += $(OUTPUT)ui/tui/setup.o 666 LIB_OBJS += $(OUTPUT)ui/tui/setup.o
651 LIB_OBJS += $(OUTPUT)ui/tui/util.o 667 LIB_OBJS += $(OUTPUT)ui/tui/util.o
652 LIB_OBJS += $(OUTPUT)ui/tui/helpline.o 668 LIB_OBJS += $(OUTPUT)ui/tui/helpline.o
@@ -655,9 +671,6 @@ ifndef NO_NEWT
655 LIB_H += ui/browsers/map.h 671 LIB_H += ui/browsers/map.h
656 LIB_H += ui/keysyms.h 672 LIB_H += ui/keysyms.h
657 LIB_H += ui/libslang.h 673 LIB_H += ui/libslang.h
658 LIB_H += ui/progress.h
659 LIB_H += ui/util.h
660 LIB_H += ui/ui.h
661 endif 674 endif
662endif 675endif
663 676
@@ -677,10 +690,6 @@ ifndef NO_GTK2
677 LIB_OBJS += $(OUTPUT)ui/gtk/util.o 690 LIB_OBJS += $(OUTPUT)ui/gtk/util.o
678 LIB_OBJS += $(OUTPUT)ui/gtk/helpline.o 691 LIB_OBJS += $(OUTPUT)ui/gtk/helpline.o
679 LIB_OBJS += $(OUTPUT)ui/gtk/progress.o 692 LIB_OBJS += $(OUTPUT)ui/gtk/progress.o
680 # Make sure that it'd be included only once.
681 ifeq ($(findstring -DNEWT_SUPPORT,$(BASIC_CFLAGS)),)
682 LIB_OBJS += $(OUTPUT)ui/util.o
683 endif
684 endif 693 endif
685endif 694endif
686 695
@@ -707,7 +716,7 @@ disable-python = $(eval $(disable-python_code))
707define disable-python_code 716define disable-python_code
708 BASIC_CFLAGS += -DNO_LIBPYTHON 717 BASIC_CFLAGS += -DNO_LIBPYTHON
709 $(if $(1),$(warning No $(1) was found)) 718 $(if $(1),$(warning No $(1) was found))
710 $(warning Python support won't be built) 719 $(warning Python support will not be built)
711endef 720endef
712 721
713override PYTHON := \ 722override PYTHON := \
@@ -715,19 +724,10 @@ override PYTHON := \
715 724
716ifndef PYTHON 725ifndef PYTHON
717 $(call disable-python,python interpreter) 726 $(call disable-python,python interpreter)
718 python-clean :=
719else 727else
720 728
721 PYTHON_WORD := $(call shell-wordify,$(PYTHON)) 729 PYTHON_WORD := $(call shell-wordify,$(PYTHON))
722 730
723 # python extension build directories
724 PYTHON_EXTBUILD := $(OUTPUT)python_ext_build/
725 PYTHON_EXTBUILD_LIB := $(PYTHON_EXTBUILD)lib/
726 PYTHON_EXTBUILD_TMP := $(PYTHON_EXTBUILD)tmp/
727 export PYTHON_EXTBUILD_LIB PYTHON_EXTBUILD_TMP
728
729 python-clean := rm -rf $(PYTHON_EXTBUILD) $(OUTPUT)python/perf.so
730
731 ifdef NO_LIBPYTHON 731 ifdef NO_LIBPYTHON
732 $(call disable-python) 732 $(call disable-python)
733 else 733 else
@@ -843,6 +843,9 @@ ifdef ASCIIDOC8
843 export ASCIIDOC8 843 export ASCIIDOC8
844endif 844endif
845 845
846endif # MAKECMDGOALS != tags
847endif # MAKECMDGOALS != clean
848
846# Shell quote (do not use $(call) to accommodate ancient setups); 849# Shell quote (do not use $(call) to accommodate ancient setups);
847 850
848ETC_PERFCONFIG_SQ = $(subst ','\'',$(ETC_PERFCONFIG)) 851ETC_PERFCONFIG_SQ = $(subst ','\'',$(ETC_PERFCONFIG))
@@ -1099,7 +1102,7 @@ perfexec_instdir = $(prefix)/$(perfexecdir)
1099endif 1102endif
1100perfexec_instdir_SQ = $(subst ','\'',$(perfexec_instdir)) 1103perfexec_instdir_SQ = $(subst ','\'',$(perfexec_instdir))
1101 1104
1102install: all try-install-man 1105install-bin: all
1103 $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)' 1106 $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)'
1104 $(INSTALL) $(OUTPUT)perf '$(DESTDIR_SQ)$(bindir_SQ)' 1107 $(INSTALL) $(OUTPUT)perf '$(DESTDIR_SQ)$(bindir_SQ)'
1105 $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace' 1108 $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace'
@@ -1120,6 +1123,8 @@ install: all try-install-man
1120 $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr' 1123 $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr'
1121 $(INSTALL) tests/attr/* '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr' 1124 $(INSTALL) tests/attr/* '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr'
1122 1125
1126install: install-bin try-install-man
1127
1123install-python_ext: 1128install-python_ext:
1124 $(PYTHON_WORD) util/setup.py --quiet install --root='/$(DESTDIR_SQ)' 1129 $(PYTHON_WORD) util/setup.py --quiet install --root='/$(DESTDIR_SQ)'
1125 1130