perf (Linux)
GNU GPL | |
---|---|
Website | perf |
perf (sometimes called perf_eventsperf
, is accessed from the command line and provides a number of subcommands
It supports
Implementation
The interface between the perf utility and the kernel consists of only one
As of 2010[update], architectures that provide support for hardware counters include
Perf is natively supported in many popular Linux distributions, including Red Hat Enterprise Linux (since its version 6 released in 2010)[11] and Debian in the linux-tools-common package (since Debian 6.0 (Squeeze) released in 2011).[12]
Subcommands
perf is used with several subcommands:
stat
: measure total event count for single program or for system for some timetop
:top-like dynamic view of hottest functionsrecord
: measure and save sampling data for single program[13]report
: analyze file generated by perf record; can generate flat, or graph profile.[13]annotate
: annotate sources or assemblysched
: tracing/measuring of scheduler actions and latencies[14]list
: list available events
Criticism
The documentation of perf is not very detailed (as of 2014); for example, it does not document most events or explain their aliases (often external tools are used to get names and codes of events[15]).[16] Perf tools also cannot profile based on true wall-clock time.[16]
Security
The perf subsystem of Linux kernels from 2.6.37 up to 3.8.8 and RHEL6 kernel 2.6.32 contained a security vulnerability (
See also
- List of performance analysis tools
- OProfile
- Performance Application Programming Interface
- Profiling (computer programming)
References
- ^ Vince Weaver, The Unofficial Linux Perf Events Web-Page
- ^ Linux perf event Features and Overhead // 2013 FastPath Workshop, Vince Weaver
- ^ Jake Edge, Perfcounters added to the mainline, LWN July 1, 2009, "perfcounters being included into the mainline during the recently completed 2.6.31 merge window"
- ^ a b Arnaldo Carvalho de Melo, The New Linux ’perf’ tools, presentation from Linux Kongress, September, 2010
- ^ A. Zanella, R. Arnold. Evaluate performance for Linux on POWER. Analyze performance using Linux tools, 12 Jun 2012 // IBM DeveloperWorks Technical library
- ^ , 16 June 2011, presentation from "Future computing in particle physics" conference
- ^ Intel® 64 and IA-32 Architectures Software Developer's Manual Volume 3B: System Programming Guide, Part 2. Intel. June 2009. p. 19-2 vol. 3.
- ^ Jake Edge (2014-04-09). "Lots of new perf features". LWN.net. Retrieved 2014-04-22.
- ^ Jacob Pan (2013-04-02). "RAPL (Running Average Power Limit) driver". LWN.net. Retrieved 2014-04-22.
- ^ "kernel/git/torvalds/linux.git - Linux kernel source tree". Git.kernel.org. 2014-01-20. Retrieved 2014-03-31.
- ^ 6.4. Performance Counters for Linux (PCL) Tools and perf // RHEL Developer Guide
- ^ "Debian - Details of package linux-tools-2.6.32 in squeeze". Packages.debian.org. Retrieved 2014-03-31.
- ^ a b Urs Fässler
perf file format Archived 2012-12-14 at the CERN OpenLab, 2011
- , 17 Sep 2009
- ^ How to monitor the full range of CPU performance events // Bojan Nikolic, 2012
- ^ a b Robert Haas (PostgreSQL), perf: the good, the bad, the ugly // June 06, 2012
- ^ Michael Larabel (2013-05-15). "New Linux Kernel Vulnerability Exploited". Phoronix.
- ^ corbet (2013-05-15). "Local root vulnerability in the kernel". LWN.
- ^ Joe Damato (2013-05-20). "A closer look at a recent privilege escalation bug in Linux (CVE-2013-2094)".
External links
- perf's wiki on kernel.org
- Arnaldo Carvalho de Melo, The New Linux ’perf’ tools, presentation from Linux Kongress, September, 2010
- Linux kernel profiling with perf tutorial
- Hardware PMU support charts - check perf_event column
- perf Examples by Brendan Gregg