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 and fixes from Arnaldo Carvalho de Melo:

  * kcore annotation improvements, including build-id cache support,
    multi map 'call' instruction navigation fixes, kcore address
    validation, objdump workarounds. From Adrian Hunter.

  * 'trace' beautifiers for lots of syscall arguments, from Arnaldo Carvalho de Melo.

  * More compact 'trace' output by suppressing zeroed args, from Arnaldo Carvalho de Melo.

  * Show thread COMM by default in 'trace', from Arnaldo Carvalho de Melo.

  * Show path associated with fd in live sessions, using a 'vfs_getname'
    'perf probe' created dynamic tracepoint or by looking at /proc/pid/fd, from Arnaldo Carvalho de Melo.

  * Memory and mmap leak fixes from Chenggang Qin.

  * Add option to show full timestamp in 'trace', from David Ahern.

  * Add 'record' command in 'trace', to record raw_syscalls:*, from David Ahern.

  * Add summary option to dump syscall statistics in 'trace', from David Ahern.

  * Fix comm resolution in 'trace' when reading events from file, from David Ahern.

  * Improved messages when doing profiling in all or a subset of CPUs
    using a workload as the session delimitator, as in:

     'perf stat --cpu 0,2 sleep 10s'

    from Arnaldo Carvalho de Melo.

  * Add units to nanosec-based counters in 'perf stat', from David Ahern.

  * Assorted build fixes for from David Ahern and Jiri Olsa.

  * 'perf lock' fixes and cleanups, from Davidlohr Bueso.

  * Memory leak fixes in 'perf test', from Felipe Pena.

  * Build system super speedups, from Ingo Molnar.

  * Fix mmap_read event overflow, from Jiri Olsa.

  * Code cleanups from Jiri Olsa.

  * Allow specifying B/K/M/G unit to the --mmap-pages arguments, from Jiri Olsa.

  * Separate the GTK support in a separate libperf-gtk.so DSO, that is
    only loaded when --gtk is specified, from Namhyung Kim.

  * Fixes for some memory leaks, from Namhyumg Kim.

  * Fix srcline sort key behavior, from Namhyung Kim.

  * Fix failing assertions in numa bench, from Petr Holasek.

  * perf bash completion fixes and improvements from Ramkumar Ramachandra.

  * Improve error messages in 'trace', providing hints about system configuration
    steps needed for using it, from Ramkumar Ramachandra.

  * Remove bogus info when using 'perf stat' -e cycles/instructions, from
    Ramkumar Ramachandra.

  * Support for Openembedded/Yocto -dbg packages, from Ricardo Ribalda Delgado.

  * Implement addr2line directly using libbfd, from Roberto Vitillo.

  * Add new option --ignore-vmlinux for perf top, from Willy Tarreau.

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 15, 2013
2 parents 426ee9e + 784f339 commit 1ff9ecf
Show file tree
Hide file tree
Showing 115 changed files with 5,144 additions and 2,032 deletions.
18 changes: 9 additions & 9 deletions tools/lib/traceevent/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,14 @@ ifeq ($(VERBOSE),1)
print_install =
else
Q = @
print_compile = echo ' CC '$(OBJ);
print_app_build = echo ' BUILD '$(OBJ);
print_fpic_compile = echo ' CC FPIC '$(OBJ);
print_shared_lib_compile = echo ' BUILD SHARED LIB '$(OBJ);
print_plugin_obj_compile = echo ' CC PLUGIN OBJ '$(OBJ);
print_plugin_build = echo ' CC PLUGI '$(OBJ);
print_static_lib_build = echo ' BUILD STATIC LIB '$(OBJ);
print_install = echo ' INSTALL '$1' to $(DESTDIR_SQ)$2';
print_compile = echo ' CC '$(OBJ);
print_app_build = echo ' BUILD '$(OBJ);
print_fpic_compile = echo ' CC FPIC '$(OBJ);
print_shared_lib_compile = echo ' BUILD SHARED LIB '$(OBJ);
print_plugin_obj_compile = echo ' BUILD PLUGIN OBJ '$(OBJ);
print_plugin_build = echo ' BUILD PLUGIN '$(OBJ);
print_static_lib_build = echo ' BUILD STATIC LIB '$(OBJ);
print_install = echo ' INSTALL '$1' to $(DESTDIR_SQ)$2';
endif

