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 58be316409SArnaldo Carvalho de Melo--ignore-vmlinux:: 59be316409SArnaldo Carvalho de Melo Ignore vmlinux files. 60be316409SArnaldo Carvalho de Melo 611968ad91SShawn Bohrer-m:: 621968ad91SShawn Bohrer--modules:: 631968ad91SShawn Bohrer Load module symbols. WARNING: use only with -k and LIVE kernel. 641968ad91SShawn Bohrer 651968ad91SShawn Bohrer-l:: 661968ad91SShawn Bohrer--print-line:: 671968ad91SShawn Bohrer Print matching source lines (may be slow). 681968ad91SShawn Bohrer 691968ad91SShawn Bohrer-P:: 701968ad91SShawn Bohrer--full-paths:: 711968ad91SShawn Bohrer Don't shorten the displayed pathnames. 721968ad91SShawn Bohrer 738b9e74ebSArnaldo Carvalho de Melo--stdio:: Use the stdio interface. 748b9e74ebSArnaldo Carvalho de Melo 75befd2a38SArnaldo Carvalho de Melo--stdio2:: Use the stdio2 interface, non-interactive, uses the TUI formatting. 76befd2a38SArnaldo Carvalho de Melo 77ac2c3068SJaecheol Shin--stdio-color=<mode>:: 7853fe4ba1SArnaldo Carvalho de Melo 'always', 'never' or 'auto', allowing configuring color output 7953fe4ba1SArnaldo Carvalho de Melo via the command line, in addition to via "color.ui" .perfconfig. 8053fe4ba1SArnaldo Carvalho de Melo Use '--stdio-color always' to generate color even when redirecting 8153fe4ba1SArnaldo Carvalho de Melo to a pipe or file. Using just '--stdio-color' is equivalent to 8253fe4ba1SArnaldo Carvalho de Melo using 'always'. 8353fe4ba1SArnaldo Carvalho de Melo 842b676bf0SNamhyung Kim--tui:: Use the TUI interface. Use of --tui requires a tty, if one is not 858b9e74ebSArnaldo Carvalho de Melo present, as when piping to other commands, the stdio interface is 868b9e74ebSArnaldo Carvalho de Melo used. This interfaces starts by centering on the line with more 871968ad91SShawn Bohrer samples, TAB/UNTAB cycles through the lines with more samples. 888b9e74ebSArnaldo Carvalho de Melo 892b676bf0SNamhyung Kim--gtk:: Use the GTK interface. 902b676bf0SNamhyung Kim 91c8e66720SDavid Ahern-C:: 92ac2c3068SJaecheol Shin--cpu=<cpu>:: Only report samples for the list of CPUs provided. Multiple CPUs can 935d67be97SAnton Blanchard be provided as a comma-separated list with no space: 0,1. Ranges of 945d67be97SAnton Blanchard CPUs are specified with -: 0-2. Default is to report samples on all 955d67be97SAnton Blanchard CPUs. 965d67be97SAnton Blanchard 973e6a2a7fSStephane Eranian--asm-raw:: 9864c6f0c7SArnaldo Carvalho de Melo Show raw instruction encoding of assembly instructions. 993e6a2a7fSStephane Eranian 10001c85629STaeung Song--show-total-period:: Show a column with the sum of periods. 10101c85629STaeung Song 1023e6a2a7fSStephane Eranian--source:: 1033e6a2a7fSStephane Eranian Interleave source code with assembly code. Enabled by default, 1043e6a2a7fSStephane Eranian disable with --no-source. 1053e6a2a7fSStephane Eranian 106e71a0598SStephane Eranian--symfs=<directory>:: 107e71a0598SStephane Eranian Look for files with symbols relative to this directory. 108e71a0598SStephane Eranian 109f69b64f7SAndi Kleen-M:: 110f69b64f7SAndi Kleen--disassembler-style=:: Set disassembler style for objdump. 111f69b64f7SAndi Kleen 1127a4ec938SMaciek Borzecki--objdump=<path>:: 1137a4ec938SMaciek Borzecki Path to objdump binary. 1147a4ec938SMaciek Borzecki 11518c9e5c5SNamhyung Kim--skip-missing:: 11618c9e5c5SNamhyung Kim Skip symbols that cannot be annotated. 11718c9e5c5SNamhyung Kim 118b1dd4432SNamhyung Kim--group:: 119b1dd4432SNamhyung Kim Show event group information together 120b1dd4432SNamhyung Kim 12186470930SIngo MolnarSEE ALSO 12286470930SIngo Molnar-------- 1238b9e74ebSArnaldo Carvalho de Melolinkperf:perf-record[1], linkperf:perf-report[1] 124