Using the perf
tool centers around the following concepts:
- events - these are hardware interrupts, hardware counters, or software events can be tracked
- targets - while these CPUs, processes, or threads are executing, events will be tracked (tracking is disabled otherwise)
- filters - these are predicates on event contexts used to control which events are tracked in which contexts
As I understand it, perf
can operate in two main modes (as indicated by the perf stat
and perf record
subcommands):