0001 perf-annotate(1)
0002 ================
0003
0004 NAME
0005 ----
0006 perf-annotate - Read perf.data (created by perf record) and display annotated code
0007
0008 SYNOPSIS
0009 --------
0010 [verse]
0011 'perf annotate' [-i <file> | --input=file] [symbol_name]
0012
0013 DESCRIPTION
0014 -----------
0015 This command reads the input file and displays an annotated version of the
0016 code. If the object file has debug symbols then the source code will be
0017 displayed alongside assembly code.
0018
0019 If there is no debug info in the object, then annotated assembly is displayed.
0020
0021 OPTIONS
0022 -------
0023 -i::
0024 --input=<file>::
0025 Input file name. (default: perf.data unless stdin is a fifo)
0026
0027 -d::
0028 --dsos=<dso[,dso...]>::
0029 Only consider symbols in these dsos.
0030 -s::
0031 --symbol=<symbol>::
0032 Symbol to annotate.
0033
0034 -f::
0035 --force::
0036 Don't do ownership validation.
0037
0038 -v::
0039 --verbose::
0040 Be more verbose. (Show symbol address, etc)
0041
0042 -q::
0043 --quiet::
0044 Do not show any message. (Suppress -v)
0045
0046 -n::
0047 --show-nr-samples::
0048 Show the number of samples for each symbol
0049
0050 -D::
0051 --dump-raw-trace::
0052 Dump raw trace in ASCII.
0053
0054 -k::
0055 --vmlinux=<file>::
0056 vmlinux pathname.
0057
0058 --ignore-vmlinux::
0059 Ignore vmlinux files.
0060
0061 --itrace::
0062 Options for decoding instruction tracing data. The options are:
0063
0064 include::itrace.txt[]
0065
0066 To disable decoding entirely, use --no-itrace.
0067
0068 -m::
0069 --modules::
0070 Load module symbols. WARNING: use only with -k and LIVE kernel.
0071
0072 -l::
0073 --print-line::
0074 Print matching source lines (may be slow).
0075
0076 -P::
0077 --full-paths::
0078 Don't shorten the displayed pathnames.
0079
0080 --stdio:: Use the stdio interface.
0081
0082 --stdio2:: Use the stdio2 interface, non-interactive, uses the TUI formatting.
0083
0084 --stdio-color=<mode>::
0085 'always', 'never' or 'auto', allowing configuring color output
0086 via the command line, in addition to via "color.ui" .perfconfig.
0087 Use '--stdio-color always' to generate color even when redirecting
0088 to a pipe or file. Using just '--stdio-color' is equivalent to
0089 using 'always'.
0090
0091 --tui:: Use the TUI interface. Use of --tui requires a tty, if one is not
0092 present, as when piping to other commands, the stdio interface is
0093 used. This interfaces starts by centering on the line with more
0094 samples, TAB/UNTAB cycles through the lines with more samples.
0095
0096 --gtk:: Use the GTK interface.
0097
0098 -C::
0099 --cpu=<cpu>:: Only report samples for the list of CPUs provided. Multiple CPUs can
0100 be provided as a comma-separated list with no space: 0,1. Ranges of
0101 CPUs are specified with -: 0-2. Default is to report samples on all
0102 CPUs.
0103
0104 --asm-raw::
0105 Show raw instruction encoding of assembly instructions.
0106
0107 --show-total-period:: Show a column with the sum of periods.
0108
0109 --source::
0110 Interleave source code with assembly code. Enabled by default,
0111 disable with --no-source.
0112
0113 --symfs=<directory>::
0114 Look for files with symbols relative to this directory.
0115
0116 -M::
0117 --disassembler-style=:: Set disassembler style for objdump.
0118
0119 --objdump=<path>::
0120 Path to objdump binary.
0121
0122 --prefix=PREFIX::
0123 --prefix-strip=N::
0124 Remove first N entries from source file path names in executables
0125 and add PREFIX. This allows to display source code compiled on systems
0126 with different file system layout.
0127
0128 --skip-missing::
0129 Skip symbols that cannot be annotated.
0130
0131 --group::
0132 Show event group information together
0133
0134 --demangle::
0135 Demangle symbol names to human readable form. It's enabled by default,
0136 disable with --no-demangle.
0137
0138 --demangle-kernel::
0139 Demangle kernel symbol names to human readable form (for C++ kernels).
0140
0141 --percent-type::
0142 Set annotation percent type from following choices:
0143 global-period, local-period, global-hits, local-hits
0144
0145 The local/global keywords set if the percentage is computed
0146 in the scope of the function (local) or the whole data (global).
0147 The period/hits keywords set the base the percentage is computed
0148 on - the samples period or the number of samples (hits).
0149
0150 --percent-limit::
0151 Do not show functions which have an overhead under that percent on
0152 stdio or stdio2 (Default: 0). Note that this is about selection of
0153 functions to display, not about lines within the function.
0154
0155 SEE ALSO
0156 --------
0157 linkperf:perf-record[1], linkperf:perf-report[1]