Performance analyzing tool in Linux, also called perf_events; originally "Performance Counters for Linux", PCL (not to confuse with "Printer Command Language" nor "Point Cloud Library").
From perf.wiki.kernel.org:
perfbegan as a tool for using the performance counters subsystem in Linux, and has had various enhancements to add tracing capabilities.Performance counters are CPU hardware registers that count hardware events such as instructions executed, cache-misses suffered, or branches mispredicted. They form a basis for profiling applications to trace dynamic control flow and identify hotspots.
perfprovides rich generalized abstractions over hardware specific capabilities. Among others, it provides per task, per CPU and per-workload counters, sampling on top of these and source code event annotation.
Perf is natively supported in popular Linux distributions, including Red Hat Enterprise Linux and Debian (linux-tools package).
perf is used with several subcommands (short, non-exhaustive list):
stat: runs a command and gather performance counter statistics;top: displays top-like dynamic view of hottest functions;record: runs a command and records its profile intoperf.data;report: analyzes file generated byperf record; can generate flat, or graph profile;annotate: readsperf.data(created byperf record) and displays annotated code.
Example output of sudo perf stat tree /proc:
# started on Mon Aug 15 23:52:19 2016
Performance counter stats for 'tree /proc':
3929,205496 task-clock # 0,681 CPUs utilized
79325 context-switches # 0,020 M/sec
33 CPU-migrations # 0,000 M/sec
273 page-faults # 0,000 M/sec
5745409809 cycles # 1,462 GHz [49,96%]
<not supported> stalled-cycles-frontend
<not supported> stalled-cycles-backend
1465748665 instructions # 0,26 insns per cycle [74,84%]
329884771 branches # 83,957 M/sec [75,30%]
36420135 branch-misses # 11,04% of all branches [74,74%]
5,765637169 seconds time elapsed