'\" t .\" Title: perf-trace .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: 04/24/2018 .\" Manual: perf Manual .\" Source: perf .\" Language: English .\" .TH "PERF_3.16\-TRACE" "1" "04/24/2018" "perf" "perf Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" perf-trace \- strace inspired tool .SH "SYNOPSIS" .sp .nf \fIperf trace\fR \fIperf trace record\fR .fi .SH "DESCRIPTION" .sp This command will show the events associated with the target, initially syscalls, but other system events like pagefaults, task lifetime events, scheduling events, etc\&. .sp This is a live mode tool in addition to working with perf\&.data files like the other perf tools\&. Files can be generated using the \fIperf record\fR command but the session needs to include the raw_syscalls events (\-e \fIraw_syscalls:*\fR)\&. Alernatively, the \fIperf trace record\fR can be used as a shortcut to automatically include the raw_syscalls events when writing events to a file\&. .sp The following options apply to perf trace; options to perf trace record are found in the perf record man page\&. .SH "OPTIONS" .PP \-a, \-\-all\-cpus .RS 4 System\-wide collection from all CPUs\&. .RE .PP \-e, \-\-expr .RS 4 List of events to show, currently only syscall names\&. Prefixing with ! shows all syscalls but the ones specified\&. You may need to escape it\&. .RE .PP \-o, \-\-output= .RS 4 Output file name\&. .RE .PP \-p, \-\-pid= .RS 4 Record events on existing process ID (comma separated list)\&. .RE .PP \-t, \-\-tid= .RS 4 Record events on existing thread ID (comma separated list)\&. .RE .PP \-u, \-\-uid= .RS 4 Record events in threads owned by uid\&. Name or number\&. .RE .PP \-v, \-\-verbose= .RS 4 Verbosity level\&. .RE .PP \-\-no\-inherit .RS 4 Child tasks do not inherit counters\&. .RE .PP \-m, \-\-mmap\-pages= .RS 4 Number of mmap data pages (must be a power of two) or size specification with appended unit character \- B/K/M/G\&. The size is rounded up to have nearest pages power of two value\&. .RE .PP \-C, \-\-cpu .RS 4 Collect samples only on 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\&. In per\-thread mode with inheritance mode on (default), Events are captured only when the thread executes on the designated CPUs\&. Default is to monitor all CPUs\&. .RE .sp \-\-duration: Show only events that had a duration greater than N\&.M ms\&. .sp \-\-sched: Accrue thread runtime and provide a summary at the end of the session\&. .sp \-i \-\-input Process events from a given perf data file\&. .sp \-T \-\-time Print full timestamp rather time relative to first sample\&. .PP \-\-comm .RS 4 Show process COMM right beside its ID, on by default, disable with \-\-no\-comm\&. .RE .PP \-s, \-\-summary .RS 4 Show only a summary of syscalls by thread with min, max, and average times (in msec) and relative stddev\&. .RE .PP \-S, \-\-with\-summary .RS 4 Show all syscalls followed by a summary by thread with min, max, and average times (in msec) and relative stddev\&. .RE .PP \-\-tool_stats .RS 4 Show tool stats such as number of times fd\(->pathname was discovered thru hooking the open syscall return + vfs_getname or via reading /proc/pid/fd, etc\&. .RE .SH "SEE ALSO" .sp \fBperf_3.16-record\fR(1), \fBperf_3.16-script\fR(1)