2009-04-20 13:52:29 +00:00
|
|
|
perf-top(1)
|
2008-04-15 20:39:31 +00:00
|
|
|
===========
|
2009-04-20 13:52:29 +00:00
|
|
|
|
|
|
|
NAME
|
|
|
|
----
|
2009-08-04 08:24:41 +00:00
|
|
|
perf-top - System profiling tool.
|
2009-04-20 13:52:29 +00:00
|
|
|
|
|
|
|
SYNOPSIS
|
|
|
|
--------
|
|
|
|
[verse]
|
2009-08-04 08:24:41 +00:00
|
|
|
'perf top' [-e <EVENT> | --event=EVENT] [<options>]
|
2009-04-20 13:52:29 +00:00
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
-----------
|
2010-12-01 01:57:21 +00:00
|
|
|
This command generates and displays a performance counter profile in real time.
|
2009-04-20 13:52:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
OPTIONS
|
|
|
|
-------
|
2009-08-04 08:24:41 +00:00
|
|
|
-a::
|
|
|
|
--all-cpus::
|
|
|
|
System-wide collection. (default)
|
|
|
|
|
|
|
|
-c <count>::
|
|
|
|
--count=<count>::
|
|
|
|
Event period to sample.
|
|
|
|
|
2010-05-28 10:00:01 +00:00
|
|
|
-C <cpu-list>::
|
|
|
|
--cpu=<cpu>::
|
2010-12-01 01:57:21 +00:00
|
|
|
Monitor only on the list of CPUs provided. Multiple CPUs can be provided as a
|
|
|
|
comma-separated list with no space: 0,1. Ranges of CPUs are specified with -: 0-2.
|
2010-05-28 10:00:01 +00:00
|
|
|
Default is to monitor all CPUS.
|
2009-08-04 08:24:41 +00:00
|
|
|
|
|
|
|
-d <seconds>::
|
|
|
|
--delay=<seconds>::
|
|
|
|
Number of seconds to delay between refreshes.
|
2009-04-20 13:52:29 +00:00
|
|
|
|
2009-08-04 08:24:41 +00:00
|
|
|
-e <event>::
|
|
|
|
--event=<event>::
|
2009-06-06 12:56:33 +00:00
|
|
|
Select the PMU event. Selection can be a symbolic event name
|
|
|
|
(use 'perf list' to list all events) or a raw PMU
|
|
|
|
event (eventsel+umask) in the form of rNNN where NNN is a
|
2009-08-04 08:24:41 +00:00
|
|
|
hexadecimal event descriptor.
|
2009-04-20 13:52:29 +00:00
|
|
|
|
2009-08-04 08:24:41 +00:00
|
|
|
-E <entries>::
|
|
|
|
--entries=<entries>::
|
|
|
|
Display this many functions.
|
|
|
|
|
|
|
|
-f <count>::
|
|
|
|
--count-filter=<count>::
|
|
|
|
Only display functions with more events than this.
|
|
|
|
|
2010-12-01 01:57:21 +00:00
|
|
|
-g::
|
|
|
|
--group::
|
|
|
|
Put the counters into a counter group.
|
|
|
|
|
2009-08-04 08:24:41 +00:00
|
|
|
-F <freq>::
|
|
|
|
--freq=<freq>::
|
|
|
|
Profile at this frequency.
|
|
|
|
|
|
|
|
-i::
|
|
|
|
--inherit::
|
2012-12-11 19:48:41 +00:00
|
|
|
Child tasks do not inherit counters.
|
2009-08-04 08:24:41 +00:00
|
|
|
|
|
|
|
-k <path>::
|
|
|
|
--vmlinux=<path>::
|
|
|
|
Path to vmlinux. Required for annotation functionality.
|
|
|
|
|
|
|
|
-m <pages>::
|
|
|
|
--mmap-pages=<pages>::
|
|
|
|
Number of mmapped data pages.
|
|
|
|
|
|
|
|
-p <pid>::
|
|
|
|
--pid=<pid>::
|
2012-02-08 16:32:52 +00:00
|
|
|
Profile events on existing Process ID (comma separated list).
|
2010-12-01 01:57:21 +00:00
|
|
|
|
|
|
|
-t <tid>::
|
|
|
|
--tid=<tid>::
|
2012-02-08 16:32:52 +00:00
|
|
|
Profile events on existing thread ID (comma separated list).
|
2009-08-04 08:24:41 +00:00
|
|
|
|
2012-01-19 16:08:15 +00:00
|
|
|
-u::
|
|
|
|
--uid=::
|
|
|
|
Record events in threads owned by uid. Name or number.
|
|
|
|
|
2009-08-04 08:24:41 +00:00
|
|
|
-r <priority>::
|
|
|
|
--realtime=<priority>::
|
|
|
|
Collect data with this RT SCHED_FIFO priority.
|
|
|
|
|
|
|
|
-s <symbol>::
|
|
|
|
--sym-annotate=<symbol>::
|
2010-02-03 18:52:08 +00:00
|
|
|
Annotate this symbol.
|
2009-08-04 08:24:41 +00:00
|
|
|
|
2010-12-01 01:57:21 +00:00
|
|
|
-K::
|
|
|
|
--hide_kernel_symbols::
|
|
|
|
Hide kernel symbols.
|
|
|
|
|
|
|
|
-U::
|
|
|
|
--hide_user_symbols::
|
|
|
|
Hide user symbols.
|
|
|
|
|
|
|
|
-D::
|
|
|
|
--dump-symtab::
|
|
|
|
Dump the symbol table used for profiling.
|
|
|
|
|
2009-08-04 08:24:41 +00:00
|
|
|
-v::
|
|
|
|
--verbose::
|
|
|
|
Be more verbose (show counter open errors, etc).
|
|
|
|
|
|
|
|
-z::
|
|
|
|
--zero::
|
|
|
|
Zero history across display updates.
|
|
|
|
|
perf top: Reuse the 'report' hist_entry/hists classes
This actually fixes several problems we had in the old 'perf top':
1. Unresolved symbols not show, limitation that came from the old
"KernelTop" codebase, to solve it we would need to do changes
that would make sym_entry have most of the hist_entry fields.
2. It was using the number of samples, not the sum of sample->period.
And brings the --sort code that allows us to have all the views in
'perf report', for instance:
[root@emilia ~]# perf top --sort dso
PerfTop: 5903 irqs/sec kernel:77.5% exact: 0.0% [1000Hz cycles], (all, 8 CPUs)
------------------------------------------------------------------------------
31.59% libcrypto.so.1.0.0
21.55% [kernel]
18.57% libpython2.6.so.1.0
7.04% libc-2.12.so
6.99% _backend_agg.so
4.72% sshd
1.48% multiarray.so
1.39% libfreetype.so.6.3.22
1.37% perf
0.71% libgobject-2.0.so.0.2200.5
0.53% [tg3]
0.48% libglib-2.0.so.0.2200.5
0.44% libstdc++.so.6.0.13
0.40% libcairo.so.2.10800.8
0.38% libm-2.12.so
0.34% umath.so
0.30% libgdk-x11-2.0.so.0.1800.9
0.22% libpthread-2.12.so
0.20% libgtk-x11-2.0.so.0.1800.9
0.20% librt-2.12.so
0.15% _path.so
0.13% libpango-1.0.so.0.2800.1
0.11% libatlas.so.3.0
0.09% ft2font.so
0.09% libpangoft2-1.0.so.0.2800.1
0.08% libX11.so.6.3.0
0.07% [vdso]
0.06% cyclictest
^C
All the filter lists can be used as well: --dsos, --comms, --symbols,
etc.
The 'perf report' TUI is also reused, being possible to apply all the
zoom operations, do annotation, etc.
This change will allow multiple simplifications in the symbol system as
well, that will be detailed in upcoming changesets.
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-xzaaldxq7zhqrrxdxjifk1mh@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2011-10-05 22:16:15 +00:00
|
|
|
-s::
|
|
|
|
--sort::
|
2013-01-24 15:10:29 +00:00
|
|
|
Sort by key(s): pid, comm, dso, symbol, parent, srcline, weight, local_weight.
|
perf top: Reuse the 'report' hist_entry/hists classes
This actually fixes several problems we had in the old 'perf top':
1. Unresolved symbols not show, limitation that came from the old
"KernelTop" codebase, to solve it we would need to do changes
that would make sym_entry have most of the hist_entry fields.
2. It was using the number of samples, not the sum of sample->period.
And brings the --sort code that allows us to have all the views in
'perf report', for instance:
[root@emilia ~]# perf top --sort dso
PerfTop: 5903 irqs/sec kernel:77.5% exact: 0.0% [1000Hz cycles], (all, 8 CPUs)
------------------------------------------------------------------------------
31.59% libcrypto.so.1.0.0
21.55% [kernel]
18.57% libpython2.6.so.1.0
7.04% libc-2.12.so
6.99% _backend_agg.so
4.72% sshd
1.48% multiarray.so
1.39% libfreetype.so.6.3.22
1.37% perf
0.71% libgobject-2.0.so.0.2200.5
0.53% [tg3]
0.48% libglib-2.0.so.0.2200.5
0.44% libstdc++.so.6.0.13
0.40% libcairo.so.2.10800.8
0.38% libm-2.12.so
0.34% umath.so
0.30% libgdk-x11-2.0.so.0.1800.9
0.22% libpthread-2.12.so
0.20% libgtk-x11-2.0.so.0.1800.9
0.20% librt-2.12.so
0.15% _path.so
0.13% libpango-1.0.so.0.2800.1
0.11% libatlas.so.3.0
0.09% ft2font.so
0.09% libpangoft2-1.0.so.0.2800.1
0.08% libX11.so.6.3.0
0.07% [vdso]
0.06% cyclictest
^C
All the filter lists can be used as well: --dsos, --comms, --symbols,
etc.
The 'perf report' TUI is also reused, being possible to apply all the
zoom operations, do annotation, etc.
This change will allow multiple simplifications in the symbol system as
well, that will be detailed in upcoming changesets.
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-xzaaldxq7zhqrrxdxjifk1mh@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2011-10-05 22:16:15 +00:00
|
|
|
|
|
|
|
-n::
|
|
|
|
--show-nr-samples::
|
|
|
|
Show a column with the number of samples.
|
|
|
|
|
|
|
|
--show-total-period::
|
|
|
|
Show a column with the sum of periods.
|
|
|
|
|
|
|
|
--dsos::
|
|
|
|
Only consider symbols in these dsos.
|
|
|
|
|
|
|
|
--comms::
|
|
|
|
Only consider symbols in these comms.
|
|
|
|
|
|
|
|
--symbols::
|
|
|
|
Only consider these symbols.
|
|
|
|
|
2011-10-06 15:48:31 +00:00
|
|
|
-M::
|
|
|
|
--disassembler-style=:: Set disassembler style for objdump.
|
|
|
|
|
|
|
|
--source::
|
|
|
|
Interleave source code with assembly code. Enabled by default,
|
|
|
|
disable with --no-source.
|
|
|
|
|
|
|
|
--asm-raw::
|
|
|
|
Show raw instruction encoding of assembly instructions.
|
|
|
|
|
2011-10-05 22:30:22 +00:00
|
|
|
-G [type,min,order]::
|
|
|
|
--call-graph::
|
|
|
|
Display call chains using type, min percent threshold and order.
|
|
|
|
type can be either:
|
|
|
|
- flat: single column, linear exposure of call chains.
|
|
|
|
- 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.
|
|
|
|
|
|
|
|
order can be either:
|
|
|
|
- callee: callee based call graph.
|
|
|
|
- caller: inverted caller based call graph.
|
|
|
|
|
|
|
|
Default: fractal,0.5,callee.
|
|
|
|
|
2009-08-04 08:24:41 +00:00
|
|
|
INTERACTIVE PROMPTING KEYS
|
|
|
|
--------------------------
|
|
|
|
|
|
|
|
[d]::
|
|
|
|
Display refresh delay.
|
|
|
|
|
|
|
|
[e]::
|
|
|
|
Number of entries to display.
|
|
|
|
|
|
|
|
[E]::
|
|
|
|
Event to display when multiple counters are active.
|
|
|
|
|
|
|
|
[f]::
|
|
|
|
Profile display filter (>= hit count).
|
|
|
|
|
|
|
|
[F]::
|
|
|
|
Annotation display filter (>= % of total).
|
|
|
|
|
|
|
|
[s]::
|
|
|
|
Annotate symbol.
|
|
|
|
|
|
|
|
[S]::
|
|
|
|
Stop annotation, return to full profile display.
|
|
|
|
|
|
|
|
[z]::
|
|
|
|
Toggle event count zeroing across display updates.
|
|
|
|
|
|
|
|
[qQ]::
|
|
|
|
Quit.
|
|
|
|
|
|
|
|
Pressing any unmapped key displays a menu, and prompts for input.
|
2009-04-20 13:52:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
SEE ALSO
|
|
|
|
--------
|
2009-06-06 12:56:33 +00:00
|
|
|
linkperf:perf-stat[1], linkperf:perf-list[1]
|