perf-report.txt 6.0 KB
Newer Older
I
Ingo Molnar 已提交
1
perf-report(1)
2
==============
I
Ingo Molnar 已提交
3 4 5

NAME
----
6
perf-report - Read perf.data (created by perf record) and display the profile
I
Ingo Molnar 已提交
7 8 9 10 11 12 13 14 15

SYNOPSIS
--------
[verse]
'perf report' [-i <file> | --input=file]

DESCRIPTION
-----------
This command displays the performance counter profile information recorded
I
Ingo Molnar 已提交
16
via perf record.
I
Ingo Molnar 已提交
17 18 19 20 21

OPTIONS
-------
-i::
--input=::
22
        Input file name. (default: perf.data unless stdin is a fifo)
23 24 25 26 27

-v::
--verbose::
        Be more verbose. (show symbol address, etc)

28 29 30 31
-d::
--dsos=::
	Only consider symbols in these dsos. CSV that understands
	file://filename entries.
32 33
-n::
--show-nr-samples::
34
	Show the number of samples for each symbol
35 36 37 38

--showcpuutilization::
        Show sample percentage for different cpu modes.

39 40
-T::
--threads::
41
	Show per-thread event counters
42
-c::
43 44 45
--comms=::
	Only consider symbols in these comms. CSV that understands
	file://filename entries.
46 47 48 49
-S::
--symbols=::
	Only consider these symbols. CSV that understands
	file://filename entries.
I
Ingo Molnar 已提交
50

51 52 53
--symbol-filter=::
	Only show symbols that match (partially) with this filter.

54 55 56 57
-U::
--hide-unresolved::
        Only display entries resolved to a symbol.

58 59
-s::
--sort=::
60 61
	Sort histogram entries by given key(s) - multiple keys can be specified
	in CSV format.  Following sort keys are available:
62
	pid, comm, dso, symbol, parent, cpu, srcline, weight, local_weight.
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90

	Each key has following meaning:

	- comm: command (name) of the task which can be read via /proc/<pid>/comm
	- pid: command and tid of the task
	- dso: name of library or module executed at the time of sample
	- symbol: name of function executed at the time of sample
	- parent: name of function matched to the parent regex filter. Unmatched
	entries are displayed as "[other]".
	- cpu: cpu number the task ran at the time of sample
	- srcline: filename and line number executed at the time of sample.  The
	DWARF debuggin info must be provided.

	By default, comm, dso and symbol keys are used.
	(i.e. --sort comm,dso,symbol)

	If --branch-stack option is used, following sort keys are also
	available:
	dso_from, dso_to, symbol_from, symbol_to, mispredict.

	- dso_from: name of library or module branched from
	- dso_to: name of library or module branched to
	- symbol_from: name of function branched from
	- symbol_to: name of function branched to
	- mispredict: "N" for predicted branch, "Y" for mispredicted branch

	And default sort keys are changed to comm, dso_from, symbol_from, dso_to
	and symbol_to, see '--branch-stack'.
91

92 93
-p::
--parent=<regex>::
94 95 96 97
        A regex filter to identify parent. The parent is a caller of this
	function and searched through the callchain, thus it requires callchain
	information recorded. The pattern is in the exteneded regex format and
	defaults to "\^sys_|^do_page_fault", see '--sort parent'.
98 99 100 101 102

-x::
--exclude-other::
        Only display entries with parent-match.

103
-w::
104
--column-widths=<width[,width...]>::
105 106 107 108 109 110
	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
111
	all occurrences of this separator in symbol names (and other output)
112 113
	with a '.' character, that thus it's the only non valid separator.

114 115 116 117
-D::
--dump-raw-trace::
        Dump raw trace in ASCII.

118
-g [type,min[,limit],order]::
119
--call-graph::
120 121
        Display call chains using type, min percent threshold, optional print
	limit and order.
122
	type can be either:
123
	- flat: single column, linear exposure of call chains.
124 125 126
	- 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. +
127 128 129 130 131 132 133 134 135 136

	order can be either:
	- callee: callee based call graph.
	- caller: inverted caller based call graph.

	Default: fractal,0.5,callee.

-G::
--inverted::
        alias for inverted caller based call graph.
137

138 139 140
--pretty=<key>::
        Pretty printing style.  key: normal, raw

141 142 143 144 145 146 147
--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.

148 149
--gtk:: Use the GTK2 interface.

150 151 152 153
-k::
--vmlinux=<file>::
        vmlinux pathname

154 155 156
--kallsyms=<file>::
        kallsyms pathname

157 158 159 160 161 162 163 164 165
-m::
--modules::
        Load module symbols. WARNING: This should only be used with -k and
        a LIVE kernel.

-f::
--force::
        Don't complain, do it.

166 167 168
--symfs=<directory>::
        Look for files with symbols relative to this directory.

169
-C::
170 171 172 173 174
--cpu:: Only report samples for 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. Default is to report samples on all
	CPUs.

175 176 177
-M::
--disassembler-style=:: Set disassembler style for objdump.

178 179 180 181 182 183 184
--source::
	Interleave source code with assembly code. Enabled by default,
	disable with --no-source.

--asm-raw::
	Show raw instruction encoding of assembly instructions.

185 186
--show-total-period:: Show a column with the sum of periods.

187 188 189 190 191 192
-I::
--show-info::
	Display extended information about the perf.data file. This adds
	information which may be very large and thus may clutter the display.
	It currently includes: cpu and numa topology of the host system.

193 194 195 196
-b::
--branch-stack::
	Use the addresses of sampled taken branches instead of the instruction
	address to build the histograms. To generate meaningful output, the
197 198 199 200 201
	perf.data file must have been obtained using perf record -b or
	perf record --branch-filter xxx where xxx is a branch filter option.
	perf report is able to auto-detect whether a perf.data file contains
	branch stacks and it will automatically switch to the branch view mode,
	unless --no-branch-stack is used.
202

203 204 205
--objdump=<path>::
        Path to objdump binary.

N
Namhyung Kim 已提交
206 207 208
--group::
	Show event group information together.

209 210 211 212
--demangle::
	Demangle symbol names to human readable form. It's enabled by default,
	disable with --no-demangle.

I
Ingo Molnar 已提交
213 214
SEE ALSO
--------
215
linkperf:perf-stat[1], linkperf:perf-annotate[1]