perf-top.txt 3.6 KB

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