Skip to content

Commit

Permalink
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux…
Browse files Browse the repository at this point in the history
…/kernel/git/acme/linux into perf/core

Pull perf/core improvements from Arnaldo Carvalho de Melo:

 * perf inject changes to allow showing where a task sleeps, from Andrew Vagin.

 * Makefile improvements from Namhyung Kim.

 * Add --pre and --post command hooks in 'stat', from Peter Zijlstra.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
  • Loading branch information
Ingo Molnar committed Oct 26, 2012
2 parents 8f7c1d0 + 1f16c57 commit 9db5506
Show file tree
Hide file tree
Showing 9 changed files with 256 additions and 61 deletions.
2 changes: 1 addition & 1 deletion tools/lib/traceevent/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ all_deps := $(all_objs:%.o=.%.d)
# let .d file also depends on the source and header files
define check_deps
@set -e; $(RM) $@; \
$(CC) -M $(CFLAGS) $< > $@.$$$$; \
$(CC) -MM $(CFLAGS) $< > $@.$$$$; \
sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
$(RM) $@.$$$$
endef
Expand Down
11 changes: 11 additions & 0 deletions tools/perf/Documentation/perf-inject.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@ OPTIONS
-v::
--verbose::
Be more verbose.
-i::
--input=::
Input file name. (default: stdin)
-o::
--output=::
Output file name. (default: stdout)
-s::
--sched-stat::
Merge sched_stat and sched_switch for getting events where and how long
tasks slept. sched_switch contains a callchain where a task slept and
sched_stat contains a timeslice how long a task slept.

SEE ALSO
--------
Expand Down
5 changes: 5 additions & 0 deletions tools/perf/Documentation/perf-stat.txt
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ with it. --append may be used here. Examples:
3>results perf stat --log-fd 3 -- $cmd
3>>results perf stat --log-fd 3 --append -- $cmd

--pre::
--post::
Pre and post measurement hooks, e.g.:

perf stat --repeat 10 --null --sync --pre 'make -s O=defconfig-build/clean' -- make -s -j64 O=defconfig-build/ bzImage


EXAMPLES
Expand Down
51 changes: 12 additions & 39 deletions tools/perf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,8 @@ LIB_OBJS += $(OUTPUT)util/symbol-minimal.o
else # NO_LIBELF
BASIC_CFLAGS += -DLIBELF_SUPPORT

ifeq ($(call try-cc,$(SOURCE_ELF_MMAP),$(FLAGS_COMMON),-DLIBELF_MMAP),y)
FLAGS_LIBELF=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS)
ifeq ($(call try-cc,$(SOURCE_ELF_MMAP),$(FLAGS_LIBELF),-DLIBELF_MMAP),y)
BASIC_CFLAGS += -DLIBELF_MMAP
endif

Expand Down Expand Up @@ -977,20 +978,15 @@ help:
@echo 'Perf maintainer targets:'
@echo ' clean - clean all binary objects and build output'

doc:
$(MAKE) -C Documentation all

man:
$(MAKE) -C Documentation man

html:
$(MAKE) -C Documentation html
DOC_TARGETS := doc man html info pdf

info:
$(MAKE) -C Documentation info
INSTALL_DOC_TARGETS := $(patsubst %,install-%,$(DOC_TARGETS)) try-install-man
INSTALL_DOC_TARGETS += quick-install-doc quick-install-man quick-install-html

pdf:
$(MAKE) -C Documentation pdf
# 'make doc' should call 'make -C Documentation all'
$(DOC_TARGETS):
$(QUIET_SUBDIR0)Documentation $(QUIET_SUBDIR1) $(@:doc=all)

TAGS:
$(RM) TAGS
Expand Down Expand Up @@ -1061,40 +1057,17 @@ install: all try-install-man
install-python_ext:
$(PYTHON_WORD) util/setup.py --quiet install --root='/$(DESTDIR_SQ)'

install-doc:
$(MAKE) -C Documentation install

install-man:
$(MAKE) -C Documentation install-man

try-install-man:
$(MAKE) -C Documentation try-install-man

install-html:
$(MAKE) -C Documentation install-html

install-info:
$(MAKE) -C Documentation install-info

install-pdf:
$(MAKE) -C Documentation install-pdf

quick-install-doc:
$(MAKE) -C Documentation quick-install

quick-install-man:
$(MAKE) -C Documentation quick-install-man

quick-install-html:
$(MAKE) -C Documentation quick-install-html
# 'make install-doc' should call 'make -C Documentation install'
$(INSTALL_DOC_TARGETS):
$(QUIET_SUBDIR0)Documentation $(QUIET_SUBDIR1) $(@:-doc=)

### Cleaning rules

clean: $(LIBTRACEEVENT)-clean
$(RM) $(LIB_OBJS) $(BUILTIN_OBJS) $(LIB_FILE) $(OUTPUT)perf-archive $(OUTPUT)perf.o $(LANG_BINDINGS)
$(RM) $(ALL_PROGRAMS) perf
$(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo $(OUTPUT)common-cmds.h TAGS tags cscope*
$(MAKE) -C Documentation/ clean
$(QUIET_SUBDIR0)Documentation $(QUIET_SUBDIR1) clean
$(RM) $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)PERF-CFLAGS
$(RM) $(OUTPUT)util/*-bison*
$(RM) $(OUTPUT)util/*-flex*
Expand Down
Loading

0 comments on commit 9db5506

Please sign in to comment.