do_fpic_compile = \
Expand Down Expand Up @@ -268,7 +268,7 @@ TRACK_CFLAGS = $(subst ','\'',$(CFLAGS)):$(ARCH):$(CROSS_COMPILE)
TRACEEVENT-CFLAGS: force
@FLAGS='$(TRACK_CFLAGS)'; \
if test x"$$FLAGS" != x"`cat TRACEEVENT-CFLAGS 2>/dev/null`" ; then \
echo 1>&2 " * new build flags or cross compiler"; \
echo 1>&2 " FLAGS: * new build flags or cross compiler"; \
echo "$$FLAGS" >TRACEEVENT-CFLAGS; \
fi

Expand Down
1 change: 1 addition & 0 deletions tools/perf/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ perf*.html
common-cmds.h
perf.data
perf.data.old
output.svg
perf-archive
tags
TAGS
Expand Down
79 changes: 38 additions & 41 deletions tools/perf/Documentation/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -145,16 +145,17 @@ endif

ifneq ($(findstring $(MAKEFLAGS),s),s)
ifneq ($(V),1)
QUIET_ASCIIDOC = @echo ' ' ASCIIDOC $@;
QUIET_XMLTO = @echo ' ' XMLTO $@;
QUIET_DB2TEXI = @echo ' ' DB2TEXI $@;
QUIET_MAKEINFO = @echo ' ' MAKEINFO $@;
QUIET_DBLATEX = @echo ' ' DBLATEX $@;
QUIET_XSLTPROC = @echo ' ' XSLTPROC $@;
QUIET_GEN = @echo ' ' GEN $@;
QUIET_ASCIIDOC = @echo ' ASCIIDOC '$@;
QUIET_XMLTO = @echo ' XMLTO '$@;
QUIET_DB2TEXI = @echo ' DB2TEXI '$@;
QUIET_MAKEINFO = @echo ' MAKEINFO '$@;
QUIET_DBLATEX = @echo ' DBLATEX '$@;
QUIET_XSLTPROC = @echo ' XSLTPROC '$@;
QUIET_GEN = @echo ' GEN '$@;
QUIET_STDERR = 2> /dev/null
QUIET_SUBDIR0 = +@subdir=
QUIET_SUBDIR1 = ;$(NO_SUBDIR) echo ' ' SUBDIR $$subdir; \
QUIET_SUBDIR1 = ;$(NO_SUBDIR) \
echo ' SUBDIR ' $$subdir; \
$(MAKE) $(PRINT_DIR) -C $$subdir
export V
endif
Expand Down Expand Up @@ -183,47 +184,43 @@ ifdef missing_tools
endif

do-install-man: man
$(INSTALL) -d -m 755 $(DESTDIR)$(man1dir)
# $(INSTALL) -d -m 755 $(DESTDIR)$(man5dir)
# $(INSTALL) -d -m 755 $(DESTDIR)$(man7dir)
$(INSTALL) -m 644 $(DOC_MAN1) $(DESTDIR)$(man1dir)
# $(INSTALL) -m 644 $(DOC_MAN5) $(DESTDIR)$(man5dir)
# $(INSTALL) -m 644 $(DOC_MAN7) $(DESTDIR)$(man7dir)
$(call QUIET_INSTALL, Documentation-man) \
$(INSTALL) -d -m 755 $(DESTDIR)$(man1dir); \
# $(INSTALL) -d -m 755 $(DESTDIR)$(man5dir); \
# $(INSTALL) -d -m 755 $(DESTDIR)$(man7dir); \
$(INSTALL) -m 644 $(DOC_MAN1) $(DESTDIR)$(man1dir); \
# $(INSTALL) -m 644 $(DOC_MAN5) $(DESTDIR)$(man5dir); \
# $(INSTALL) -m 644 $(DOC_MAN7) $(DESTDIR)$(man7dir)

install-man: check-man-tools man

try-install-man:
ifdef missing_tools
$(warning Please install $(missing_tools) to have the man pages installed)
DO_INSTALL_MAN = $(warning Please install $(missing_tools) to have the man pages installed)
else
$(MAKE) do-install-man
DO_INSTALL_MAN = do-install-man
endif

try-install-man: $(DO_INSTALL_MAN)

