1PAPI_get_event_info(3) PAPI PAPI_get_event_info(3)
2
3
4
6 PAPI_get_event_info - get the event's name and description info
7
8
10 C Interface
11 #include <papi.h>
12 int PAPI_get_event_info(int EventCode, PAPI_event_info_t *info);
13 Fortran Interface
14 #include fpapi.h
15 PAPIF_get_event_info(C_INT EventCode, C_STRING symbol,
16 C_STRING long_descr, C_STRING short_descr, C_INT count,
17 C_STRING event_note, C_INT flags,, C_INT check)
18
19
21 In C, this function fills the event information into a structure. In
22 Fortran, some fields of the structure are returned explicitly. This
23 function works with existing PAPI preset and native event codes.
24
25
27 The following arguments are implicit in the structure returned by the C
28 function, or explicitly returned by Fortran.
29
30 EventCode -- event code(preset or native)
31
32 info -- structure with the event information
33
34 symbol -- whether the preset is part of the API
35
36 long_descr -- detail description about the event
37
38 short_descr -- short description about the event
39
40 event_note -- notes about the event
41
42
44 On success, the C function returns PAPI_OK, and the Fortran function
45 returns PAPI_OK.
46 On error, a non-zero error code is returned by the function.
47
48
50 PAPI_EINVAL
51 One or more of the arguments is invalid.
52
53 PAPI_ENOTPRESET
54 The PAPI preset mask was set, but the hardware event specified
55 is not a valid PAPI preset.
56
57 PAPI_ENOEVNT
58 The PAPI preset is not available on the underlying hardware.
59
60
61
62
64 /*Find the event code for PAPI_TOT_INS and its info*/
65 PAPI_event_name_to_code("PAPI_TOT_INS",&EventCode)
66 if (PAPI_get_event_info(EventCode, &info) == PAPI_OK)
67 handle_error(1);
68
69
71 This function has no known bugs.
72
73
75 PAPI(3), PAPIF(3), PAPI_set_event_info(3), PAPI_event_name_to_code(3)
76
77
78
79PAPI Programmer's Reference September, 2004 PAPI_get_event_info(3)