In
computer science
Computer science is the study of computation, automation, and information. Computer science spans theoretical disciplines (such as algorithms, theory of computation, information theory, and automation) to Applied science, practical discipli ...
, Performance Application Programming Interface (PAPI) is a portable
interface (in the form of a
library
A library is a collection of materials, books or media that are accessible for use and not just for display purposes. A library provides physical (hard copies) or digital access (soft copies) materials, and may be a physical location or a vir ...
) to
hardware performance counters on modern
microprocessor
A microprocessor is a computer processor where the data processing logic and control is included on a single integrated circuit, or a small number of integrated circuits. The microprocessor contains the arithmetic, logic, and control circu ...
s. It is being widely used to collect low level performance metrics (e.g.
instruction counts,
clock cycles,
cache miss
In computing, a cache ( ) is a hardware or software component that stores data so that future requests for that data can be served faster; the data stored in a cache might be the result of an earlier computation or a copy of data stored elsewher ...
es) of computer systems running
UNIX
Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, and ot ...
/
Linux
Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, which ...
operating system
An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs.
Time-sharing operating systems schedule tasks for efficient use of the system and may also in ...
s.
PAPI provides predefined high level hardware events summarized from popular processors and direct access to low level native events of one particular processor. Counter
multiplexing
In telecommunications and computer networking, multiplexing (sometimes contracted to muxing) is a method by which multiple analog or digital signals are combined into one signal over a shared medium. The aim is to share a scarce resource - a ...
and
overflow handling are also supported.
Operating system
An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs.
Time-sharing operating systems schedule tasks for efficient use of the system and may also in ...
support for accessing hardware counters is needed to use PAPI.
For example, prior to 2010, a
Linux/x86 kernel had to be patched with a performance monitoring counters driver (perfct
link to support PAPI.
Since Linux version 2.6.32, and PAPI 2010 releases, PAPI can leverage the existing perf subsystem in Linux, and thus does not need any out of tree driver to be functional anymore.
Supported Operating Systems and requirements are listed in the official repository's documentatio
INSTALL.txt
See also
*
Performance analysis
Further reading
A Portable Programming Interface for Performance Evaluation on Modern Processors/ International Journal of High Performance Computing Applications archive Volume 14 Issue 3, August 2000, Pages 189-204
doi:10.1177/109434200001400303
* Dongarra, Jack, et al.
Using PAPI for hardware performance monitoring on Linux systems // Conference on Linux Clusters: The HPC Revolution. Vol. 5. Linux Clusters Institute, 2001.
External links
* Philip Mucci
Performance Monitoring with PAPI/ Dr.Dobbs, June 01, 2005
Development of a PAPI Backend for the Sun Niagara 2 Processor 2009
{{compu-library-stub
Profilers
Software optimization