Home

papi

PAPI, or Performance API, is an open-source library that provides a portable interface to hardware performance counters found in modern CPUs and other architectures. It standardizes access to events such as processor cycles, instructions retired, cache misses, branch mispredictions, and memory-level events, enabling performance tools and applications to collect timing and architectural data across platforms without bespoke code.

The library exposes a C API with Fortran and other language wrappers. Programmers create an event set,

Platform support spans Linux, Windows, and macOS, with back-end components for x86, ARM, POWER, SPARC, and other

PAPI originated in the high-performance computing community in the late 1990s and is maintained by an open-source

PAPI is used by a variety of performance analysis tools, benchmarks, and research programs to gather consistent,

attach
hardware
counters,
and
use
start,
stop,
read,
and
accumulate
operations
to
measure
counters
over
a
code
region.
PAPI
also
supports
multiplexing,
allowing
more
events
to
be
measured
than
there
are
counters
by
time-slicing
across
measurements.
architectures.
Each
platform
provides
a
PAPI
component
that
maps
the
generic
events
to
the
native
performance-counter
names.
project
with
broad
community
involvement.
It
is
released
under
a
BSD-style
license
and
distributed
with
source
and
prebuilt
binaries
for
major
operating
systems.
architecture-aware
measurements.
It
serves
as
a
foundation
for
portable
performance
instrumentation
and
enables
comparative
studies
across
hardware
generations.