From PAPIDocs
Jump to: navigation, search


  • PAPI-C - Component Based Performance Application Programming Interface


The PAPI Performance Application Programming Interface provides machine and operating system independent access to hardware performance counters found on most modern processors. Any of over 100 preset events can be counted through either a simple high level programming interface or a more complete low level interface from either C or Fortran. A list of the function calls in these interfaces is given below, with references to other pages for more complete details. For general information on the Fortran interface see: PAPIF(3)


Component PAPI

Beginning with version 3.9, PAPI supports extensions to count performance information on multiple simultaneous components. This capability is only provided in the low level interface. New or modified function calls are suffixed with an asterisk.

PAPI Presets

An extensive list of predefined events is implemented on all systems where they can be supported. For a list of these events, see: PAPI_presets(3)

PAPI Native Events

PAPI also supports interface functions for discovering the native events on a given platform. For more information on native events, see: PAPI_native(3)

High Level Functions

A simple interface for instrumenting end-user applications. Fully supported on both C and Fortran. See individual functions for details on usage.

Note that the high-level interface is self-initializing. You can mix high and low level calls, but you must call either PAPI_library_init (3) or a high level routine before calling a low level routine.

Low Level Functions

Advanced interface for all applications and performance tools. Some functions may be implemented only for C or Fortran. See individual functions for details on usage and support.

PAPI Utility Commands

A collection of simple utility commands is available in the \\utils directory. See individual utilities for details on usage.

  • papi_avail(1) - provides availability and detail information for PAPI preset events
  • papi_clockres(1) - provides availability and detail information for PAPI preset events
  • papi_cost(1) - provides availability and detail information for PAPI preset events
  • papi_command_line(1) - executes PAPI preset or native events from the command line
  • papi_decode(1) - decodes PAPI preset events into a csv format suitable for PAPI_encode_events
  • papi_event_chooser(1) - given a list of named events, lists other events that can be counted with them
  • papi_mem_info(1) - provides information on the memory architecture of the current processor
  • papi_native_avail(1) - provides detailed information for PAPI native events

See Also

The PAPI Website: