perf-top.txt 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  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 inherit counters, only makes sens with -p option.
  50. -k <path>::
  51. --vmlinux=<path>::
  52. Path to vmlinux. Required for annotation functionality.
  53. -m <pages>::
  54. --mmap-pages=<pages>::
  55. Number of mmapped data pages.
  56. -p <pid>::
  57. --pid=<pid>::
  58. Profile events on existing Process ID (comma separated list).
  59. -t <tid>::
  60. --tid=<tid>::
  61. Profile events on existing thread ID (comma separated list).
  62. -u::
  63. --uid=::
  64. Record events in threads owned by uid. Name or number.
  65. -r <priority>::
  66. --realtime=<priority>::
  67. Collect data with this RT SCHED_FIFO priority.
  68. -s <symbol>::
  69. --sym-annotate=<symbol>::
  70. Annotate this symbol.
  71. -K::
  72. --hide_kernel_symbols::
  73. Hide kernel symbols.
  74. -U::
  75. --hide_user_symbols::
  76. Hide user symbols.
  77. -D::
  78. --dump-symtab::
  79. Dump the symbol table used for profiling.
  80. -v::
  81. --verbose::
  82. Be more verbose (show counter open errors, etc).
  83. -z::
  84. --zero::
  85. Zero history across display updates.
  86. -s::
  87. --sort::
  88. Sort by key(s): pid, comm, dso, symbol, parent
  89. -n::
  90. --show-nr-samples::
  91. Show a column with the number of samples.
  92. --show-total-period::
  93. Show a column with the sum of periods.
  94. --dsos::
  95. Only consider symbols in these dsos.
  96. --comms::
  97. Only consider symbols in these comms.
  98. --symbols::
  99. Only consider these symbols.
  100. -M::
  101. --disassembler-style=:: Set disassembler style for objdump.
  102. --source::
  103. Interleave source code with assembly code. Enabled by default,
  104. disable with --no-source.
  105. --asm-raw::
  106. Show raw instruction encoding of assembly instructions.
  107. -G [type,min,order]::
  108. --call-graph::
  109. Display call chains using type, min percent threshold and order.
  110. type can be either:
  111. - flat: single column, linear exposure of call chains.
  112. - graph: use a graph tree, displaying absolute overhead rates.
  113. - fractal: like graph, but displays relative rates. Each branch of
  114. the tree is considered as a new profiled object.
  115. order can be either:
  116. - callee: callee based call graph.
  117. - caller: inverted caller based call graph.
  118. Default: fractal,0.5,callee.
  119. INTERACTIVE PROMPTING KEYS
  120. --------------------------
  121. [d]::
  122. Display refresh delay.
  123. [e]::
  124. Number of entries to display.
  125. [E]::
  126. Event to display when multiple counters are active.
  127. [f]::
  128. Profile display filter (>= hit count).
  129. [F]::
  130. Annotation display filter (>= % of total).
  131. [s]::
  132. Annotate symbol.
  133. [S]::
  134. Stop annotation, return to full profile display.
  135. [z]::
  136. Toggle event count zeroing across display updates.
  137. [qQ]::
  138. Quit.
  139. Pressing any unmapped key displays a menu, and prompts for input.
  140. SEE ALSO
  141. --------
  142. linkperf:perf-stat[1], linkperf:perf-list[1]