PAPIC:PAPI get event info.3
From PAPIDocs
Jump to: navigation, search


Contents

NAME

  • PAPI_get_event_info - get the event's name and description info

Synopsis

C Interface

#include <papi.h>
int PAPI_get_event_info(int EventCode, PAPI_event_info_t *info);

Fortran Interface

#include fpapi.h
PAPIF_get_event_info(C_INT  EventCode,  C_STRING  symbol,
tC_STRING long_descr, C_STRING  short_descr,  C_INT  count,
tC_STRING event_note, C_INT  flags,, C_INT  check)

Description

In C, this function fills the event information into a structure. In Fortran, some fields of the structure are returned explicitly. This function works with existing PAPI preset and native event codes.

Arguments

The following arguments are implicit in the structure returned by the C function, or explicitly returned by Fortran.

EventCode -- event code(preset or native)

info -- structure with the event information

symbol -- whether the preset is part of the API

long_descr -- detail description about the event

short_descr -- short description about the event

event_note -- notes about the event

Errors

PAPI_EINVAL One or more of the arguments is invalid.

PAPI_ENOTPRESET The PAPI preset mask was set, but the hardware event specified is not a valid PAPI preset.

PAPI_ENOEVNT The PAPI preset is not available on the underlying hardware.

Bugs

This function has no known bugs.

EXAMPLE

 /*Find the event code for PAPI_TOT_INS and its info*/
PAPI_event_name_to_code("PAPI_TOT_INS",&EventCode)
if (PAPI_get_event_info(EventCode, &info) == PAPI_OK)
handle_error(1);

See Also

PAPI_event_name_to_code(3), PAPI_set_event_info(3), PAPIF(3), PAPI(3)