perf-annotate.txt 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. perf-annotate(1)
  2. ================
  3. NAME
  4. ----
  5. perf-annotate - Read perf.data (created by perf record) and display annotated code
  6. SYNOPSIS
  7. --------
  8. [verse]
  9. 'perf annotate' [-i <file> | --input=file] [symbol_name]
  10. DESCRIPTION
  11. -----------
  12. This command reads the input file and displays an annotated version of the
  13. code. If the object file has debug symbols then the source code will be
  14. displayed alongside assembly code.
  15. If there is no debug info in the object, then annotated assembly is displayed.
  16. OPTIONS
  17. -------
  18. -i::
  19. --input=<file>::
  20. Input file name. (default: perf.data unless stdin is a fifo)
  21. -d::
  22. --dsos=<dso[,dso...]>::
  23. Only consider symbols in these dsos.
  24. -s::
  25. --symbol=<symbol>::
  26. Symbol to annotate.
  27. -f::
  28. --force::
  29. Don't do ownership validation.
  30. -v::
  31. --verbose::
  32. Be more verbose. (Show symbol address, etc)
  33. -q::
  34. --quiet::
  35. Do not show any warnings or messages. (Suppress -v)
  36. -n::
  37. --show-nr-samples::
  38. Show the number of samples for each symbol
  39. -D::
  40. --dump-raw-trace::
  41. Dump raw trace in ASCII.
  42. -k::
  43. --vmlinux=<file>::
  44. vmlinux pathname.
  45. --ignore-vmlinux::
  46. Ignore vmlinux files.
  47. --itrace::
  48. Options for decoding instruction tracing data. The options are:
  49. include::itrace.txt[]
  50. To disable decoding entirely, use --no-itrace.
  51. -m::
  52. --modules::
  53. Load module symbols. WARNING: use only with -k and LIVE kernel.
  54. -l::
  55. --print-line::
  56. Print matching source lines (may be slow).
  57. -P::
  58. --full-paths::
  59. Don't shorten the displayed pathnames.
  60. --stdio:: Use the stdio interface.
  61. --stdio2:: Use the stdio2 interface, non-interactive, uses the TUI formatting.
  62. --stdio-color=<mode>::
  63. 'always', 'never' or 'auto', allowing configuring color output
  64. via the command line, in addition to via "color.ui" .perfconfig.
  65. Use '--stdio-color always' to generate color even when redirecting
  66. to a pipe or file. Using just '--stdio-color' is equivalent to
  67. using 'always'.
  68. --tui:: Use the TUI interface. Use of --tui requires a tty, if one is not
  69. present, as when piping to other commands, the stdio interface is
  70. used. This interfaces starts by centering on the line with more
  71. samples, TAB/UNTAB cycles through the lines with more samples.
  72. --gtk:: Use the GTK interface.
  73. -C::
  74. --cpu=<cpu>:: Only report samples for the list of CPUs provided. Multiple CPUs can
  75. be provided as a comma-separated list with no space: 0,1. Ranges of
  76. CPUs are specified with -: 0-2. Default is to report samples on all
  77. CPUs.
  78. --asm-raw::
  79. Show raw instruction encoding of assembly instructions.
  80. --show-total-period:: Show a column with the sum of periods.
  81. --source::
  82. Interleave source code with assembly code. Enabled by default,
  83. disable with --no-source.
  84. --symfs=<directory>::
  85. Look for files with symbols relative to this directory.
  86. -M::
  87. --disassembler-style=:: Set disassembler style for objdump.
  88. --objdump=<path>::
  89. Path to objdump binary.
  90. --prefix=PREFIX::
  91. --prefix-strip=N::
  92. Remove first N entries from source file path names in executables
  93. and add PREFIX. This allows to display source code compiled on systems
  94. with different file system layout.
  95. --skip-missing::
  96. Skip symbols that cannot be annotated.
  97. --group::
  98. Show event group information together
  99. --demangle::
  100. Demangle symbol names to human readable form. It's enabled by default,
  101. disable with --no-demangle.
  102. --demangle-kernel::
  103. Demangle kernel symbol names to human readable form (for C++ kernels).
  104. --percent-type::
  105. Set annotation percent type from following choices:
  106. global-period, local-period, global-hits, local-hits
  107. The local/global keywords set if the percentage is computed
  108. in the scope of the function (local) or the whole data (global).
  109. The period/hits keywords set the base the percentage is computed
  110. on - the samples period or the number of samples (hits).
  111. --percent-limit::
  112. Do not show functions which have an overhead under that percent on
  113. stdio or stdio2 (Default: 0). Note that this is about selection of
  114. functions to display, not about lines within the function.
  115. SEE ALSO
  116. --------
  117. linkperf:perf-record[1], linkperf:perf-report[1]