perf-top.txt 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. perf-top(1)
  2. ===========
  3. NAME
  4. ----
  5. perf-top - System profiling tool.
  6. SYNOPSIS
  7. --------
  8. [verse]
  9. 'perf top' [-e <EVENT> | --event=EVENT] [<options>]
  10. DESCRIPTION
  11. -----------
  12. This command generates and displays a performance counter profile in real time.
  13. OPTIONS
  14. -------
  15. -a::
  16. --all-cpus::
  17. System-wide collection. (default)
  18. -c <count>::
  19. --count=<count>::
  20. Event period to sample.
  21. -C <cpu-list>::
  22. --cpu=<cpu>::
  23. Monitor only on the list of CPUs provided. Multiple CPUs can be provided as a
  24. comma-separated list with no space: 0,1. Ranges of CPUs are specified with -: 0-2.
  25. Default is to monitor all CPUS.
  26. -d <seconds>::
  27. --delay=<seconds>::
  28. Number of seconds to delay between refreshes.
  29. -e <event>::
  30. --event=<event>::
  31. Select the PMU event. Selection can be a symbolic event name
  32. (use 'perf list' to list all events) or a raw PMU
  33. event (eventsel+umask) in the form of rNNN where NNN is a
  34. hexadecimal event descriptor.
  35. -E <entries>::
  36. --entries=<entries>::
  37. Display this many functions.
  38. -f <count>::
  39. --count-filter=<count>::
  40. Only display functions with more events than this.
  41. -g::
  42. --group::
  43. Put the counters into a counter group.
  44. -F <freq>::
  45. --freq=<freq>::
  46. Profile at this frequency.
  47. -i::
  48. --inherit::
  49. Child tasks do not inherit counters.
  50. -k <path>::
  51. --vmlinux=<path>::
  52. Path to vmlinux. Required for annotation functionality.
  53. -m <pages>::
  54. --mmap-pages=<pages>::
  55. Number of mmap data pages (must be a power of two) or size
  56. specification with appended unit character - B/K/M/G. The
  57. size is rounded up to have nearest pages power of two value.
  58. -p <pid>::
  59. --pid=<pid>::
  60. Profile events on existing Process ID (comma separated list).
  61. -t <tid>::
  62. --tid=<tid>::
  63. Profile events on existing thread ID (comma separated list).
  64. -u::
  65. --uid=::
  66. Record events in threads owned by uid. Name or number.
  67. -r <priority>::
  68. --realtime=<priority>::
  69. Collect data with this RT SCHED_FIFO priority.
  70. -s <symbol>::
  71. --sym-annotate=<symbol>::
  72. Annotate this symbol.
  73. -K::
  74. --hide_kernel_symbols::
  75. Hide kernel symbols.
  76. -U::
  77. --hide_user_symbols::
  78. Hide user symbols.
  79. -D::
  80. --dump-symtab::
  81. Dump the symbol table used for profiling.
  82. -v::
  83. --verbose::
  84. Be more verbose (show counter open errors, etc).
  85. -z::
  86. --zero::
  87. Zero history across display updates.
  88. -s::
  89. --sort::
  90. Sort by key(s): pid, comm, dso, symbol, parent, srcline, weight,
  91. local_weight, abort, in_tx, transaction
  92. -n::
  93. --show-nr-samples::
  94. Show a column with the number of samples.
  95. --show-total-period::
  96. Show a column with the sum of periods.
  97. --dsos::
  98. Only consider symbols in these dsos.
  99. --comms::
  100. Only consider symbols in these comms.
  101. --symbols::
  102. Only consider these symbols.
  103. -M::
  104. --disassembler-style=:: Set disassembler style for objdump.
  105. --source::
  106. Interleave source code with assembly code. Enabled by default,
  107. disable with --no-source.
  108. --asm-raw::
  109. Show raw instruction encoding of assembly instructions.
  110. -G::
  111. Enables call-graph (stack chain/backtrace) recording.
  112. --call-graph::
  113. Setup and enable call-graph (stack chain/backtrace) recording,
  114. implies -G.
  115. --max-stack::
  116. Set the stack depth limit when parsing the callchain, anything
  117. beyond the specified depth will be ignored. This is a trade-off
  118. between information loss and faster processing especially for
  119. workloads that can have a very long callchain stack.
  120. Default: 127
  121. --ignore-callees=<regex>::
  122. Ignore callees of the function(s) matching the given regex.
  123. This has the effect of collecting the callers of each such
  124. function into one place in the call-graph tree.
  125. --percent-limit::
  126. Do not show entries which have an overhead under that percent.
  127. (Default: 0).
  128. INTERACTIVE PROMPTING KEYS
  129. --------------------------
  130. [d]::
  131. Display refresh delay.
  132. [e]::
  133. Number of entries to display.
  134. [E]::
  135. Event to display when multiple counters are active.
  136. [f]::
  137. Profile display filter (>= hit count).
  138. [F]::
  139. Annotation display filter (>= % of total).
  140. [s]::
  141. Annotate symbol.
  142. [S]::
  143. Stop annotation, return to full profile display.
  144. [z]::
  145. Toggle event count zeroing across display updates.
  146. [qQ]::
  147. Quit.
  148. Pressing any unmapped key displays a menu, and prompts for input.
  149. SEE ALSO
  150. --------
  151. linkperf:perf-stat[1], linkperf:perf-list[1]