install-info: info
$(INSTALL) -d -m 755 $(DESTDIR)$(infodir)
$(INSTALL) -m 644 $(OUTPUT)perf.info $(OUTPUT)perfman.info $(DESTDIR)$(infodir)
$(call QUIET_INSTALL, Documentation-info) \
$(INSTALL) -d -m 755 $(DESTDIR)$(infodir); \
$(INSTALL) -m 644 $(OUTPUT)perf.info $(OUTPUT)perfman.info $(DESTDIR)$(infodir); \
if test -r $(DESTDIR)$(infodir)/dir; then \
$(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) perf.info ;\
$(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) perfman.info ;\
$(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) perf.info ;\
$(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) perfman.info ;\
else \
echo "No directory found in $(DESTDIR)$(infodir)" >&2 ; \
fi

install-pdf: pdf
$(INSTALL) -d -m 755 $(DESTDIR)$(pdfdir)
$(INSTALL) -m 644 $(OUTPUT)user-manual.pdf $(DESTDIR)$(pdfdir)
$(call QUIET_INSTALL, Documentation-pdf) \
$(INSTALL) -d -m 755 $(DESTDIR)$(pdfdir); \
$(INSTALL) -m 644 $(OUTPUT)user-manual.pdf $(DESTDIR)$(pdfdir)

#install-html: html
# '$(SHELL_PATH_SQ)' ./install-webdoc.sh $(DESTDIR)$(htmldir)

ifneq ($(MAKECMDGOALS),clean)
ifneq ($(MAKECMDGOALS),tags)
$(OUTPUT)PERF-VERSION-FILE: .FORCE-PERF-VERSION-FILE
$(QUIET_SUBDIR0)../ $(QUIET_SUBDIR1) $(OUTPUT)PERF-VERSION-FILE

-include $(OUTPUT)PERF-VERSION-FILE
endif
endif

#
# Determine "include::" file references in asciidoc files.
Expand Down Expand Up @@ -253,15 +250,17 @@ $(OUTPUT)cmd-list.made: cmd-list.perl ../command-list.txt $(MAN1_TXT)
$(PERL_PATH) ./cmd-list.perl ../command-list.txt $(QUIET_STDERR) && \
date >$@

