2009-04-20 21:52:29 +08:00
|
|
|
perf-top(1)
|
2008-04-16 04:39:31 +08:00
|
|
|
===========
|
2009-04-20 21:52:29 +08:00
|
|
|
|
|
|
|
NAME
|
|
|
|
----
|
2009-08-04 16:24:41 +08:00
|
|
|
perf-top - System profiling tool.
|
2009-04-20 21:52:29 +08:00
|
|
|
|
|
|
|
SYNOPSIS
|
|
|
|
--------
|
|
|
|
[verse]
|
2009-08-04 16:24:41 +08:00
|
|
|
'perf top' [-e <EVENT> | --event=EVENT] [<options>]
|
2009-04-20 21:52:29 +08:00
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
-----------
|
2010-12-01 09:57:21 +08:00
|
|
|
This command generates and displays a performance counter profile in real time.
|
2009-04-20 21:52:29 +08:00
|
|
|
|
|
|
|
|
|
|
|
OPTIONS
|
|
|
|
-------
|
2009-08-04 16:24:41 +08:00
|
|
|
-a::
|
|
|
|
--all-cpus::
|
|
|
|
System-wide collection. (default)
|
|
|
|
|
|
|
|
-c <count>::
|
|
|
|
--count=<count>::
|
|
|
|
Event period to sample.
|
|
|
|
|
2010-05-28 18:00:01 +08:00
|
|
|
-C <cpu-list>::
|
|
|
|
--cpu=<cpu>::
|
2010-12-01 09:57:21 +08: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 18:00:01 +08:00
|
|
|
Default is to monitor all CPUS.
|
2009-08-04 16:24:41 +08:00
|
|
|
|
|
|
|
-d <seconds>::
|
|
|
|
--delay=<seconds>::
|
|
|
|
Number of seconds to delay between refreshes.
|
2009-04-20 21:52:29 +08:00
|
|
|
|
2009-08-04 16:24:41 +08:00
|
|
|
-e <event>::
|
|
|
|
--event=<event>::
|
2009-06-06 20:56:33 +08: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 16:24:41 +08:00
|
|
|
hexadecimal event descriptor.
|
2009-04-20 21:52:29 +08:00
|
|
|
|
2009-08-04 16:24:41 +08: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 09:57:21 +08:00
|
|
|
--group::
|
|
|
|
Put the counters into a counter group.
|
|
|
|
|
2009-08-04 16:24:41 +08:00
|
|
|
-F <freq>::
|
|
|
|
--freq=<freq>::
|
|
|
|
Profile at this frequency.
|
|
|
|
|
|
|
|
-i::
|
|
|
|
--inherit::
|
2012-12-12 03:48:41 +08:00
|
|
|
Child tasks do not inherit counters.
|
2009-08-04 16:24:41 +08:00
|
|
|
|
|
|
|
-k <path>::
|
|
|
|
--vmlinux=<path>::
|
|
|
|
Path to vmlinux. Required for annotation functionality.
|
|
|
|
|
|
|
|
-m <pages>::
|
|
|
|
--mmap-pages=<pages>::
|
2013-09-01 18:36:13 +08:00
|
|
|
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.
|
2009-08-04 16:24:41 +08:00
|
|
|
|
|
|
|
-p <pid>::
|
|
|
|
--pid=<pid>::
|
2012-02-09 00:32:52 +08:00
|
|
|
Profile events on existing Process ID (comma separated list).
|
2010-12-01 09:57:21 +08:00
|
|
|
|
|
|
|
-t <tid>::
|
|
|
|
--tid=<tid>::
|
2012-02-09 00:32:52 +08:00
|
|
|
Profile events on existing thread ID (comma separated list).
|
2009-08-04 16:24:41 +08:00
|
|
|
|
2012-01-20 00:08:15 +08:00
|
|
|
-u::
|
|
|
|
--uid=::
|
|
|
|
Record events in threads owned by uid. Name or number.
|
|
|
|
|
2009-08-04 16:24:41 +08:00
|
|
|
-r <priority>::
|
|
|
|
--realtime=<priority>::
|
|
|
|
Collect data with this RT SCHED_FIFO priority.
|
|
|
|
|
|
|
|
--sym-annotate=<symbol>::
|
2010-02-04 02:52:08 +08:00
|
|
|
Annotate this symbol.
|
2009-08-04 16:24:41 +08:00
|
|
|
|
2010-12-01 09:57:21 +08: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 16:24:41 +08: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-06 06:16:15 +08:00
|
|
|
-s::
|
|
|
|
--sort::
|
2013-09-20 22:40:41 +08:00
|
|
|
Sort by key(s): pid, comm, dso, symbol, parent, srcline, weight,
|
2013-09-20 22:40:43 +08:00
|
|
|
local_weight, abort, in_tx, transaction
|
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-06 06:16:15 +08: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::
|
2014-02-07 11:06:07 +08:00
|
|
|
Only consider symbols in these dsos. This option will affect the
|
|
|
|
percentage of the overhead column. See --percentage for more info.
|
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-06 06:16:15 +08:00
|
|
|
|
|
|
|
--comms::
|
2014-02-07 11:06:07 +08:00
|
|
|
Only consider symbols in these comms. This option will affect the
|
|
|
|
percentage of the overhead column. See --percentage for more info.
|
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-06 06:16:15 +08:00
|
|
|
|
|
|
|
--symbols::
|
2014-02-07 11:06:07 +08:00
|
|
|
Only consider these symbols. This option will affect the
|
|
|
|
percentage of the overhead column. See --percentage for more info.
|
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-06 06:16:15 +08:00
|
|
|
|
2011-10-06 23:48:31 +08: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.
|
|
|
|
|
2013-11-15 11:51:30 +08:00
|
|
|
-g::
|
2013-10-26 22:25:34 +08:00
|
|
|
Enables call-graph (stack chain/backtrace) recording.
|
|
|
|
|
2011-10-06 06:30:22 +08:00
|
|
|
--call-graph::
|
2013-10-26 22:25:34 +08:00
|
|
|
Setup and enable call-graph (stack chain/backtrace) recording,
|
2013-11-15 11:51:30 +08:00
|
|
|
implies -g.
|
2011-10-06 06:30:22 +08:00
|
|
|
|
2013-10-18 22:38:49 +08:00
|
|
|
--max-stack::
|
|
|
|
Set the stack depth limit when parsing the callchain, anything
|
|
|
|
beyond the specified depth will be ignored. This is a trade-off
|
|
|
|
between information loss and faster processing especially for
|
|
|
|
workloads that can have a very long callchain stack.
|
|
|
|
|
|
|
|
Default: 127
|
|
|
|
|
2012-12-07 13:48:05 +08:00
|
|
|
--ignore-callees=<regex>::
|
|
|
|
Ignore callees of the function(s) matching the given regex.
|
|
|
|
This has the effect of collecting the callers of each such
|
|
|
|
function into one place in the call-graph tree.
|
|
|
|
|
2013-05-14 10:09:05 +08:00
|
|
|
--percent-limit::
|
|
|
|
Do not show entries which have an overhead under that percent.
|
|
|
|
(Default: 0).
|
|
|
|
|
2014-02-07 11:06:07 +08:00
|
|
|
--percentage::
|
|
|
|
Determine how to display the overhead percentage of filtered entries.
|
|
|
|
Filters can be applied by --comms, --dsos and/or --symbols options and
|
|
|
|
Zoom operations on the TUI (thread, dso, etc).
|
|
|
|
|
|
|
|
"relative" means it's relative to filtered entries only so that the
|
|
|
|
sum of shown entries will be always 100%. "absolute" means it retains
|
|
|
|
the original value before and after the filter is applied.
|
|
|
|
|
2009-08-04 16:24:41 +08: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 21:52:29 +08:00
|
|
|
|
|
|
|
|
|
|
|
SEE ALSO
|
|
|
|
--------
|
2009-06-06 20:56:33 +08:00
|
|
|
linkperf:perf-stat[1], linkperf:perf-list[1]
|