perf-report.txt 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  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. -d::
  23. --dsos=::
  24. Only consider symbols in these dsos. CSV that understands
  25. file://filename entries.
  26. -n::
  27. --show-nr-samples::
  28. Show the number of samples for each symbol
  29. --showcpuutilization::
  30. Show sample percentage for different cpu modes.
  31. -T::
  32. --threads::
  33. Show per-thread event counters
  34. -c::
  35. --comms=::
  36. Only consider symbols in these comms. CSV that understands
  37. file://filename entries.
  38. -S::
  39. --symbols=::
  40. Only consider these symbols. CSV that understands
  41. file://filename entries.
  42. --symbol-filter=::
  43. Only show symbols that match (partially) with this filter.
  44. -U::
  45. --hide-unresolved::
  46. Only display entries resolved to a symbol.
  47. -s::
  48. --sort=::
  49. Sort histogram entries by given key(s) - multiple keys can be specified
  50. in CSV format. Following sort keys are available:
  51. pid, comm, dso, symbol, parent, cpu, srcline.
  52. Each key has following meaning:
  53. - comm: command (name) of the task which can be read via /proc/<pid>/comm
  54. - pid: command and tid of the task
  55. - dso: name of library or module executed at the time of sample
  56. - symbol: name of function executed at the time of sample
  57. - parent: name of function matched to the parent regex filter. Unmatched
  58. entries are displayed as "[other]".
  59. - cpu: cpu number the task ran at the time of sample
  60. - srcline: filename and line number executed at the time of sample. The
  61. DWARF debuggin info must be provided.
  62. By default, comm, dso and symbol keys are used.
  63. (i.e. --sort comm,dso,symbol)
  64. If --branch-stack option is used, following sort keys are also
  65. available:
  66. dso_from, dso_to, symbol_from, symbol_to, mispredict.
  67. - dso_from: name of library or module branched from
  68. - dso_to: name of library or module branched to
  69. - symbol_from: name of function branched from
  70. - symbol_to: name of function branched to
  71. - mispredict: "N" for predicted branch, "Y" for mispredicted branch
  72. And default sort keys are changed to comm, dso_from, symbol_from, dso_to
  73. and symbol_to, see '--branch-stack'.
  74. -p::
  75. --parent=<regex>::
  76. A regex filter to identify parent. The parent is a caller of this
  77. function and searched through the callchain, thus it requires callchain
  78. information recorded. The pattern is in the exteneded regex format and
  79. defaults to "\^sys_|^do_page_fault", see '--sort parent'.
  80. -x::
  81. --exclude-other::
  82. Only display entries with parent-match.
  83. -w::
  84. --column-widths=<width[,width...]>::
  85. Force each column width to the provided list, for large terminal
  86. readability.
  87. -t::
  88. --field-separator=::
  89. Use a special separator character and don't pad with spaces, replacing
  90. all occurrences of this separator in symbol names (and other output)
  91. with a '.' character, that thus it's the only non valid separator.
  92. -D::
  93. --dump-raw-trace::
  94. Dump raw trace in ASCII.
  95. -g [type,min[,limit],order]::
  96. --call-graph::
  97. Display call chains using type, min percent threshold, optional print
  98. limit and order.
  99. type can be either:
  100. - flat: single column, linear exposure of call chains.
  101. - graph: use a graph tree, displaying absolute overhead rates.
  102. - fractal: like graph, but displays relative rates. Each branch of
  103. the tree is considered as a new profiled object. +
  104. order can be either:
  105. - callee: callee based call graph.
  106. - caller: inverted caller based call graph.
  107. Default: fractal,0.5,callee.
  108. -G::
  109. --inverted::
  110. alias for inverted caller based call graph.
  111. --pretty=<key>::
  112. Pretty printing style. key: normal, raw
  113. --stdio:: Use the stdio interface.
  114. --tui:: Use the TUI interface, that is integrated with annotate and allows
  115. zooming into DSOs or threads, among other features. Use of --tui
  116. requires a tty, if one is not present, as when piping to other
  117. commands, the stdio interface is used.
  118. --gtk:: Use the GTK2 interface.
  119. -k::
  120. --vmlinux=<file>::
  121. vmlinux pathname
  122. --kallsyms=<file>::
  123. kallsyms pathname
  124. -m::
  125. --modules::
  126. Load module symbols. WARNING: This should only be used with -k and
  127. a LIVE kernel.
  128. -f::
  129. --force::
  130. Don't complain, do it.
  131. --symfs=<directory>::
  132. Look for files with symbols relative to this directory.
  133. -C::
  134. --cpu:: Only report samples for the list of CPUs provided. Multiple CPUs can
  135. be provided as a comma-separated list with no space: 0,1. Ranges of
  136. CPUs are specified with -: 0-2. Default is to report samples on all
  137. CPUs.
  138. -M::
  139. --disassembler-style=:: Set disassembler style for objdump.
  140. --source::
  141. Interleave source code with assembly code. Enabled by default,
  142. disable with --no-source.
  143. --asm-raw::
  144. Show raw instruction encoding of assembly instructions.
  145. --show-total-period:: Show a column with the sum of periods.
  146. -I::
  147. --show-info::
  148. Display extended information about the perf.data file. This adds
  149. information which may be very large and thus may clutter the display.
  150. It currently includes: cpu and numa topology of the host system.
  151. -b::
  152. --branch-stack::
  153. Use the addresses of sampled taken branches instead of the instruction
  154. address to build the histograms. To generate meaningful output, the
  155. perf.data file must have been obtained using perf record -b or
  156. perf record --branch-filter xxx where xxx is a branch filter option.
  157. perf report is able to auto-detect whether a perf.data file contains
  158. branch stacks and it will automatically switch to the branch view mode,
  159. unless --no-branch-stack is used.
  160. --objdump=<path>::
  161. Path to objdump binary.
  162. --group::
  163. Show event group information together.
  164. SEE ALSO
  165. --------
  166. linkperf:perf-stat[1], linkperf:perf-annotate[1]