2009-05-26 09:17:18 +02:00
perf-report(1)
2009-05-30 12:38:51 +02:00
==============
2009-05-26 09:17:18 +02:00
NAME
----
2009-05-27 09:33:18 +02:00
perf-report - Read perf.data (created by perf record) and display the profile
2009-05-26 09:17:18 +02:00
SYNOPSIS
--------
[verse]
'perf report' [-i <file> | --input=file]
DESCRIPTION
-----------
This command displays the performance counter profile information recorded
2009-06-23 16:39:53 +02:00
via perf record.
2009-05-26 09:17:18 +02:00
OPTIONS
-------
-i::
--input=::
2009-05-27 09:33:18 +02:00
Input file name. (default: perf.data)
2010-11-30 19:57:17 -06:00
-v::
--verbose::
Be more verbose. (show symbol address, etc)
2009-06-30 19:01:20 -03:00
-d::
--dsos=::
Only consider symbols in these dsos. CSV that understands
file://filename entries.
2009-11-09 13:26:13 +02:00
-n::
--show-nr-samples::
2009-07-11 12:18:37 -03:00
Show the number of samples for each symbol
2010-11-30 19:57:17 -06:00
--showcpuutilization::
Show sample percentage for different cpu modes.
2009-11-09 13:26:13 +02:00
-T::
--threads::
2009-08-07 13:55:24 +02:00
Show per-thread event counters
2009-06-30 19:01:21 -03:00
-C::
--comms=::
Only consider symbols in these comms. CSV that understands
file://filename entries.
2009-06-30 19:01:22 -03:00
-S::
--symbols=::
Only consider these symbols. CSV that understands
file://filename entries.
2009-05-26 09:17:18 +02:00
2010-11-30 19:57:17 -06:00
-U::
--hide-unresolved::
Only display entries resolved to a symbol.
perf diff: Use perf_session__fprintf_hists just like 'perf record'
That means that almost everything you can do with 'perf report'
can be done with 'perf diff', for instance:
$ perf record -f find / > /dev/null
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.062 MB perf.data (~2699
samples) ] $ perf record -f find / > /dev/null
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.062 MB perf.data (~2687
samples) ] perf diff | head -8
9.02% +1.00% find libc-2.10.1.so [.] _IO_vfprintf_internal
2.91% -1.00% find [kernel] [k] __kmalloc
2.85% -1.00% find [kernel] [k] ext4_htree_store_dirent
1.99% -1.00% find [kernel] [k] _atomic_dec_and_lock
2.44% find [kernel] [k] half_md4_transform
$
So if you want to zoom into libc:
$ perf diff --dsos libc-2.10.1.so | head -8
37.34% find [.] _IO_vfprintf_internal
10.34% find [.] __GI_memmove
8.25% +2.00% find [.] _int_malloc
5.07% -1.00% find [.] __GI_mempcpy
7.62% +2.00% find [.] _int_free
$
And if there were multiple commands using libc, it is also
possible to aggregate them all by using --sort symbol:
$ perf diff --dsos libc-2.10.1.so --sort symbol | head -8
37.34% [.] _IO_vfprintf_internal
10.34% [.] __GI_memmove
8.25% +2.00% [.] _int_malloc
5.07% -1.00% [.] __GI_mempcpy
7.62% +2.00% [.] _int_free
$
The displacement column now is off by default, to use it:
perf diff -m --dsos libc-2.10.1.so --sort symbol | head -8
37.34% [.] _IO_vfprintf_internal
10.34% [.] __GI_memmove
8.25% +2.00% [.] _int_malloc
5.07% -1.00% +2 [.] __GI_mempcpy
7.62% +2.00% -1 [.] _int_free
$
Using -t/--field-separator can be used for scripting:
$ perf diff -t, -m --dsos libc-2.10.1.so --sort symbol | head -8
37.34, , ,[.] _IO_vfprintf_internal
10.34, , ,[.] __GI_memmove
8.25,+2.00%, ,[.] _int_malloc
5.07,-1.00%, +2,[.] __GI_mempcpy
7.62,+2.00%, -1,[.] _int_free
6.99,+1.00%, -1,[.] _IO_new_file_xsputn
1.89,-2.00%, +4,[.] __readdir64
$
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1260978567-550-1-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-12-16 13:49:27 -02:00
-s::
--sort=::
Sort by key(s): pid, comm, dso, symbol, parent.
2010-11-30 19:57:17 -06:00
-p::
--parent=<regex>::
regex filter to identify parent, see: '--sort parent'
-x::
--exclude-other::
Only display entries with parent-match.
2009-07-10 22:47:28 -03:00
-w::
2010-11-30 19:57:17 -06:00
--column-widths=<width[,width...]>::
2009-07-10 22:47:28 -03:00
Force each column width to the provided list, for large terminal
readability.
-t::
--field-separator=::
Use a special separator character and don't pad with spaces, replacing
2010-11-30 19:57:17 -06:00
all occurrences of this separator in symbol names (and other output)
2009-07-10 22:47:28 -03:00
with a '.' character, that thus it's the only non valid separator.
2010-11-30 19:57:17 -06:00
-D::
--dump-raw-trace::
Dump raw trace in ASCII.
2009-08-31 03:32:03 +02:00
-g [type,min]::
--call-graph::
2010-11-30 19:57:17 -06:00
Display call chains using type and min percent threshold.
2009-08-31 03:32:03 +02:00
type can be either:
2010-11-30 19:57:17 -06:00
- flat: single column, linear exposure of call chains.
2009-08-31 03:32:03 +02:00
- graph: use a graph tree, displaying absolute overhead rates.
- fractal: like graph, but displays relative rates. Each branch of
the tree is considered as a new profiled object. +
Default: fractal,0.5.
2010-11-30 19:57:17 -06:00
--pretty=<key>::
Pretty printing style. key: normal, raw
2010-08-21 10:38:16 -03:00
--stdio:: Use the stdio interface.
--tui:: Use the TUI interface, that is integrated with annotate and allows
zooming into DSOs or threads, among other features. Use of --tui
requires a tty, if one is not present, as when piping to other
commands, the stdio interface is used.
2010-11-30 19:57:17 -06:00
-k::
--vmlinux=<file>::
vmlinux pathname
-m::
--modules::
Load module symbols. WARNING: This should only be used with -k and
a LIVE kernel.
-f::
--force::
Don't complain, do it.
2009-05-26 09:17:18 +02:00
SEE ALSO
--------
linkperf:perf-stat[1]