aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2011-02-02 01:11:02 -0500
committerIngo Molnar <mingo@elte.hu>2011-02-02 01:11:02 -0500
commitb84defe6036e6dea782d41b80a4590e54f249671 (patch)
tree457a20616ba961b13ca2b45d639e1c78e784d500
parent8104a4775ad8a7863af0b898224b15aa708582db (diff)
parentcdb0861c85c03fe80f4da033aab69df949579dc6 (diff)
Merge branch 'perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 into perf/core
-rw-r--r--tools/perf/Makefile20
-rw-r--r--tools/perf/builtin-stat.c4
-rw-r--r--tools/perf/util/ui/libslang.h6
3 files changed, 17 insertions, 13 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 67a9f4d805de..4c9499cb4398 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -325,9 +325,9 @@ SCRIPT_SH += perf-archive.sh
325grep-libs = $(filter -l%,$(1)) 325grep-libs = $(filter -l%,$(1))
326strip-libs = $(filter-out -l%,$(1)) 326strip-libs = $(filter-out -l%,$(1))
327 327
328pyrf: $(PYRF_OBJS) 328$(OUTPUT)python/perf.so: $(PYRF_OBJS)
329 python util/setup.py build --build-base='$(OUTPUT)' 329 @python util/setup.py --quiet build_ext --build-lib='$(OUTPUT)python' \
330 330 --build-temp='$(OUTPUT)python/temp'
331# 331#
332# No Perl scripts right now: 332# No Perl scripts right now:
333# 333#
@@ -348,12 +348,14 @@ PROGRAMS += $(EXTRA_PROGRAMS)
348# 348#
349PROGRAMS += $(OUTPUT)perf 349PROGRAMS += $(OUTPUT)perf
350 350
351LANG_BINDINGS =
352
351# List built-in command $C whose implementation cmd_$C() is not in 353# List built-in command $C whose implementation cmd_$C() is not in
352# builtin-$C.o but is linked in as part of some other command. 354# builtin-$C.o but is linked in as part of some other command.
353# 355#
354 356
355# what 'all' will build and 'install' will install, in perfexecdir 357# what 'all' will build and 'install' will install, in perfexecdir
356ALL_PROGRAMS = $(PROGRAMS) $(SCRIPTS) pyrf 358ALL_PROGRAMS = $(PROGRAMS) $(SCRIPTS)
357 359
358# what 'all' will build but not install in perfexecdir 360# what 'all' will build but not install in perfexecdir
359OTHER_PROGRAMS = $(OUTPUT)perf$X 361OTHER_PROGRAMS = $(OUTPUT)perf$X
@@ -662,12 +664,14 @@ else
662 PYTHON_EMBED_CCOPTS = `python-config --cflags 2>/dev/null` 664 PYTHON_EMBED_CCOPTS = `python-config --cflags 2>/dev/null`
663 FLAGS_PYTHON_EMBED=$(PYTHON_EMBED_CCOPTS) $(PYTHON_EMBED_LDOPTS) 665 FLAGS_PYTHON_EMBED=$(PYTHON_EMBED_CCOPTS) $(PYTHON_EMBED_LDOPTS)
664 ifneq ($(call try-cc,$(SOURCE_PYTHON_EMBED),$(FLAGS_PYTHON_EMBED)),y) 666 ifneq ($(call try-cc,$(SOURCE_PYTHON_EMBED),$(FLAGS_PYTHON_EMBED)),y)
667 msg := $(warning No Python.h found, install python-dev[el] to have python support in 'perf script' and to build the python bindings)
665 BASIC_CFLAGS += -DNO_LIBPYTHON 668 BASIC_CFLAGS += -DNO_LIBPYTHON
666 else 669 else
667 ALL_LDFLAGS += $(PYTHON_EMBED_LDFLAGS) 670 ALL_LDFLAGS += $(PYTHON_EMBED_LDFLAGS)
668 EXTLIBS += $(PYTHON_EMBED_LIBADD) 671 EXTLIBS += $(PYTHON_EMBED_LIBADD)
669 LIB_OBJS += $(OUTPUT)util/scripting-engines/trace-event-python.o 672 LIB_OBJS += $(OUTPUT)util/scripting-engines/trace-event-python.o
670 LIB_OBJS += $(OUTPUT)scripts/python/Perf-Trace-Util/Context.o 673 LIB_OBJS += $(OUTPUT)scripts/python/Perf-Trace-Util/Context.o
674 LANG_BINDINGS += $(OUTPUT)python/perf.so
671 endif 675 endif
672endif 676endif
673 677
@@ -954,7 +958,7 @@ export TAR INSTALL DESTDIR SHELL_PATH
954 958
955SHELL = $(SHELL_PATH) 959SHELL = $(SHELL_PATH)
956 960
957all:: shell_compatibility_test $(ALL_PROGRAMS) $(BUILT_INS) $(OTHER_PROGRAMS) $(OUTPUT)PERF-BUILD-OPTIONS 961all:: shell_compatibility_test $(ALL_PROGRAMS) $(LANG_BINDINGS) $(BUILT_INS) $(OTHER_PROGRAMS) $(OUTPUT)PERF-BUILD-OPTIONS
958ifneq (,$X) 962ifneq (,$X)
959 $(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) perf$X)), test '$p' -ef '$p$X' || $(RM) '$p';) 963 $(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) perf$X)), test '$p' -ef '$p$X' || $(RM) '$p';)
960endif 964endif
@@ -1287,17 +1291,17 @@ distclean: clean
1287# $(RM) configure 1291# $(RM) configure
1288 1292
1289clean: 1293clean:
1290 $(RM) *.o */*.o */*/*.o */*/*/*.o $(LIB_FILE) 1294 $(RM) $(OUTPUT){*.o,*/*.o,*/*/*.o,*/*/*/*.o,$(LIB_FILE),perf-archive}
1291 $(RM) $(ALL_PROGRAMS) $(BUILT_INS) perf$X 1295 $(RM) $(ALL_PROGRAMS) $(BUILT_INS) perf$X
1292 $(RM) $(TEST_PROGRAMS) 1296 $(RM) $(TEST_PROGRAMS)
1293 $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo $(OUTPUT)common-cmds.h TAGS tags cscope* 1297 $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo $(OUTPUT)common-cmds.h TAGS tags cscope*
1294 $(RM) -r autom4te.cache
1295 $(RM) config.log config.mak.autogen config.mak.append config.status config.cache
1296 $(RM) -r $(PERF_TARNAME) .doc-tmp-dir 1298 $(RM) -r $(PERF_TARNAME) .doc-tmp-dir
1297 $(RM) $(PERF_TARNAME).tar.gz perf-core_$(PERF_VERSION)-*.tar.gz 1299 $(RM) $(PERF_TARNAME).tar.gz perf-core_$(PERF_VERSION)-*.tar.gz
1298 $(RM) $(htmldocs).tar.gz $(manpages).tar.gz 1300 $(RM) $(htmldocs).tar.gz $(manpages).tar.gz
1299 $(MAKE) -C Documentation/ clean 1301 $(MAKE) -C Documentation/ clean
1300 $(RM) $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)PERF-CFLAGS $(OUTPUT)PERF-BUILD-OPTIONS 1302 $(RM) $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)PERF-CFLAGS $(OUTPUT)PERF-BUILD-OPTIONS
1303 @python util/setup.py clean --build-lib='$(OUTPUT)python' \
1304 --build-temp='$(OUTPUT)python/temp'
1301 1305
1302.PHONY: all install clean strip 1306.PHONY: all install clean strip
1303.PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell 1307.PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index e0f95755361b..806a9998fcd5 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -748,8 +748,8 @@ int cmd_stat(int argc, const char **argv, const char *prefix __used)
748out_free_fd: 748out_free_fd:
749 list_for_each_entry(pos, &evsel_list->entries, node) 749 list_for_each_entry(pos, &evsel_list->entries, node)
750 perf_evsel__free_stat_priv(pos); 750 perf_evsel__free_stat_priv(pos);
751 perf_evlist__delete(evsel_list);
752out:
753 perf_evlist__delete_maps(evsel_list); 751 perf_evlist__delete_maps(evsel_list);
752out:
753 perf_evlist__delete(evsel_list);
754 return status; 754 return status;
755} 755}
diff --git a/tools/perf/util/ui/libslang.h b/tools/perf/util/ui/libslang.h
index 5623da8e8080..2b63e1c9b181 100644
--- a/tools/perf/util/ui/libslang.h
+++ b/tools/perf/util/ui/libslang.h
@@ -13,11 +13,11 @@
13 13
14#if SLANG_VERSION < 20104 14#if SLANG_VERSION < 20104
15#define slsmg_printf(msg, args...) \ 15#define slsmg_printf(msg, args...) \
16 SLsmg_printf((char *)msg, ##args) 16 SLsmg_printf((char *)(msg), ##args)
17#define slsmg_write_nstring(msg, len) \ 17#define slsmg_write_nstring(msg, len) \
18 SLsmg_write_nstring((char *)msg, len) 18 SLsmg_write_nstring((char *)(msg), len)
19#define sltt_set_color(obj, name, fg, bg) \ 19#define sltt_set_color(obj, name, fg, bg) \
20 SLtt_set_color(obj,(char *)name, (char *)fg, (char *)bg) 20 SLtt_set_color(obj,(char *)(name), (char *)(fg), (char *)(bg))
21#else 21#else
22#define slsmg_printf SLsmg_printf 22#define slsmg_printf SLsmg_printf
23#define slsmg_write_nstring SLsmg_write_nstring 23#define slsmg_write_nstring SLsmg_write_nstring