1PAPI_remove_event(3)                 PAPI                 PAPI_remove_event(3)
2
3
4

NAME

6       PAPI_remove_event  - remove PAPI preset or native hardware event from an EventSet
7       PAPI_remove_events - remove PAPI presets or native hardware events from an EventSet
8
9

SYNOPSIS

11       C Interface
12       #include <papi.h>
13       int PAPI_remove_event(int EventSet, int EventCode);
14       int PAPI_remove_events(int EventSet, int *EventCode, int number);
15       Fortran Interface
16       #include fpapi.h
17       PAPIF_remove_event(C_INT EventSet, C_INT EventCode, C_INT check)
18       PAPIF_remove_events(C_INT EventSet, C_INT(*) EventCode, C_INT number, C_INT check)
19
20

DESCRIPTION

22       PAPI_remove_event()  removes  a  hardware  event  to  a PAPI event set.
23       PAPI_remove_events() does the same, but for an array of hardware  event
24       codes.
25
26       A hardware event can be either a PAPI Preset or a native hardware event
27       code.  For a list of PAPI preset events, see PAPI_presets(3) or run the
28       avail test case in the PAPI distribution. PAPI Presets can be passed to
29       PAPI_query_event(3) to see if they exist on  the  underlying  architec‐
30       ture.   For  a list of native events available on current platform, run
31       native_avail test case in the PAPI distribution. For  the  encoding  of
32       native  events, see PAPI_event_name_to_code(3) to learn how to generate
33       native code for the supported native event on the underlying  architec‐
34       ture."
35
36       It  should  be  noted  that  PAPI_remove_events  can partially succeed,
37       exactly like PAPI_add_events.
38
39

ARGUMENTS

41       EventSet --  an integer handle for a  PAPI  event  set  as  created  by
42       PAPI_create_eventset(3)
43
44       EventCode -- a defined event such as PAPI_TOT_INS or a native event.
45
46       *EventCode -- an array of defined events
47
48       number  --  an  integer  indicating  the  number of events in the array
49       *EventCode
50
51

RETURN VALUES

53       On success, these functions return PAPI_OK.  On error, a less than zero
54       error  code  is  returned  or the the number of elements that succeeded
55       before the error.
56
57

ERRORS

59       Positive integer
60              The number of consecutive elements  that  succeeded  before  the
61              error.
62
63       PAPI_EINVAL
64              One or more of the arguments is invalid.
65
66       PAPI_ENOEVST
67              The EventSet specified does not exist.
68
69       PAPI_EISRUN
70              The EventSet is currently counting events.
71
72       PAPI_ECNFLCT
73              The  underlying  counter  hardware  can not count this event and
74              other events in the EventSet simultaneously.
75
76       PAPI_ENOEVNT
77              The PAPI preset is not available on the underlying hardware.
78
79

EXAMPLES

81       int EventSet = PAPI_NULL;
82       unsigned int native = 0x0;
83
84       if (PAPI_create_eventset(&EventSet) != PAPI_OK)
85         handle_error(1);
86
87       /* Add Total Instructions Executed to our EventSet */
88
89       if (PAPI_add_event(EventSet, PAPI_TOT_INS) != PAPI_OK)
90         handle_error(1);
91
92       /* Start counting */
93
94       if (PAPI_start(EventSet) != PAPI_OK)
95         handle_error(1);
96
97       /* Stop counting, ignore values */
98
99       if (PAPI_stop(EventSet, NULL) != PAPI_OK)
100         handle_error(1);
101
102       /* Remove event */
103
104       if (PAPI_remove_event(EventSet, PAPI_TOT_INS) != PAPI_OK)
105         handle_error(1);
106
107

BUGS

109       The vector function should take a pointer to a  length  argument  so  a
110       proper return value can be set upon partial success.
111
112

SEE ALSO

114       PAPI_preset(3),      PAPI_add_event     (3),    PAPI_add_events    (3),
115       PAPI_cleanup_eventset(3),                     PAPI_destroy_eventset(3),
116       PAPI_event_name_to_code(3)
117
118
119
120PAPI Programmer's Reference     September, 2004           PAPI_remove_event(3)
Impressum