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:: 24ac2c3068SJaecheol Shin--input=<file>:: 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 72befd2a38SArnaldo Carvalho de Melo--stdio2:: Use the stdio2 interface, non-interactive, uses the TUI formatting. 73befd2a38SArnaldo Carvalho de Melo 74ac2c3068SJaecheol Shin--stdio-color=<mode>:: 7553fe4ba1SArnaldo Carvalho de Melo 'always', 'never' or 'auto', allowing configuring color output 7653fe4ba1SArnaldo Carvalho de Melo via the command line, in addition to via "color.ui" .perfconfig. 7753fe4ba1SArnaldo Carvalho de Melo Use '--stdio-color always' to generate color even when redirecting 7853fe4ba1SArnaldo Carvalho de Melo to a pipe or file. Using just '--stdio-color' is equivalent to 7953fe4ba1SArnaldo Carvalho de Melo using 'always'. 8053fe4ba1SArnaldo Carvalho de Melo 812b676bf0SNamhyung Kim--tui:: Use the TUI interface. Use of --tui requires a tty, if one is not 828b9e74ebSArnaldo Carvalho de Melo present, as when piping to other commands, the stdio interface is 838b9e74ebSArnaldo Carvalho de Melo used. This interfaces starts by centering on the line with more 841968ad91SShawn Bohrer samples, TAB/UNTAB cycles through the lines with more samples. 858b9e74ebSArnaldo Carvalho de Melo 862b676bf0SNamhyung Kim--gtk:: Use the GTK interface. 872b676bf0SNamhyung Kim 88c8e66720SDavid Ahern-C:: 89ac2c3068SJaecheol Shin--cpu=<cpu>:: Only report samples for the list of CPUs provided. Multiple CPUs can 905d67be97SAnton Blanchard be provided as a comma-separated list with no space: 0,1. Ranges of 915d67be97SAnton Blanchard CPUs are specified with -: 0-2. Default is to report samples on all 925d67be97SAnton Blanchard CPUs. 935d67be97SAnton Blanchard 943e6a2a7fSStephane Eranian--asm-raw:: 9564c6f0c7SArnaldo Carvalho de Melo Show raw instruction encoding of assembly instructions. 963e6a2a7fSStephane Eranian 9701c85629STaeung Song--show-total-period:: Show a column with the sum of periods. 9801c85629STaeung Song 993e6a2a7fSStephane Eranian--source:: 1003e6a2a7fSStephane Eranian Interleave source code with assembly code. Enabled by default, 1013e6a2a7fSStephane Eranian disable with --no-source. 1023e6a2a7fSStephane Eranian 103e71a0598SStephane Eranian--symfs=<directory>:: 104e71a0598SStephane Eranian Look for files with symbols relative to this directory. 105e71a0598SStephane Eranian 106f69b64f7SAndi Kleen-M:: 107f69b64f7SAndi Kleen--disassembler-style=:: Set disassembler style for objdump. 108f69b64f7SAndi Kleen 1097a4ec938SMaciek Borzecki--objdump=<path>:: 1107a4ec938SMaciek Borzecki Path to objdump binary. 1117a4ec938SMaciek Borzecki 11218c9e5c5SNamhyung Kim--skip-missing:: 11318c9e5c5SNamhyung Kim Skip symbols that cannot be annotated. 11418c9e5c5SNamhyung Kim 115b1dd4432SNamhyung Kim--group:: 116b1dd4432SNamhyung Kim Show event group information together 117b1dd4432SNamhyung Kim 11886470930SIngo MolnarSEE ALSO 11986470930SIngo Molnar-------- 1208b9e74ebSArnaldo Carvalho de Melolinkperf:perf-record[1], linkperf:perf-report[1] 121