'\" t .\" Title: perf-report .\" Author: [see the "AUTHOR(S)" section] .\" Generator: Asciidoctor 2.0.10 .\" Date: 2019-10-02 .\" Manual: perf Manual .\" Source: perf .\" Language: English .\" .TH "PERF_5.3\-REPORT" "1" "2019-10-02" "perf" "perf Manual" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 .nh .ad l .de URL \fI\\$2\fP <\\$1>\\$3 .. .als MTO URL .if \n[.g] \{\ . mso www.tmac . am URL . ad l . . . am MTO . ad l . . . LINKSTYLE blue R < > .\} .SH "NAME" perf\-report \- Read perf.data (created by perf record) and display the profile .SH "SYNOPSIS" .sp .sp .nf \fIperf report\fP [\-i | \-\-input=file] .fi .br .SH "DESCRIPTION" .sp This command displays the performance counter profile information recorded via perf record. .SH "OPTIONS" .sp \-i, \-\-input= .RS 4 Input file name. (default: perf.data unless stdin is a fifo) .RE .sp \-v, \-\-verbose .RS 4 Be more verbose. (show symbol address, etc) .RE .sp \-q, \-\-quiet .RS 4 Do not show any message. (Suppress \-v) .RE .sp \-n, \-\-show\-nr\-samples .RS 4 Show the number of samples for each symbol .RE .sp \-\-show\-cpu\-utilization .RS 4 Show sample percentage for different cpu modes. .RE .sp \-T, \-\-threads .RS 4 Show per\-thread event counters. The input data file should be recorded with \-s option. .RE .sp \-c, \-\-comms= .RS 4 Only consider symbols in these comms. CSV that understands .URL "file://filename" "" " " entries. This option will affect the percentage of the overhead column. See \-\-percentage for more info. .RE .sp \-\-pid= .RS 4 Only show events for given process ID (comma separated list). .RE .sp \-\-tid= .RS 4 Only show events for given thread ID (comma separated list). .RE .sp \-d, \-\-dsos= .RS 4 Only consider symbols in these dsos. CSV that understands .URL "file://filename" "" " " entries. This option will affect the percentage of the overhead column. See \-\-percentage for more info. .RE .sp \-S, \-\-symbols= .RS 4 Only consider these symbols. CSV that understands .URL "file://filename" "" " " entries. This option will affect the percentage of the overhead column. See \-\-percentage for more info. .RE .sp \-\-symbol\-filter= .RS 4 Only show symbols that match (partially) with this filter. .RE .sp \-U, \-\-hide\-unresolved .RS 4 Only display entries resolved to a symbol. .RE .sp \-s, \-\-sort= .RS 4 Sort histogram entries by given key(s) \- multiple keys can be specified in CSV format. Following sort keys are available: pid, comm, dso, symbol, parent, cpu, socket, srcline, weight, local_weight, cgroup_id. .sp .if n .RS 4 .nf Each key has following meaning: .fi .if n .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} comm: command (name) of the task which can be read via /proc//comm .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} pid: command and tid of the task .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} dso: name of library or module executed at the time of sample .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} dso_size: size of library or module executed at the time of sample .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} symbol: name of function executed at the time of sample .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} symbol_size: size of function executed at the time of sample .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} parent: name of function matched to the parent regex filter. Unmatched entries are displayed as "[other]". .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} cpu: cpu number the task ran at the time of sample .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} socket: processor socket number the task ran at the time of sample .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} srcline: filename and line number executed at the time of sample. The DWARF debugging info must be provided. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} srcfile: file name of the source file of the samples. Requires dwarf information. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} weight: Event specific weight, e.g. memory latency or transaction abort cost. This is the global weight. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} local_weight: Local weight version of the weight above. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} cgroup_id: ID derived from cgroup namespace device and inode numbers. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} transaction: Transaction abort flags. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} overhead: Overhead percentage of sample .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} overhead_sys: Overhead percentage of sample running in system mode .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} overhead_us: Overhead percentage of sample running in user mode .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} overhead_guest_sys: Overhead percentage of sample running in system mode on guest machine .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} overhead_guest_us: Overhead percentage of sample running in user mode on guest machine .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} sample: Number of sample .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} period: Raw number of event count of sample .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} time: Separate the samples by time stamp with the resolution specified by \-\-time\-quantum (default 100ms). Specify with overhead and before it. .sp .if n .RS 4 .nf By default, comm, dso and symbol keys are used. (i.e. \-\-sort comm,dso,symbol) .fi .if n .RE .sp .if n .RS 4 .nf If \-\-branch\-stack option is used, following sort keys are also available: .fi .if n .RE .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} dso_from: name of library or module branched from .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} dso_to: name of library or module branched to .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} symbol_from: name of function branched from .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} symbol_to: name of function branched to .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} srcline_from: source file and line branched from .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} srcline_to: source file and line branched to .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} mispredict: "N" for predicted branch, "Y" for mispredicted branch .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} in_tx: branch in TSX transaction .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} abort: TSX transaction abort. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} cycles: Cycles in basic block .sp .if n .RS 4 .nf And default sort keys are changed to comm, dso_from, symbol_from, dso_to and symbol_to, see \(aq\-\-branch\-stack\(aq. .fi .if n .RE .sp .if n .RS 4 .nf When the sort key symbol is specified, columns "IPC" and "IPC Coverage" are enabled automatically. Column "IPC" reports the average IPC per function and column "IPC coverage" reports the percentage of instructions with sampled IPC in this function. IPC means Instruction Per Cycle. If it\(aqs low, it indicates there may be a performance bottleneck when the function is executed, such as a memory access bottleneck. If a function has high overhead and low IPC, it\(aqs worth further analyzing it to optimize its performance. .fi .if n .RE .sp .if n .RS 4 .nf If the \-\-mem\-mode option is used, the following sort keys are also available (incompatible with \-\-branch\-stack): symbol_daddr, dso_daddr, locked, tlb, mem, snoop, dcacheline. .fi .if n .RE .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} symbol_daddr: name of data symbol being executed on at the time of sample .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} dso_daddr: name of library or module containing the data being executed on at the time of the sample .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} locked: whether the bus was locked at the time of the sample .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} tlb: type of tlb access for the data at the time of the sample .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} mem: type of memory access for the data at the time of the sample .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} snoop: type of snoop (if any) for the data at the time of the sample .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} dcacheline: the cacheline the data address is on at the time of the sample .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} phys_daddr: physical address of data being executed on at the time of sample .sp .if n .RS 4 .nf And the default sort keys are changed to local_weight, mem, sym, dso, symbol_daddr, dso_daddr, snoop, tlb, locked, see \(aq\-\-mem\-mode\(aq. .fi .if n .RE .sp .if n .RS 4 .nf If the data file has tracepoint event(s), following (dynamic) sort keys are also available: trace, trace_fields, [.][/raw] .fi .if n .RE .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} trace: pretty printed trace output in a single column .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} trace_fields: fields in tracepoints in separate columns .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} : optional event and field name for a specific field .sp .if n .RS 4 .nf The last form consists of event and field names. If event name is omitted, it searches all events for matching field name. The matched field will be shown only for the event has the field. The event name supports substring match so user doesn\(aqt need to specify full subsystem and event name everytime. For example, \(aqsched:sched_switch\(aq event can be shortened to \(aqswitch\(aq as long as it\(aqs not ambiguous. Also event can be specified by its index (starting from 1) preceded by the \(aq%\(aq. So \(aq%1\(aq is the first event, \(aq%2\(aq is the second, and so on. .fi .if n .RE .sp .if n .RS 4 .nf The field name can have \(aq/raw\(aq suffix which disables pretty printing and shows raw field value like hex numbers. The \-\-raw\-trace option has the same effect for all dynamic sort keys. .fi .if n .RE .sp .if n .RS 4 .nf The default sort keys are changed to \(aqtrace\(aq if all events in the data file are tracepoint. .fi .if n .RE .RE .RE .sp \-F, \-\-fields= .RS 4 Specify output field \- multiple keys can be specified in CSV format. Following fields are available: overhead, overhead_sys, overhead_us, overhead_children, sample and period. Also it can contain any sort key(s). .sp .if n .RS 4 .nf By default, every sort keys not specified in \-F will be appended automatically. .fi .if n .RE .sp .if n .RS 4 .nf If the keys starts with a prefix \(aq+\(aq, then it will append the specified field(s) to the default field order. For example: perf report \-F +period,sample. .fi .if n .RE .RE .sp \-p, \-\-parent= .RS 4 A regex filter to identify parent. The parent is a caller of this function and searched through the callchain, thus it requires callchain information recorded. The pattern is in the extended regex format and defaults to "^sys_|^do_page_fault", see \fI\-\-sort parent\fP. .RE .sp \-x, \-\-exclude\-other .RS 4 Only display entries with parent\-match. .RE .sp \-w, \-\-column\-widths= .RS 4 Force each column width to the provided list, for large terminal readability. 0 means no limit (default behavior). .RE .sp \-t, \-\-field\-separator= .RS 4 Use a special separator character and don\(cqt pad with spaces, replacing all occurrences of this separator in symbol names (and other output) with a \fI.\fP character, that thus it\(cqs the only non valid separator. .RE .sp \-D, \-\-dump\-raw\-trace .RS 4 Dump raw trace in ASCII. .RE .sp \-g, \-\-call\-graph= .RS 4 Display call chains using type, min percent threshold, print limit, call order, sort key, optional branch and value. Note that ordering is not fixed so any parameter can be given in an arbitrary order. One exception is the print_limit which should be preceded by threshold. .sp .if n .RS 4 .nf print_type can be either: \- flat: single column, linear exposure of call chains. \- graph: use a graph tree, displaying absolute overhead rates. (default) \- fractal: like graph, but displays relative rates. Each branch of the tree is considered as a new profiled object. \- folded: call chains are displayed in a line, separated by semicolons \- none: disable call chain display. .fi .if n .RE .sp .if n .RS 4 .nf threshold is a percentage value which specifies a minimum percent to be included in the output call graph. Default is 0.5 (%). .fi .if n .RE .sp .if n .RS 4 .nf print_limit is only applied when stdio interface is used. It\(aqs to limit number of call graph entries in a single hist entry. Note that it needs to be given after threshold (but not necessarily consecutive). Default is 0 (unlimited). .fi .if n .RE .sp .if n .RS 4 .nf order can be either: \- callee: callee based call graph. \- caller: inverted caller based call graph. Default is \(aqcaller\(aq when \-\-children is used, otherwise \(aqcallee\(aq. .fi .if n .RE .sp .if n .RS 4 .nf sort_key can be: \- function: compare on functions (default) \- address: compare on individual code addresses \- srcline: compare on source filename and line number .fi .if n .RE .sp .if n .RS 4 .nf branch can be: \- branch: include last branch information in callgraph when available. Usually more convenient to use \-\-branch\-history for this. .fi .if n .RE .sp .if n .RS 4 .nf value can be: \- percent: display overhead percent (default) \- period: display event period \- count: display event count .fi .if n .RE .RE .sp \-\-children .RS 4 Accumulate callchain of children to parent entry so that then can show up in the output. The output will have a new "Children" column and will be sorted on the data. It requires callchains are recorded. See the \(oqoverhead calculation\(cq section for more details. Enabled by default, disable with \-\-no\-children. .RE .sp \-\-max\-stack .RS 4 Set the stack depth limit when parsing the callchain, anything beyond the specified depth will be ignored. This is a trade\-off between information loss and faster processing especially for workloads that can have a very long callchain stack. Note that when using the \-\-itrace option the synthesized callchain size will override this value if the synthesized callchain size is bigger. .sp .if n .RS 4 .nf Default: 127 .fi .if n .RE .RE .sp \-G, \-\-inverted .RS 4 alias for inverted caller based call graph. .RE .sp \-\-ignore\-callees= .RS 4 Ignore callees of the function(s) matching the given regex. This has the effect of collecting the callers of each such function into one place in the call\-graph tree. .RE .sp \-\-pretty= .RS 4 Pretty printing style. key: normal, raw .RE .sp \-\-stdio .RS 4 Use the stdio interface. .RE .sp \-\-stdio\-color .RS 4 \fIalways\fP, \fInever\fP or \fIauto\fP, allowing configuring color output via the command line, in addition to via "color.ui" .perfconfig. Use \fI\-\-stdio\-color always\fP to generate color even when redirecting to a pipe or file. Using just \fI\-\-stdio\-color\fP is equivalent to using \fIalways\fP. .RE .sp \-\-tui .RS 4 Use the TUI interface, that is integrated with annotate and allows zooming into DSOs or threads, among other features. Use of \-\-tui requires a tty, if one is not present, as when piping to other commands, the stdio interface is used. .RE .sp \-\-gtk .RS 4 Use the GTK2 interface. .RE .sp \-k, \-\-vmlinux= .RS 4 vmlinux pathname .RE .sp \-\-ignore\-vmlinux .RS 4 Ignore vmlinux files. .RE .sp \-\-kallsyms= .RS 4 kallsyms pathname .RE .sp \-m, \-\-modules .RS 4 Load module symbols. WARNING: This should only be used with \-k and a LIVE kernel. .RE .sp \-f, \-\-force .RS 4 Don\(cqt do ownership validation. .RE .sp \-\-symfs= .RS 4 Look for files with symbols relative to this directory. .RE .sp \-C, \-\-cpu .RS 4 Only report samples for the list of CPUs provided. Multiple CPUs can be provided as a comma\-separated list with no space: 0,1. Ranges of CPUs are specified with \-: 0\-2. Default is to report samples on all CPUs. .RE .sp \-M, \-\-disassembler\-style= .RS 4 Set disassembler style for objdump. .RE .sp \-\-source .RS 4 Interleave source code with assembly code. Enabled by default, disable with \-\-no\-source. .RE .sp \-\-asm\-raw .RS 4 Show raw instruction encoding of assembly instructions. .RE .sp \-\-show\-total\-period .RS 4 Show a column with the sum of periods. .RE .sp \-I, \-\-show\-info .RS 4 Display extended information about the perf.data file. This adds information which may be very large and thus may clutter the display. It currently includes: cpu and numa topology of the host system. .RE .sp \-b, \-\-branch\-stack .RS 4 Use the addresses of sampled taken branches instead of the instruction address to build the histograms. To generate meaningful output, the perf.data file must have been obtained using perf record \-b or perf record \-\-branch\-filter xxx where xxx is a branch filter option. perf report is able to auto\-detect whether a perf.data file contains branch stacks and it will automatically switch to the branch view mode, unless \-\-no\-branch\-stack is used. .RE .sp \-\-branch\-history .RS 4 Add the addresses of sampled taken branches to the callstack. This allows to examine the path the program took to each sample. The data collection must have used \-b (or \-j) and \-g. .RE .sp \-\-objdump= .RS 4 Path to objdump binary. .RE .sp \-\-group .RS 4 Show event group information together. It forces group output also if there are no groups defined in data file. .RE .sp \-\-demangle .RS 4 Demangle symbol names to human readable form. It\(cqs enabled by default, disable with \-\-no\-demangle. .RE .sp \-\-demangle\-kernel .RS 4 Demangle kernel symbol names to human readable form (for C++ kernels). .RE .sp \-\-mem\-mode .RS 4 Use the data addresses of samples in addition to instruction addresses to build the histograms. To generate meaningful output, the perf.data file must have been obtained using perf record \-d \-W and using a special event \-e cpu/mem\-loads/p or \-e cpu/mem\-stores/p. See \fIperf mem\fP for simpler access. .RE .sp \-\-percent\-limit .RS 4 Do not show entries which have an overhead under that percent. (Default: 0). Note that this option also sets the percent limit (threshold) of callchains. However the default value of callchain threshold is different than the default value of hist entries. Please see the \-\-call\-graph option for details. .RE .sp \-\-percentage .RS 4 Determine how to display the overhead percentage of filtered entries. Filters can be applied by \-\-comms, \-\-dsos and/or \-\-symbols options and Zoom operations on the TUI (thread, dso, etc). .sp .if n .RS 4 .nf "relative" means it\(aqs relative to filtered entries only so that the sum of shown entries will be always 100%. "absolute" means it retains the original value before and after the filter is applied. .fi .if n .RE .RE .sp \-\-header .RS 4 Show header information in the perf.data file. This includes various information like hostname, OS and perf version, cpu/mem info, perf command line, event list and so on. Currently only \-\-stdio output supports this feature. .RE .sp \-\-header\-only .RS 4 Show only perf.data header (forces \-\-stdio). .RE .sp \-\-time .RS 4 Only analyze samples within given time window: ,. Times have the format seconds.nanoseconds. If start is not given (i.e. time string is \fI,x.y\fP) then analysis starts at the beginning of the file. If stop time is not given (i.e. time string is \fIx.y,\fP) then analysis goes to end of file. Multiple ranges can be separated by spaces, which requires the argument to be quoted e.g. \-\-time "1234.567,1234.789 1235," .sp .if n .RS 4 .nf Also support time percent with multiple time ranges. Time string is \(aqa%/n,b%/m,...\(aq or \(aqa%\-b%,c%\-%d,...\(aq. .fi .if n .RE .sp .if n .RS 4 .nf For example: Select the second 10% time slice: .fi .if n .RE .sp .if n .RS 4 .nf perf report \-\-time 10%/2 .fi .if n .RE .sp .if n .RS 4 .nf Select from 0% to 10% time slice: .fi .if n .RE .sp .if n .RS 4 .nf perf report \-\-time 0%\-10% .fi .if n .RE .sp .if n .RS 4 .nf Select the first and second 10% time slices: .fi .if n .RE .sp .if n .RS 4 .nf perf report \-\-time 10%/1,10%/2 .fi .if n .RE .sp .if n .RS 4 .nf Select from 0% to 10% and 30% to 40% slices: .fi .if n .RE .sp .if n .RS 4 .nf perf report \-\-time 0%\-10%,30%\-40% .fi .if n .RE .RE .sp \-\-itrace .RS 4 Options for decoding instruction tracing data. The options are: .sp .if n .RS 4 .nf i synthesize instructions events b synthesize branches events c synthesize branches events (calls only) r synthesize branches events (returns only) x synthesize transactions events w synthesize ptwrite events p synthesize power events e synthesize error events d create a debug log g synthesize a call chain (use with i or x) l synthesize last branch entries (use with i or x) s skip initial number of events .fi .if n .RE .sp .if n .RS 4 .nf The default is all events i.e. the same as \-\-itrace=ibxwpe, except for perf script where it is \-\-itrace=ce .fi .if n .RE .sp .if n .RS 4 .nf In addition, the period (default 100000, except for perf script where it is 1) for instructions events can be specified in units of: .fi .if n .RE .sp .if n .RS 4 .nf i instructions t ticks ms milliseconds us microseconds ns nanoseconds (default) .fi .if n .RE .sp .if n .RS 4 .nf Also the call chain size (default 16, max. 1024) for instructions or transactions events can be specified. .fi .if n .RE .sp .if n .RS 4 .nf Also the number of last branch entries (default 64, max. 1024) for instructions or transactions events can be specified. .fi .if n .RE .sp .if n .RS 4 .nf It is also possible to skip events generated (instructions, branches, transactions, ptwrite, power) at the beginning. This is useful to ignore initialization code. .fi .if n .RE .sp .if n .RS 4 .nf \-\-itrace=i0nss1000000 .fi .if n .RE .sp .if n .RS 4 .nf skips the first million instructions. .fi .if n .RE .sp .if n .RS 4 .nf To disable decoding entirely, use \-\-no\-itrace. .fi .if n .RE .RE .sp \-\-full\-source\-path .RS 4 Show the full path for source files for srcline output. .RE .sp \-\-show\-ref\-call\-graph .RS 4 When multiple events are sampled, it may not be needed to collect callgraphs for all of them. The sample sites are usually nearby, and it\(cqs enough to collect the callgraphs on a reference event. So user can use "call\-graph=no" event modifier to disable callgraph for other events to reduce the overhead. However, perf report cannot show callgraphs for the event which disable the callgraph. This option extends the perf report to show reference callgraphs, which collected by reference event, in no callgraph event. .RE .sp \-\-socket\-filter .RS 4 Only report the samples on the processor socket that match with this filter .RE .sp \-\-samples=N .RS 4 Save N individual samples for each histogram entry to show context in perf report tui browser. .RE .sp \-\-raw\-trace .RS 4 When displaying traceevent output, do not use print fmt or plugins. .RE .sp \-\-hierarchy .RS 4 Enable hierarchical output. .RE .sp \-\-inline .RS 4 If a callgraph address belongs to an inlined function, the inline stack will be printed. Each entry is function name or file/line. Enabled by default, disable with \-\-no\-inline. .RE .sp \-\-mmaps .RS 4 Show \-\-tasks output plus mmap information in a format similar to /proc//maps. .sp .if n .RS 4 .nf Please note that not all mmaps are stored, options affecting which ones are include \(aqperf record \-\-data\(aq, for instance. .fi .if n .RE .RE .sp \-\-ns .RS 4 Show time stamps in nanoseconds. .RE .sp \-\-stats .RS 4 Display overall events statistics without any further processing. (like the one at the end of the perf report \-D command) .RE .sp \-\-tasks .RS 4 Display monitored tasks stored in perf data. Displaying pid/tid/ppid plus the command string aligned to distinguish parent and child tasks. .RE .sp \-\-percent\-type .RS 4 Set annotation percent type from following choices: global\-period, local\-period, global\-hits, local\-hits .sp .if n .RS 4 .nf The local/global keywords set if the percentage is computed in the scope of the function (local) or the whole data (global). The period/hits keywords set the base the percentage is computed on \- the samples period or the number of samples (hits). .fi .if n .RE .RE .sp \-\-time\-quantum .RS 4 Configure time quantum for time sort key. Default 100ms. Accepts s, us, ms, ns units. .RE .SH "OVERHEAD CALCULATION" .sp The overhead can be shown in two columns as \fIChildren\fP and \fISelf\fP when perf collects callchains. The \fIself\fP overhead is simply calculated by adding all period values of the entry \- usually a function (symbol). This is the value that perf shows traditionally and sum of all the \fIself\fP overhead values should be 100%. .sp The \fIchildren\fP overhead is calculated by adding all period values of the child functions so that it can show the total overhead of the higher level functions even if they don\(cqt directly execute much. \fIChildren\fP here means functions that are called from another (parent) function. .sp It might be confusing that the sum of all the \fIchildren\fP overhead values exceeds 100% since each of them is already an accumulation of \fIself\fP overhead of its child functions. But with this enabled, users can find which function has the most overhead even if samples are spread over the children. .sp Consider the following example; there are three functions like below. .sp .if n .RS 4 .nf void foo(void) { /* do something */ } void bar(void) { /* do something */ foo(); } int main(void) { bar() return 0; } .fi .if n .RE .sp In this case \fIfoo\fP is a child of \fIbar\fP, and \fIbar\fP is an immediate child of \fImain\fP so \fIfoo\fP also is a child of \fImain\fP. In other words, \fImain\fP is a parent of \fIfoo\fP and \fIbar\fP, and \fIbar\fP is a parent of \fIfoo\fP. .sp Suppose all samples are recorded in \fIfoo\fP and \fIbar\fP only. When it\(cqs recorded with callchains the output will show something like below in the usual (self\-overhead\-only) output of perf report: .sp .if n .RS 4 .nf Overhead Symbol \&........ ..................... 60.00% foo | \-\-\- foo bar main __libc_start_main 40.00% bar | \-\-\- bar main __libc_start_main .fi .if n .RE .sp When the \-\-children option is enabled, the \fIself\fP overhead values of child functions (i.e. \fIfoo\fP and \fIbar\fP) are added to the parents to calculate the \fIchildren\fP overhead. In this case the report could be displayed as: .sp .if n .RS 4 .nf Children Self Symbol \&........ ........ .................... 100.00% 0.00% __libc_start_main | \-\-\- __libc_start_main 100.00% 0.00% main | \-\-\- main __libc_start_main 100.00% 40.00% bar | \-\-\- bar main __libc_start_main 60.00% 60.00% foo | \-\-\- foo bar main __libc_start_main .fi .if n .RE .sp In the above output, the \fIself\fP overhead of \fIfoo\fP (60%) was add to the \fIchildren\fP overhead of \fIbar\fP, \fImain\fP and \fI_\(rs_libc_start_main\fP. Likewise, the \fIself\fP overhead of \fIbar\fP (40%) was added to the \fIchildren\fP overhead of \fImain\fP and \fI\(rs_\(rs_libc_start_main\fP. .sp So \fI\(rs_\(rs_libc_start_main\fP and \fImain\fP are shown first since they have same (100%) \fIchildren\fP overhead (even though they have zero \fIself\fP overhead) and they are the parents of \fIfoo\fP and \fIbar\fP. .sp Since v3.16 the \fIchildren\fP overhead is shown by default and the output is sorted by its values. The \fIchildren\fP overhead is disabled by specifying \-\-no\-children option on the command line or by adding \fIreport.children = false\fP or \fItop.children = false\fP in the perf config file. .SH "SEE ALSO" .sp perf\-stat(1), perf\-annotate(1), perf\-record(1)