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:: 44a527c2c1SJames Clark Do not show any warnings or messages. (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 614bcbe438SYang Jihong--itrace:: 624bcbe438SYang Jihong Options for decoding instruction tracing data. The options are: 634bcbe438SYang Jihong 644bcbe438SYang Jihonginclude::itrace.txt[] 654bcbe438SYang Jihong 664bcbe438SYang Jihong To disable decoding entirely, use --no-itrace. 674bcbe438SYang Jihong 681968ad91SShawn Bohrer-m:: 691968ad91SShawn Bohrer--modules:: 701968ad91SShawn Bohrer Load module symbols. WARNING: use only with -k and LIVE kernel. 711968ad91SShawn Bohrer 721968ad91SShawn Bohrer-l:: 731968ad91SShawn Bohrer--print-line:: 741968ad91SShawn Bohrer Print matching source lines (may be slow). 751968ad91SShawn Bohrer 761968ad91SShawn Bohrer-P:: 771968ad91SShawn Bohrer--full-paths:: 781968ad91SShawn Bohrer Don't shorten the displayed pathnames. 791968ad91SShawn Bohrer 808b9e74ebSArnaldo Carvalho de Melo--stdio:: Use the stdio interface. 818b9e74ebSArnaldo Carvalho de Melo 82befd2a38SArnaldo Carvalho de Melo--stdio2:: Use the stdio2 interface, non-interactive, uses the TUI formatting. 83befd2a38SArnaldo Carvalho de Melo 84ac2c3068SJaecheol Shin--stdio-color=<mode>:: 8553fe4ba1SArnaldo Carvalho de Melo 'always', 'never' or 'auto', allowing configuring color output 8653fe4ba1SArnaldo Carvalho de Melo via the command line, in addition to via "color.ui" .perfconfig. 8753fe4ba1SArnaldo Carvalho de Melo Use '--stdio-color always' to generate color even when redirecting 8853fe4ba1SArnaldo Carvalho de Melo to a pipe or file. Using just '--stdio-color' is equivalent to 8953fe4ba1SArnaldo Carvalho de Melo using 'always'. 9053fe4ba1SArnaldo Carvalho de Melo 912b676bf0SNamhyung Kim--tui:: Use the TUI interface. Use of --tui requires a tty, if one is not 928b9e74ebSArnaldo Carvalho de Melo present, as when piping to other commands, the stdio interface is 938b9e74ebSArnaldo Carvalho de Melo used. This interfaces starts by centering on the line with more 941968ad91SShawn Bohrer samples, TAB/UNTAB cycles through the lines with more samples. 958b9e74ebSArnaldo Carvalho de Melo 962b676bf0SNamhyung Kim--gtk:: Use the GTK interface. 972b676bf0SNamhyung Kim 98c8e66720SDavid Ahern-C:: 99ac2c3068SJaecheol Shin--cpu=<cpu>:: Only report samples for the list of CPUs provided. Multiple CPUs can 1005d67be97SAnton Blanchard be provided as a comma-separated list with no space: 0,1. Ranges of 1015d67be97SAnton Blanchard CPUs are specified with -: 0-2. Default is to report samples on all 1025d67be97SAnton Blanchard CPUs. 1035d67be97SAnton Blanchard 1043e6a2a7fSStephane Eranian--asm-raw:: 10564c6f0c7SArnaldo Carvalho de Melo Show raw instruction encoding of assembly instructions. 1063e6a2a7fSStephane Eranian 10701c85629STaeung Song--show-total-period:: Show a column with the sum of periods. 10801c85629STaeung Song 1093e6a2a7fSStephane Eranian--source:: 1103e6a2a7fSStephane Eranian Interleave source code with assembly code. Enabled by default, 1113e6a2a7fSStephane Eranian disable with --no-source. 1123e6a2a7fSStephane Eranian 113e71a0598SStephane Eranian--symfs=<directory>:: 114e71a0598SStephane Eranian Look for files with symbols relative to this directory. 115e71a0598SStephane Eranian 116f69b64f7SAndi Kleen-M:: 117f69b64f7SAndi Kleen--disassembler-style=:: Set disassembler style for objdump. 118f69b64f7SAndi Kleen 119*57594454SIan Rogers--addr2line=<path>:: 120*57594454SIan Rogers Path to addr2line binary. 121*57594454SIan Rogers 1227a4ec938SMaciek Borzecki--objdump=<path>:: 1237a4ec938SMaciek Borzecki Path to objdump binary. 1247a4ec938SMaciek Borzecki 1253b0b16bfSAndi Kleen--prefix=PREFIX:: 1263b0b16bfSAndi Kleen--prefix-strip=N:: 1273b0b16bfSAndi Kleen Remove first N entries from source file path names in executables 1283b0b16bfSAndi Kleen and add PREFIX. This allows to display source code compiled on systems 1293b0b16bfSAndi Kleen with different file system layout. 1303b0b16bfSAndi Kleen 13118c9e5c5SNamhyung Kim--skip-missing:: 13218c9e5c5SNamhyung Kim Skip symbols that cannot be annotated. 13318c9e5c5SNamhyung Kim 134b1dd4432SNamhyung Kim--group:: 135b1dd4432SNamhyung Kim Show event group information together 136b1dd4432SNamhyung Kim 1373406ac53SMartin Liška--demangle:: 1383406ac53SMartin Liška Demangle symbol names to human readable form. It's enabled by default, 1393406ac53SMartin Liška disable with --no-demangle. 1403406ac53SMartin Liška 1413406ac53SMartin Liška--demangle-kernel:: 1423406ac53SMartin Liška Demangle kernel symbol names to human readable form (for C++ kernels). 1433406ac53SMartin Liška 14488c21190SJiri Olsa--percent-type:: 14588c21190SJiri Olsa Set annotation percent type from following choices: 14688c21190SJiri Olsa global-period, local-period, global-hits, local-hits 14788c21190SJiri Olsa 14888c21190SJiri Olsa The local/global keywords set if the percentage is computed 14988c21190SJiri Olsa in the scope of the function (local) or the whole data (global). 15088c21190SJiri Olsa The period/hits keywords set the base the percentage is computed 15188c21190SJiri Olsa on - the samples period or the number of samples (hits). 15288c21190SJiri Olsa 153cad10ce3SNamhyung Kim--percent-limit:: 154cad10ce3SNamhyung Kim Do not show functions which have an overhead under that percent on 155cad10ce3SNamhyung Kim stdio or stdio2 (Default: 0). Note that this is about selection of 156cad10ce3SNamhyung Kim functions to display, not about lines within the function. 157cad10ce3SNamhyung Kim 15886470930SIngo MolnarSEE ALSO 15986470930SIngo Molnar-------- 1608b9e74ebSArnaldo Carvalho de Melolinkperf:perf-record[1], linkperf:perf-report[1] 161