186470930SIngo Molnarperf-annotate(1)
24778e0e8SArnaldo Carvalho de Melo================
386470930SIngo Molnar
486470930SIngo MolnarNAME
586470930SIngo Molnar----
686470930SIngo Molnarperf-annotate - Read perf.data (created by perf record) and display annotated code
786470930SIngo Molnar
886470930SIngo MolnarSYNOPSIS
986470930SIngo Molnar--------
1086470930SIngo Molnar[verse]
118b9e74ebSArnaldo Carvalho de Melo'perf annotate' [-i <file> | --input=file] [symbol_name]
1286470930SIngo Molnar
1386470930SIngo MolnarDESCRIPTION
1486470930SIngo Molnar-----------
1586470930SIngo MolnarThis command reads the input file and displays an annotated version of the
1686470930SIngo Molnarcode. If the object file has debug symbols then the source code will be
1786470930SIngo Molnardisplayed alongside assembly code.
1886470930SIngo Molnar
1986470930SIngo MolnarIf there is no debug info in the object, then annotated assembly is displayed.
2086470930SIngo Molnar
2186470930SIngo MolnarOPTIONS
2286470930SIngo Molnar-------
2386470930SIngo Molnar-i::
2486470930SIngo Molnar--input=::
25efad1415SRobert Richter        Input file name. (default: perf.data unless stdin is a fifo)
2686470930SIngo Molnar
271968ad91SShawn Bohrer-d::
281968ad91SShawn Bohrer--dsos=<dso[,dso...]>::
291968ad91SShawn Bohrer        Only consider symbols in these dsos.
301968ad91SShawn Bohrer-s::
311968ad91SShawn Bohrer--symbol=<symbol>::
321968ad91SShawn Bohrer        Symbol to annotate.
331968ad91SShawn Bohrer
341968ad91SShawn Bohrer-f::
351968ad91SShawn Bohrer--force::
36e0be62ccSJiri Olsa        Don't do ownership validation.
371968ad91SShawn Bohrer
381968ad91SShawn Bohrer-v::
391968ad91SShawn Bohrer--verbose::
401968ad91SShawn Bohrer        Be more verbose. (Show symbol address, etc)
411968ad91SShawn Bohrer
42eddaef88SNamhyung Kim-q::
43eddaef88SNamhyung Kim--quiet::
44eddaef88SNamhyung Kim	Do not show any message.  (Suppress -v)
45eddaef88SNamhyung Kim
461ac39372STaeung Song-n::
471ac39372STaeung Song--show-nr-samples::
481ac39372STaeung Song	Show the number of samples for each symbol
491ac39372STaeung Song
501968ad91SShawn Bohrer-D::
511968ad91SShawn Bohrer--dump-raw-trace::
521968ad91SShawn Bohrer        Dump raw trace in ASCII.
531968ad91SShawn Bohrer
541968ad91SShawn Bohrer-k::
551968ad91SShawn Bohrer--vmlinux=<file>::
561968ad91SShawn Bohrer        vmlinux pathname.
571968ad91SShawn Bohrer
581968ad91SShawn Bohrer-m::
591968ad91SShawn Bohrer--modules::
601968ad91SShawn Bohrer        Load module symbols. WARNING: use only with -k and LIVE kernel.
611968ad91SShawn Bohrer
621968ad91SShawn Bohrer-l::
631968ad91SShawn Bohrer--print-line::
641968ad91SShawn Bohrer        Print matching source lines (may be slow).
651968ad91SShawn Bohrer
661968ad91SShawn Bohrer-P::
671968ad91SShawn Bohrer--full-paths::
681968ad91SShawn Bohrer        Don't shorten the displayed pathnames.
691968ad91SShawn Bohrer
708b9e74ebSArnaldo Carvalho de Melo--stdio:: Use the stdio interface.
718b9e74ebSArnaldo Carvalho de Melo
7253fe4ba1SArnaldo Carvalho de Melo--stdio-color::
7353fe4ba1SArnaldo Carvalho de Melo	'always', 'never' or 'auto', allowing configuring color output
7453fe4ba1SArnaldo Carvalho de Melo	via the command line, in addition to via "color.ui" .perfconfig.
7553fe4ba1SArnaldo Carvalho de Melo	Use '--stdio-color always' to generate color even when redirecting
7653fe4ba1SArnaldo Carvalho de Melo	to a pipe or file. Using just '--stdio-color' is equivalent to
7753fe4ba1SArnaldo Carvalho de Melo	using 'always'.
7853fe4ba1SArnaldo Carvalho de Melo
792b676bf0SNamhyung Kim--tui:: Use the TUI interface. Use of --tui requires a tty, if one is not
808b9e74ebSArnaldo Carvalho de Melo	present, as when piping to other commands, the stdio interface is
818b9e74ebSArnaldo Carvalho de Melo	used. This interfaces starts by centering on the line with more
821968ad91SShawn Bohrer	samples, TAB/UNTAB cycles through the lines with more samples.
838b9e74ebSArnaldo Carvalho de Melo
842b676bf0SNamhyung Kim--gtk:: Use the GTK interface.
852b676bf0SNamhyung Kim
86c8e66720SDavid Ahern-C::
875d67be97SAnton Blanchard--cpu:: Only report samples for the list of CPUs provided. Multiple CPUs can
885d67be97SAnton Blanchard	be provided as a comma-separated list with no space: 0,1. Ranges of
895d67be97SAnton Blanchard	CPUs are specified with -: 0-2. Default is to report samples on all
905d67be97SAnton Blanchard	CPUs.
915d67be97SAnton Blanchard
923e6a2a7fSStephane Eranian--asm-raw::
9364c6f0c7SArnaldo Carvalho de Melo	Show raw instruction encoding of assembly instructions.
943e6a2a7fSStephane Eranian
953e6a2a7fSStephane Eranian--source::
963e6a2a7fSStephane Eranian	Interleave source code with assembly code. Enabled by default,
973e6a2a7fSStephane Eranian	disable with --no-source.
983e6a2a7fSStephane Eranian
99e71a0598SStephane Eranian--symfs=<directory>::
100e71a0598SStephane Eranian        Look for files with symbols relative to this directory.
101e71a0598SStephane Eranian
102f69b64f7SAndi Kleen-M::
103f69b64f7SAndi Kleen--disassembler-style=:: Set disassembler style for objdump.
104f69b64f7SAndi Kleen
1057a4ec938SMaciek Borzecki--objdump=<path>::
1067a4ec938SMaciek Borzecki        Path to objdump binary.
1077a4ec938SMaciek Borzecki
10818c9e5c5SNamhyung Kim--skip-missing::
10918c9e5c5SNamhyung Kim	Skip symbols that cannot be annotated.
11018c9e5c5SNamhyung Kim
111b1dd4432SNamhyung Kim--group::
112b1dd4432SNamhyung Kim	Show event group information together
113b1dd4432SNamhyung Kim
11486470930SIngo MolnarSEE ALSO
11586470930SIngo Molnar--------
1168b9e74ebSArnaldo Carvalho de Melolinkperf:perf-record[1], linkperf:perf-report[1]
117