aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-09-10 01:27:33 -0400
committerDavid S. Miller <davem@davemloft.net>2010-09-10 01:27:33 -0400
commite548833df83c3554229eff0672900bfe958b45fd (patch)
tree85efc4a76dc356593d6d394776aeb845dc580fb6 /tools
parentcbd9da7be869f676afc204e1a664163778c770bd (diff)
parent053d8f6622701f849fda2ca2c9ae596c13599ba9 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: net/mac80211/main.c
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/Makefile30
-rw-r--r--tools/perf/feature-tests.mak2
-rw-r--r--tools/perf/util/ui/browsers/annotate.c3
3 files changed, 23 insertions, 12 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 41abb90df50..4f1fa77c1fe 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -5,6 +5,12 @@ endif
5# The default target of this Makefile is... 5# The default target of this Makefile is...
6all:: 6all::
7 7
8ifneq ($(OUTPUT),)
9# check that the output directory actually exists
10OUTDIR := $(shell cd $(OUTPUT) && /bin/pwd)
11$(if $(OUTDIR),, $(error output directory "$(OUTPUT)" does not exist))
12endif
13
8# Define V=1 to have a more verbose compile. 14# Define V=1 to have a more verbose compile.
9# Define V=2 to have an even more verbose compile. 15# Define V=2 to have an even more verbose compile.
10# 16#
@@ -157,10 +163,6 @@ all::
157# 163#
158# Define NO_DWARF if you do not want debug-info analysis feature at all. 164# Define NO_DWARF if you do not want debug-info analysis feature at all.
159 165
160$(shell sh -c 'mkdir -p $(OUTPUT)scripts/{perl,python}/Perf-Trace-Util/' 2> /dev/null)
161$(shell sh -c 'mkdir -p $(OUTPUT)util/{ui/browsers,scripting-engines}/' 2> /dev/null)
162$(shell sh -c 'mkdir $(OUTPUT)bench' 2> /dev/null)
163
164$(OUTPUT)PERF-VERSION-FILE: .FORCE-PERF-VERSION-FILE 166$(OUTPUT)PERF-VERSION-FILE: .FORCE-PERF-VERSION-FILE
165 @$(SHELL_PATH) util/PERF-VERSION-GEN $(OUTPUT) 167 @$(SHELL_PATH) util/PERF-VERSION-GEN $(OUTPUT)
166-include $(OUTPUT)PERF-VERSION-FILE 168-include $(OUTPUT)PERF-VERSION-FILE
@@ -186,8 +188,6 @@ ifeq ($(ARCH),x86_64)
186 ARCH := x86 188 ARCH := x86
187endif 189endif
188 190
189$(shell sh -c 'mkdir -p $(OUTPUT)arch/$(ARCH)/util/' 2> /dev/null)
190
191# CFLAGS and LDFLAGS are for the users to override from the command line. 191# CFLAGS and LDFLAGS are for the users to override from the command line.
192 192
193# 193#
@@ -268,6 +268,7 @@ export prefix bindir sharedir sysconfdir
268CC = $(CROSS_COMPILE)gcc 268CC = $(CROSS_COMPILE)gcc
269AR = $(CROSS_COMPILE)ar 269AR = $(CROSS_COMPILE)ar
270RM = rm -f 270RM = rm -f
271MKDIR = mkdir
271TAR = tar 272TAR = tar
272FIND = find 273FIND = find
273INSTALL = install 274INSTALL = install
@@ -838,6 +839,7 @@ ifndef V
838 QUIET_CC = @echo ' ' CC $@; 839 QUIET_CC = @echo ' ' CC $@;
839 QUIET_AR = @echo ' ' AR $@; 840 QUIET_AR = @echo ' ' AR $@;
840 QUIET_LINK = @echo ' ' LINK $@; 841 QUIET_LINK = @echo ' ' LINK $@;
842 QUIET_MKDIR = @echo ' ' MKDIR $@;
841 QUIET_BUILT_IN = @echo ' ' BUILTIN $@; 843 QUIET_BUILT_IN = @echo ' ' BUILTIN $@;
842 QUIET_GEN = @echo ' ' GEN $@; 844 QUIET_GEN = @echo ' ' GEN $@;
843 QUIET_SUBDIR0 = +@subdir= 845 QUIET_SUBDIR0 = +@subdir=
@@ -935,15 +937,15 @@ $(OUTPUT)common-cmds.h: $(wildcard Documentation/perf-*.txt)
935 $(QUIET_GEN). util/generate-cmdlist.sh > $@+ && mv $@+ $@ 937 $(QUIET_GEN). util/generate-cmdlist.sh > $@+ && mv $@+ $@
936 938
937$(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh 939$(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
938 $(QUIET_GEN)$(RM) $@ $@+ && \ 940 $(QUIET_GEN)$(RM) $(OUTPUT)$@ $(OUTPUT)$@+ && \
939 sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \ 941 sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
940 -e 's|@SHELL_PATH@|$(SHELL_PATH_SQ)|' \ 942 -e 's|@SHELL_PATH@|$(SHELL_PATH_SQ)|' \
941 -e 's|@@PERL@@|$(PERL_PATH_SQ)|g' \ 943 -e 's|@@PERL@@|$(PERL_PATH_SQ)|g' \
942 -e 's/@@PERF_VERSION@@/$(PERF_VERSION)/g' \ 944 -e 's/@@PERF_VERSION@@/$(PERF_VERSION)/g' \
943 -e 's/@@NO_CURL@@/$(NO_CURL)/g' \ 945 -e 's/@@NO_CURL@@/$(NO_CURL)/g' \
944 $@.sh >$@+ && \ 946 $@.sh > $(OUTPUT)$@+ && \
945 chmod +x $@+ && \ 947 chmod +x $(OUTPUT)$@+ && \
946 mv $@+ $(OUTPUT)$@ 948 mv $(OUTPUT)$@+ $(OUTPUT)$@
947 949
948configure: configure.ac 950configure: configure.ac
949 $(QUIET_GEN)$(RM) $@ $<+ && \ 951 $(QUIET_GEN)$(RM) $@ $<+ && \
@@ -1012,6 +1014,14 @@ $(LIB_OBJS) $(BUILTIN_OBJS): $(LIB_H)
1012$(patsubst perf-%$X,%.o,$(PROGRAMS)): $(LIB_H) $(wildcard */*.h) 1014$(patsubst perf-%$X,%.o,$(PROGRAMS)): $(LIB_H) $(wildcard */*.h)
1013builtin-revert.o wt-status.o: wt-status.h 1015builtin-revert.o wt-status.o: wt-status.h
1014 1016
1017# we compile into subdirectories. if the target directory is not the source directory, they might not exists. So
1018# we depend the various files onto their directories.
1019DIRECTORY_DEPS = $(LIB_OBJS) $(BUILTIN_OBJS) $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h
1020$(DIRECTORY_DEPS): $(sort $(dir $(DIRECTORY_DEPS)))
1021# In the second step, we make a rule to actually create these directories
1022$(sort $(dir $(DIRECTORY_DEPS))):
1023 $(QUIET_MKDIR)$(MKDIR) -p $@ 2>/dev/null
1024
1015$(LIB_FILE): $(LIB_OBJS) 1025$(LIB_FILE): $(LIB_OBJS)
1016 $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(LIB_OBJS) 1026 $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(LIB_OBJS)
1017 1027
diff --git a/tools/perf/feature-tests.mak b/tools/perf/feature-tests.mak
index ddb68e601f0..7a7b6085905 100644
--- a/tools/perf/feature-tests.mak
+++ b/tools/perf/feature-tests.mak
@@ -113,7 +113,7 @@ endef
113# try-cc 113# try-cc
114# Usage: option = $(call try-cc, source-to-build, cc-options) 114# Usage: option = $(call try-cc, source-to-build, cc-options)
115try-cc = $(shell sh -c \ 115try-cc = $(shell sh -c \
116 'TMP="$(TMPOUT).$$$$"; \ 116 'TMP="$(OUTPUT)$(TMPOUT).$$$$"; \
117 echo "$(1)" | \ 117 echo "$(1)" | \
118 $(CC) -x c - $(2) -o "$$TMP" > /dev/null 2>&1 && echo y; \ 118 $(CC) -x c - $(2) -o "$$TMP" > /dev/null 2>&1 && echo y; \
119 rm -f "$$TMP"') 119 rm -f "$$TMP"')
diff --git a/tools/perf/util/ui/browsers/annotate.c b/tools/perf/util/ui/browsers/annotate.c
index 55ff792459a..a90273e63f4 100644
--- a/tools/perf/util/ui/browsers/annotate.c
+++ b/tools/perf/util/ui/browsers/annotate.c
@@ -146,6 +146,7 @@ static int annotate_browser__run(struct annotate_browser *self,
146 return -1; 146 return -1;
147 147
148 newtFormAddHotKey(self->b.form, NEWT_KEY_LEFT); 148 newtFormAddHotKey(self->b.form, NEWT_KEY_LEFT);
149 newtFormAddHotKey(self->b.form, NEWT_KEY_RIGHT);
149 150
150 nd = self->curr_hot; 151 nd = self->curr_hot;
151 if (nd) { 152 if (nd) {
@@ -178,7 +179,7 @@ static int annotate_browser__run(struct annotate_browser *self,
178 } 179 }
179out: 180out:
180 ui_browser__hide(&self->b); 181 ui_browser__hide(&self->b);
181 return 0; 182 return es->u.key;
182} 183}
183 184
184int hist_entry__tui_annotate(struct hist_entry *self) 185int hist_entry__tui_annotate(struct hist_entry *self)