The most commonly used perf commands are: annotate Read perf.data (created by perf record) and display annotated code archive Create archive with object files with build-ids found in perf.data file bench General framework for benchmark suites buildid-cache Manage build-id cache. buildid-list List the buildids in a perf.data file c2c Shared Data C2C/HITM Analyzer. config Get and set variables in a configuration file. daemon Run record sessions on background data Data file related processing diff Read perf.data files and display the differential profile evlist List the event names in a perf.data file ftrace simple wrapper for kernel's ftrace functionality inject Filter to augment the events stream with additional information iostat Show I/O performance metrics kallsyms Searches running kernel for symbols kmem Tool to trace/measure kernel memory properties kvm Tool to trace/measure kvm guest os list List all symbolic event types lock Analyze lock events mem Profile memory accesses record Run a command and record its profile into perf.data report Read perf.data (created by perf record) and display the profile sched Tool to trace/measure scheduler properties (latencies) script Read perf.data (created by perf record) and display trace output stat Run a command and gather performance counter statistics test Runs sanity tests. timechart Tool to visualize total system behavior during a workload top System profiling tool. version display the version of perf binary probe Define new dynamic tracepoints trace strace inspired tool
See 'perf help COMMAND' for more information on a specific command.
Usage: perf record [<options>] [<command>] or: perf record [<options>] -- <command> [<options>]
-a, --all-cpus system-wide collection from all CPUs -b, --branch-any sample any taken branches -B, --no-buildid do not collect buildids in perf.data -c, --count <n> event period to sample -C, --cpu <cpu> list of cpus to monitor -d, --data Record the sample addresses -D, --delay <n> ms to wait before starting measurement after program start (-1: start with events disabled) -e, --event <event> event selector. use 'perf list' to list available events -F, --freq <freq or 'max'> profile at this frequency -g enables call-graph recording -G, --cgroup <name> monitor event in cgroup name only -I, --intr-regs[=<any register>] sample selected machine registers on interrupt, use '-I?' to list register names -i, --no-inherit child tasks do not inherit counters -j, --branch-filter <branch filter mask> branch stack filter modes -k, --clockid <clockid> clockid to use for events, see clock_gettime() -m, --mmap-pages <pages[,pages]> number of mmap data pages and AUX area tracing mmap pages -N, --no-buildid-cache do not update the buildid cache -n, --no-samples don't sample -o, --output <file> output file name -P, --period Record the sample period -p, --pid <pid> record events on existing process id -q, --quiet don't print any message -R, --raw-samples collect raw sample records from all opened counters -r, --realtime <n> collect data with this RT SCHED_FIFO priority -S, --snapshot[=<opts>] AUX area tracing Snapshot Mode -s, --stat per thread counts -t, --tid <tid> record events on existing thread id -T, --timestamp Record the sample timestamps -u, --uid <user> user to profile -v, --verbose be more verbose (show counter open errors, etc) -W, --weight sample by weight (on special events only) --affinity <node|cpu> Set affinity mask of trace reading thread to NUMA node cpu mask or cpu of processed mmap buffer --aio[=<n>] Use <n> control blocks in asynchronous trace writing mode (default: 1, max: 4) --all-cgroups Record cgroup events --all-kernel Configure all used events to run in kernel space. --all-user Configure all used events to run in user space. --aux-sample[=<opts>]