perf-report.txt 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  1. perf-report(1)
  2. ==============
  3. NAME
  4. ----
  5. perf-report - Read perf.data (created by perf record) and display the profile
  6. SYNOPSIS
  7. --------
  8. [verse]
  9. 'perf report' [-i <file> | --input=file]
  10. DESCRIPTION
  11. -----------
  12. This command displays the performance counter profile information recorded
  13. via perf record.
  14. OPTIONS
  15. -------
  16. -i::
  17. --input=::
  18. Input file name. (default: perf.data unless stdin is a fifo)
  19. -v::
  20. --verbose::
  21. Be more verbose. (show symbol address, etc)
  22. -n::
  23. --show-nr-samples::
  24. Show the number of samples for each symbol
  25. --showcpuutilization::
  26. Show sample percentage for different cpu modes.
  27. -T::
  28. --threads::
  29. Show per-thread event counters
  30. -c::
  31. --comms=::
  32. Only consider symbols in these comms. CSV that understands
  33. file://filename entries. This option will affect the percentage of
  34. the overhead column. See --percentage for more info.
  35. -d::
  36. --dsos=::
  37. Only consider symbols in these dsos. CSV that understands
  38. file://filename entries. This option will affect the percentage of
  39. the overhead column. See --percentage for more info.
  40. -S::
  41. --symbols=::
  42. Only consider these symbols. CSV that understands
  43. file://filename entries. This option will affect the percentage of
  44. the overhead column. See --percentage for more info.
  45. --symbol-filter=::
  46. Only show symbols that match (partially) with this filter.
  47. -U::
  48. --hide-unresolved::
  49. Only display entries resolved to a symbol.
  50. -s::
  51. --sort=::
  52. Sort histogram entries by given key(s) - multiple keys can be specified
  53. in CSV format. Following sort keys are available:
  54. pid, comm, dso, symbol, parent, cpu, srcline, weight, local_weight.
  55. Each key has following meaning:
  56. - comm: command (name) of the task which can be read via /proc/<pid>/comm
  57. - pid: command and tid of the task
  58. - dso: name of library or module executed at the time of sample
  59. - symbol: name of function executed at the time of sample
  60. - parent: name of function matched to the parent regex filter. Unmatched
  61. entries are displayed as "[other]".
  62. - cpu: cpu number the task ran at the time of sample
  63. - srcline: filename and line number executed at the time of sample. The
  64. DWARF debugging info must be provided.
  65. - weight: Event specific weight, e.g. memory latency or transaction
  66. abort cost. This is the global weight.
  67. - local_weight: Local weight version of the weight above.
  68. - transaction: Transaction abort flags.
  69. - overhead: Overhead percentage of sample
  70. - overhead_sys: Overhead percentage of sample running in system mode
  71. - overhead_us: Overhead percentage of sample running in user mode
  72. - overhead_guest_sys: Overhead percentage of sample running in system mode
  73. on guest machine
  74. - overhead_guest_us: Overhead percentage of sample running in user mode on
  75. guest machine
  76. - sample: Number of sample
  77. - period: Raw number of event count of sample
  78. By default, comm, dso and symbol keys are used.
  79. (i.e. --sort comm,dso,symbol)
  80. If --branch-stack option is used, following sort keys are also
  81. available:
  82. dso_from, dso_to, symbol_from, symbol_to, mispredict.
  83. - dso_from: name of library or module branched from
  84. - dso_to: name of library or module branched to
  85. - symbol_from: name of function branched from
  86. - symbol_to: name of function branched to
  87. - mispredict: "N" for predicted branch, "Y" for mispredicted branch
  88. - in_tx: branch in TSX transaction
  89. - abort: TSX transaction abort.
  90. And default sort keys are changed to comm, dso_from, symbol_from, dso_to
  91. and symbol_to, see '--branch-stack'.
  92. -F::
  93. --fields=::
  94. Specify output field - multiple keys can be specified in CSV format.
  95. Following fields are available:
  96. overhead, overhead_sys, overhead_us, overhead_children, sample and period.
  97. Also it can contain any sort key(s).
  98. By default, every sort keys not specified in -F will be appended
  99. automatically.
  100. If --mem-mode option is used, following sort keys are also available
  101. (incompatible with --branch-stack):
  102. symbol_daddr, dso_daddr, locked, tlb, mem, snoop, dcacheline.
  103. - symbol_daddr: name of data symbol being executed on at the time of sample
  104. - dso_daddr: name of library or module containing the data being executed
  105. on at the time of sample
  106. - locked: whether the bus was locked at the time of sample
  107. - tlb: type of tlb access for the data at the time of sample
  108. - mem: type of memory access for the data at the time of sample
  109. - snoop: type of snoop (if any) for the data at the time of sample
  110. - dcacheline: the cacheline the data address is on at the time of sample
  111. And default sort keys are changed to local_weight, mem, sym, dso,
  112. symbol_daddr, dso_daddr, snoop, tlb, locked, see '--mem-mode'.
  113. -p::
  114. --parent=<regex>::
  115. A regex filter to identify parent. The parent is a caller of this
  116. function and searched through the callchain, thus it requires callchain
  117. information recorded. The pattern is in the exteneded regex format and
  118. defaults to "\^sys_|^do_page_fault", see '--sort parent'.
  119. -x::
  120. --exclude-other::
  121. Only display entries with parent-match.
  122. -w::
  123. --column-widths=<width[,width...]>::
  124. Force each column width to the provided list, for large terminal
  125. readability. 0 means no limit (default behavior).
  126. -t::
  127. --field-separator=::
  128. Use a special separator character and don't pad with spaces, replacing
  129. all occurrences of this separator in symbol names (and other output)
  130. with a '.' character, that thus it's the only non valid separator.
  131. -D::
  132. --dump-raw-trace::
  133. Dump raw trace in ASCII.
  134. -g [type,min[,limit],order[,key]]::
  135. --call-graph::
  136. Display call chains using type, min percent threshold, optional print
  137. limit and order.
  138. type can be either:
  139. - flat: single column, linear exposure of call chains.
  140. - graph: use a graph tree, displaying absolute overhead rates.
  141. - fractal: like graph, but displays relative rates. Each branch of
  142. the tree is considered as a new profiled object. +
  143. order can be either:
  144. - callee: callee based call graph.
  145. - caller: inverted caller based call graph.
  146. key can be:
  147. - function: compare on functions
  148. - address: compare on individual code addresses
  149. Default: fractal,0.5,callee,function.
  150. --children::
  151. Accumulate callchain of children to parent entry so that then can
  152. show up in the output. The output will have a new "Children" column
  153. and will be sorted on the data. It requires callchains are recorded.
  154. --max-stack::
  155. Set the stack depth limit when parsing the callchain, anything
  156. beyond the specified depth will be ignored. This is a trade-off
  157. between information loss and faster processing especially for
  158. workloads that can have a very long callchain stack.
  159. Default: 127
  160. -G::
  161. --inverted::
  162. alias for inverted caller based call graph.
  163. --ignore-callees=<regex>::
  164. Ignore callees of the function(s) matching the given regex.
  165. This has the effect of collecting the callers of each such
  166. function into one place in the call-graph tree.
  167. --pretty=<key>::
  168. Pretty printing style. key: normal, raw
  169. --stdio:: Use the stdio interface.
  170. --tui:: Use the TUI interface, that is integrated with annotate and allows
  171. zooming into DSOs or threads, among other features. Use of --tui
  172. requires a tty, if one is not present, as when piping to other
  173. commands, the stdio interface is used.
  174. --gtk:: Use the GTK2 interface.
  175. -k::
  176. --vmlinux=<file>::
  177. vmlinux pathname
  178. --kallsyms=<file>::
  179. kallsyms pathname
  180. -m::
  181. --modules::
  182. Load module symbols. WARNING: This should only be used with -k and
  183. a LIVE kernel.
  184. -f::
  185. --force::
  186. Don't complain, do it.
  187. --symfs=<directory>::
  188. Look for files with symbols relative to this directory.
  189. -C::
  190. --cpu:: Only report samples for the list of CPUs provided. Multiple CPUs can
  191. be provided as a comma-separated list with no space: 0,1. Ranges of
  192. CPUs are specified with -: 0-2. Default is to report samples on all
  193. CPUs.
  194. -M::
  195. --disassembler-style=:: Set disassembler style for objdump.
  196. --source::
  197. Interleave source code with assembly code. Enabled by default,
  198. disable with --no-source.
  199. --asm-raw::
  200. Show raw instruction encoding of assembly instructions.
  201. --show-total-period:: Show a column with the sum of periods.
  202. -I::
  203. --show-info::
  204. Display extended information about the perf.data file. This adds
  205. information which may be very large and thus may clutter the display.
  206. It currently includes: cpu and numa topology of the host system.
  207. -b::
  208. --branch-stack::
  209. Use the addresses of sampled taken branches instead of the instruction
  210. address to build the histograms. To generate meaningful output, the
  211. perf.data file must have been obtained using perf record -b or
  212. perf record --branch-filter xxx where xxx is a branch filter option.
  213. perf report is able to auto-detect whether a perf.data file contains
  214. branch stacks and it will automatically switch to the branch view mode,
  215. unless --no-branch-stack is used.
  216. --objdump=<path>::
  217. Path to objdump binary.
  218. --group::
  219. Show event group information together.
  220. --demangle::
  221. Demangle symbol names to human readable form. It's enabled by default,
  222. disable with --no-demangle.
  223. --demangle-kernel::
  224. Demangle kernel symbol names to human readable form (for C++ kernels).
  225. --mem-mode::
  226. Use the data addresses of samples in addition to instruction addresses
  227. to build the histograms. To generate meaningful output, the perf.data
  228. file must have been obtained using perf record -d -W and using a
  229. special event -e cpu/mem-loads/ or -e cpu/mem-stores/. See
  230. 'perf mem' for simpler access.
  231. --percent-limit::
  232. Do not show entries which have an overhead under that percent.
  233. (Default: 0).
  234. --percentage::
  235. Determine how to display the overhead percentage of filtered entries.
  236. Filters can be applied by --comms, --dsos and/or --symbols options and
  237. Zoom operations on the TUI (thread, dso, etc).
  238. "relative" means it's relative to filtered entries only so that the
  239. sum of shown entries will be always 100%. "absolute" means it retains
  240. the original value before and after the filter is applied.
  241. --header::
  242. Show header information in the perf.data file. This includes
  243. various information like hostname, OS and perf version, cpu/mem
  244. info, perf command line, event list and so on. Currently only
  245. --stdio output supports this feature.
  246. --header-only::
  247. Show only perf.data header (forces --stdio).
  248. SEE ALSO
  249. --------
  250. linkperf:perf-stat[1], linkperf:perf-annotate[1]