Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) perf-top(1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) ===========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4) NAME
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5) ----
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6) perf-top - System profiling tool.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) SYNOPSIS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) --------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) [verse]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) 'perf top' [-e <EVENT> | --event=EVENT] [<options>]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) DESCRIPTION
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) -----------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) This command generates and displays a performance counter profile in real time.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) OPTIONS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) -------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) -a::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) --all-cpus::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22)         System-wide collection.  (default)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) -c <count>::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) --count=<count>::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) 	Event period to sample.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) -C <cpu-list>::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) --cpu=<cpu>::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) Monitor only on the list of CPUs provided. Multiple CPUs can be provided as a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) comma-separated list with no space: 0,1. Ranges of CPUs are specified with -: 0-2.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) Default is to monitor all CPUS.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) -d <seconds>::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) --delay=<seconds>::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) 	Number of seconds to delay between refreshes.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) -e <event>::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) --event=<event>::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) 	Select the PMU event. Selection can be a symbolic event name
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) 	(use 'perf list' to list all events) or a raw PMU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) 	event (eventsel+umask) in the form of rNNN where NNN is a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) 	hexadecimal event descriptor.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) -E <entries>::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) --entries=<entries>::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) 	Display this many functions.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) -f <count>::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) --count-filter=<count>::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) 	Only display functions with more events than this.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) --group::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54)         Put the counters into a counter group.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) --group-sort-idx::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 	Sort the output by the event at the index n in group. If n is invalid,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) 	sort by the first event. It can support multiple groups with different
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 	amount of events. WARNING: This should be used on grouped events.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) -F <freq>::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) --freq=<freq>::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 	Profile at this frequency. Use 'max' to use the currently maximum
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 	allowed frequency, i.e. the value in the kernel.perf_event_max_sample_rate
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 	sysctl.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) -i::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) --inherit::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 	Child tasks do not inherit counters.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) -k <path>::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) --vmlinux=<path>::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) 	Path to vmlinux.  Required for annotation functionality.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) --ignore-vmlinux::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) 	Ignore vmlinux files.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) --kallsyms=<file>::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 	kallsyms pathname
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) -m <pages>::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) --mmap-pages=<pages>::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 	Number of mmap data pages (must be a power of two) or size
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 	specification with appended unit character - B/K/M/G. The
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 	size is rounded up to have nearest pages power of two value.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) -p <pid>::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) --pid=<pid>::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 	Profile events on existing Process ID (comma separated list).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) -t <tid>::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) --tid=<tid>::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93)         Profile events on existing thread ID (comma separated list).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) -u::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) --uid=::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97)         Record events in threads owned by uid. Name or number.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) -r <priority>::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) --realtime=<priority>::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 	Collect data with this RT SCHED_FIFO priority.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) --sym-annotate=<symbol>::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104)         Annotate this symbol.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) -K::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) --hide_kernel_symbols::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108)         Hide kernel symbols.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) -U::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) --hide_user_symbols::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112)         Hide user symbols.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) --demangle-kernel::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115)         Demangle kernel symbols.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) -D::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) --dump-symtab::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119)         Dump the symbol table used for profiling.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) -v::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) --verbose::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) 	Be more verbose (show counter open errors, etc).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) -z::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) --zero::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) 	Zero history across display updates.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) -s::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) --sort::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) 	Sort by key(s): pid, comm, dso, symbol, parent, srcline, weight,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) 	local_weight, abort, in_tx, transaction, overhead, sample, period.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) 	Please see description of --sort in the perf-report man page.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) --fields=::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) 	Specify output field - multiple keys can be specified in CSV format.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) 	Following fields are available:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) 	overhead, overhead_sys, overhead_us, overhead_children, sample and period.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) 	Also it can contain any sort key(s).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) 	By default, every sort keys not specified in --field will be appended
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) 	automatically.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) -n::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) --show-nr-samples::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) 	Show a column with the number of samples.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) --show-total-period::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) 	Show a column with the sum of periods.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) --dsos::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) 	Only consider symbols in these dsos.  This option will affect the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) 	percentage of the overhead column.  See --percentage for more info.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) --comms::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) 	Only consider symbols in these comms.  This option will affect the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) 	percentage of the overhead column.  See --percentage for more info.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) --symbols::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 	Only consider these symbols.  This option will affect the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) 	percentage of the overhead column.  See --percentage for more info.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) -M::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) --disassembler-style=:: Set disassembler style for objdump.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) --prefix=PREFIX::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) --prefix-strip=N::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168)         Remove first N entries from source file path names in executables
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169)         and add PREFIX. This allows to display source code compiled on systems
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170)         with different file system layout.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) --source::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) 	Interleave source code with assembly code. Enabled by default,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) 	disable with --no-source.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) --asm-raw::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) 	Show raw instruction encoding of assembly instructions.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) -g::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) 	Enables call-graph (stack chain/backtrace) recording.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) --call-graph [mode,type,min[,limit],order[,key][,branch]]::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) 	Setup and enable call-graph (stack chain/backtrace) recording,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) 	implies -g.  See `--call-graph` section in perf-record and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) 	perf-report man pages for details.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) --children::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) 	Accumulate callchain of children to parent entry so that then can
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) 	show up in the output.  The output will have a new "Children" column
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) 	and will be sorted on the data.  It requires -g/--call-graph option
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) 	enabled.  See the `overhead calculation' section for more details.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) 	Enabled by default, disable with --no-children.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) --max-stack::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) 	Set the stack depth limit when parsing the callchain, anything
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) 	beyond the specified depth will be ignored. This is a trade-off
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) 	between information loss and faster processing especially for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) 	workloads that can have a very long callchain stack.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) 	Default: /proc/sys/kernel/perf_event_max_stack when present, 127 otherwise.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) --ignore-callees=<regex>::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203)         Ignore callees of the function(s) matching the given regex.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204)         This has the effect of collecting the callers of each such
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205)         function into one place in the call-graph tree.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) --percent-limit::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) 	Do not show entries which have an overhead under that percent.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) 	(Default: 0).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) --percentage::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) 	Determine how to display the overhead percentage of filtered entries.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) 	Filters can be applied by --comms, --dsos and/or --symbols options and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) 	Zoom operations on the TUI (thread, dso, etc).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) 	"relative" means it's relative to filtered entries only so that the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) 	sum of shown entries will be always 100%. "absolute" means it retains
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) 	the original value before and after the filter is applied.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) -w::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) --column-widths=<width[,width...]>::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) 	Force each column width to the provided list, for large terminal
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) 	readability.  0 means no limit (default behavior).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) --proc-map-timeout::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) 	When processing pre-existing threads /proc/XXX/mmap, it may take
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) 	a long time, because the file may be huge. A time out is needed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) 	in such cases.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) 	This option sets the time out limit. The default value is 500 ms.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) -b::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) --branch-any::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) 	Enable taken branch stack sampling. Any type of taken branch may be sampled.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) 	This is a shortcut for --branch-filter any. See --branch-filter for more infos.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) -j::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) --branch-filter::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) 	Enable taken branch stack sampling. Each sample captures a series of consecutive
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) 	taken branches. The number of branches captured with each sample depends on the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) 	underlying hardware, the type of branches of interest, and the executed code.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) 	It is possible to select the types of branches captured by enabling filters.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) 	For a full list of modifiers please see the perf record manpage.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) 	The option requires at least one branch type among any, any_call, any_ret, ind_call, cond.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) 	The privilege levels may be omitted, in which case, the privilege levels of the associated
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) 	event are applied to the branch filter. Both kernel (k) and hypervisor (hv) privilege
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) 	levels are subject to permissions.  When sampling on multiple events, branch stack sampling
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) 	is enabled for all the sampling events. The sampled branch type is the same for all events.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) 	The various filters must be specified as a comma separated list: --branch-filter any_ret,u,k
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) 	Note that this feature may not be available on all processors.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253) --raw-trace::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) 	When displaying traceevent output, do not use print fmt or plugins.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256) --hierarchy::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) 	Enable hierarchy output.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259) --overwrite::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) 	Enable this to use just the most recent records, which helps in high core count
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) 	machines such as Knights Landing/Mill, but right now is disabled by default as
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) 	the pausing used in this technique is leading to loss of metadata events such
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263) 	as PERF_RECORD_MMAP which makes 'perf top' unable to resolve samples, leading
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) 	to lots of unknown samples appearing on the UI. Enable this if you are in such
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265) 	machines and profiling a workload that doesn't creates short lived threads and/or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266) 	doesn't uses many executable mmap operations. Work is being planed to solve
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) 	this situation, till then, this will remain disabled by default.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269) --force::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270) 	Don't do ownership validation.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272) --num-thread-synthesize::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273) 	The number of threads to run when synthesizing events for existing processes.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274) 	By default, the number of threads equals to the number of online CPUs.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276) --namespaces::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277) 	Record events of type PERF_RECORD_NAMESPACES and display it with the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278) 	'cgroup_id' sort key.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280) --all-cgroups::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281) 	Record events of type PERF_RECORD_CGROUP and display it with the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282) 	'cgroup' sort key.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284) --switch-on EVENT_NAME::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285) 	Only consider events after this event is found.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 287) 	E.g.:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 288) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 289)            Find out where broadcast packets are handled
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 290) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 291) 		perf probe -L icmp_rcv
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 292) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 293) 	   Insert a probe there:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 294) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 295) 		perf probe icmp_rcv:59
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 296) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 297) 	   Start perf top and ask it to only consider the cycles events when a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 298)            broadcast packet arrives This will show a menu with two entries and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 299)            will start counting when a broadcast packet arrives:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 300) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 301) 		perf top -e cycles,probe:icmp_rcv --switch-on=probe:icmp_rcv
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 302) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 303) 	   Alternatively one can ask for --group and then two overhead columns
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 304)            will appear, the first for cycles and the second for the switch-on event.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 305) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 306) 		perf top --group -e cycles,probe:icmp_rcv --switch-on=probe:icmp_rcv
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 307) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 308) 	This may be interesting to measure a workload only after some initialization
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 309) 	phase is over, i.e. insert a perf probe at that point and use the above
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 310) 	examples replacing probe:icmp_rcv with the just-after-init probe.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 311) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 312) --switch-off EVENT_NAME::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 313) 	Stop considering events after this event is found.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 314) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 315) --show-on-off-events::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 316) 	Show the --switch-on/off events too. This has no effect in 'perf top' now
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 317) 	but probably we'll make the default not to show the switch-on/off events
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 318)         on the --group mode and if there is only one event besides the off/on ones,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 319) 	go straight to the histogram browser, just like 'perf top' with no events
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 320) 	explicitely specified does.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 321) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 322) --stitch-lbr::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 323) 	Show callgraph with stitched LBRs, which may have more complete
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 324) 	callgraph. The option must be used with --call-graph lbr recording.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 325) 	Disabled by default. In common cases with call stack overflows,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 326) 	it can recreate better call stacks than the default lbr call stack
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 327) 	output. But this approach is not full proof. There can be cases
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 328) 	where it creates incorrect call stacks from incorrect matches.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 329) 	The known limitations include exception handing such as
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 330) 	setjmp/longjmp will have calls/returns not match.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 331) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 332) ifdef::HAVE_LIBPFM[]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 333) --pfm-events events::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 334) Select a PMU event using libpfm4 syntax (see http://perfmon2.sf.net)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 335) including support for event filters. For example '--pfm-events
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 336) inst_retired:any_p:u:c=1:i'. More than one event can be passed to the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 337) option using the comma separator. Hardware events and generic hardware
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 338) events cannot be mixed together. The latter must be used with the -e
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 339) option. The -e option and this one can be mixed and matched.  Events
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 340) can be grouped using the {} notation.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 341) endif::HAVE_LIBPFM[]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 342) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 343) INTERACTIVE PROMPTING KEYS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 344) --------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 345) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 346) [d]::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 347) 	Display refresh delay.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 348) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 349) [e]::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 350) 	Number of entries to display.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 351) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 352) [E]::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 353) 	Event to display when multiple counters are active.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 354) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 355) [f]::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 356) 	Profile display filter (>= hit count).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 357) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 358) [F]::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 359) 	Annotation display filter (>= % of total).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 360) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 361) [s]::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 362) 	Annotate symbol.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 363) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 364) [S]::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 365) 	Stop annotation, return to full profile display.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 366) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 367) [K]::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 368) 	Hide kernel symbols.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 369) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 370) [U]::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 371) 	Hide user symbols.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 372) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 373) [z]::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 374) 	Toggle event count zeroing across display updates.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 375) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 376) [qQ]::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 377) 	Quit.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 378) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 379) Pressing any unmapped key displays a menu, and prompts for input.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 380) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 381) include::callchain-overhead-calculation.txt[]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 382) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 383) SEE ALSO
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 384) --------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 385) linkperf:perf-stat[1], linkperf:perf-list[1], linkperf:perf-report[1]