perf

performance analysis tools for Linux

TLDR

Display basic performance counter stats for a command

>_ perf stat [gcc hello.c]
copy

Display system-wide real time performance counter profile

>_ sudo perf top
copy

Run a command and record its profile into "perf.data"

>_ sudo perf record [command]
copy

Read "perf.data" (created by perf record) and display the profile

>_ sudo perf report
copy

SYNOPSIS

perf [--version] [--help] COMMAND [ARGS]

DESCRIPTION

Performance counters for Linux are are a new kernel-based subsystem that provide a framework for all things performance analysis. It cov‐ ers hardware level (CPU/PMU, Performance Monitoring Unit) features and software features (software counters, tracepoints) as well. Each version of the perf tools may depend on new kernel features, so you must install a different version for each kernel version. The perf command will automatically run the correct version for the running ker‐ nel version.

SEE ALSO

perf_version(1) 4 July 2010 PERF(1)

Copied to clipboard
free 100$ digital ocean credit