CLEAN_FILES = \
$(MAN_XML) $(addsuffix +,$(MAN_XML)) \
$(MAN_HTML) $(addsuffix +,$(MAN_HTML)) \
$(DOC_HTML) $(DOC_MAN1) $(DOC_MAN5) $(DOC_MAN7) \
$(OUTPUT)*.texi $(OUTPUT)*.texi+ $(OUTPUT)*.texi++ \
$(OUTPUT)perf.info $(OUTPUT)perfman.info \
$(OUTPUT)howto-index.txt $(OUTPUT)howto/*.html $(OUTPUT)doc.dep \
$(OUTPUT)technical/api-*.html $(OUTPUT)technical/api-index.txt \
$(cmds_txt) $(OUTPUT)*.made
clean:
$(RM) $(MAN_XML) $(addsuffix +,$(MAN_XML))
$(RM) $(MAN_HTML) $(addsuffix +,$(MAN_HTML))
$(RM) $(DOC_HTML) $(DOC_MAN1) $(DOC_MAN5) $(DOC_MAN7)
$(RM) $(OUTPUT)*.texi $(OUTPUT)*.texi+ $(OUTPUT)*.texi++
$(RM) $(OUTPUT)perf.info $(OUTPUT)perfman.info
$(RM) $(OUTPUT)howto-index.txt $(OUTPUT)howto/*.html $(OUTPUT)doc.dep
$(RM) $(OUTPUT)technical/api-*.html $(OUTPUT)technical/api-index.txt
$(RM) $(cmds_txt) $(OUTPUT)*.made
$(call QUIET_CLEAN, Documentation) $(RM) $(CLEAN_FILES)

$(MAN_HTML): $(OUTPUT)%.html : %.txt
$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
Expand Down Expand Up @@ -342,5 +341,3 @@ $(patsubst %.txt,%.html,$(wildcard howto/*.txt)): %.html : %.txt

#quick-install-html:
# '$(SHELL_PATH_SQ)' ./install-doc-quick.sh $(HTML_REF) $(DESTDIR)$(htmldir)

.PHONY: .FORCE-PERF-VERSION-FILE
13 changes: 13 additions & 0 deletions tools/perf/Documentation/perf-buildid-cache.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@ OPTIONS
-a::
--add=::
Add specified file to the cache.
-k::
--kcore::
Add specified kcore file to the cache. For the current host that is
/proc/kcore which requires root permissions to read. Be aware that
running 'perf buildid-cache' as root may update root's build-id cache
not the user's. Use the -v option to see where the file is created.
Note that the copied file contains only code sections not the whole core
image. Note also that files "kallsyms" and "modules" must also be in the
same directory and are also copied. All 3 files are created with read
permissions for root only. kcore will not be added if there is already a
kcore in the cache (with the same build-id) that has the same modules at
the same addresses. Use the -v option to see if a copy of kcore is
actually made.
-r::
--remove=::
Remove specified file from the cache.
Expand Down
4 changes: 3 additions & 1 deletion tools/perf/Documentation/perf-kvm.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ STAT LIVE OPTIONS

-m::
--mmap-pages=::
Number of mmap data pages. Must be a power of two.
Number of mmap data pages (must be a power of two) or size
specification with appended unit character - B/K/M/G. The
size is rounded up to have nearest pages power of two value.

-a::
--all-cpus::
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/Documentation/perf-lock.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ REPORT OPTIONS
-k::
--key=<value>::
Sorting key. Possible values: acquired (default), contended,
wait_total, wait_max, wait_min.
avg_wait, wait_total, wait_max, wait_min.

INFO OPTIONS
------------
Expand Down
4 changes: 3 additions & 1 deletion tools/perf/Documentation/perf-record.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ OPTIONS

-m::
--mmap-pages=::
Number of mmap data pages. Must be a power of two.
Number of mmap data pages (must be a power of two) or size
specification with appended unit character - B/K/M/G. The
size is rounded up to have nearest pages power of two value.

-g::
--call-graph::
Expand Down
15 changes: 14 additions & 1 deletion tools/perf/Documentation/perf-timechart.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ perf-timechart - Tool to visualize total system behavior during a workload
SYNOPSIS
--------
[verse]
'perf timechart' {record}
'perf timechart' record <command>
'perf timechart' [<options>]

DESCRIPTION
-----------
Expand Down Expand Up @@ -41,6 +42,18 @@ OPTIONS
--symfs=<directory>::
Look for files with symbols relative to this directory.

EXAMPLES
--------

$ perf timechart record git pull

[ perf record: Woken up 13 times to write data ]
[ perf record: Captured and wrote 4.253 MB perf.data (~185801 samples) ]

$ perf timechart

Written 10.2 seconds of trace to output.svg.

SEE ALSO
--------
linkperf:perf-record[1]
4 changes: 3 additions & 1 deletion tools/perf/Documentation/perf-top.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ Default is to monitor all CPUS.

-m <pages>::
--mmap-pages=<pages>::
Number of mmapped data pages.
Number of mmap data pages (must be a power of two) or size
specification with appended unit character - B/K/M/G. The
size is rounded up to have nearest pages power of two value.

-p <pid>::
--pid=<pid>::
Expand Down
27 changes: 23 additions & 4 deletions tools/perf/Documentation/perf-trace.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,22 @@ SYNOPSIS
--------
[verse]
'perf trace'
'perf trace record'

DESCRIPTION
-----------
This command will show the events associated with the target, initially
syscalls, but other system events like pagefaults, task lifetime events,
scheduling events, etc.

Initially this is a live mode only tool, but eventually will work with
perf.data files like the other tools, allowing a detached 'record' from
analysis phases.
This is a live mode tool in addition to working with perf.data files like
the other perf tools. Files can be generated using the 'perf record' command
but the session needs to include the raw_syscalls events (-e 'raw_syscalls:*').
Alernatively, the 'perf trace record' can be used as a shortcut to
automatically include the raw_syscalls events when writing events to a file.

The following options apply to perf trace; options to perf trace record are
found in the perf record man page.

OPTIONS
-------
Expand Down Expand Up @@ -59,7 +65,9 @@ OPTIONS

-m::
--mmap-pages=::
Number of mmap data pages. Must be a power of two.
Number of mmap data pages (must be a power of two) or size
specification with appended unit character - B/K/M/G. The
size is rounded up to have nearest pages power of two value.

-C::
--cpu::
Expand All @@ -78,6 +86,17 @@ the thread executes on the designated CPUs. Default is to monitor all CPUs.
--input
Process events from a given perf data file.

-T
--time
Print full timestamp rather time relative to first sample.

--comm::
Show process COMM right beside its ID, on by default, disable with --no-comm.

--summary::
Show a summary of syscalls by thread with min, max, and average times (in
msec) and relative stddev.

SEE ALSO
--------
linkperf:perf-record[1], linkperf:perf-script[1]
Loading

0 comments on commit 1ff9ecf

Please sign in to comment.