11 {
12
15 int added=0;
16 int events_tried=0;
17
18
20
21
25 }
26
29 test_fail(__FILE__, __LINE__,
"Multiplex not supported", 1);
30 }
31
33
35 printf("Maximum multiplexed counters=%d\n",max_multiplex);
36 }
37
39 printf("Trying to multiplex as many as possible:\n");
40 }
41
45 }
46
49 test_fail(__FILE__, __LINE__,
"PAPI_assign_eventset_component",
51 }
52
56 }
57
58
61 do {
65 }
66
70 }
71 else {
73 added++;
74 }
75 events_tried++;
76
78
80
82 printf("Added %d of theoretical max %d\n",added,max_multiplex);
83 }
84
85 if (events_tried<max_multiplex) {
87 printf("Ran out of events before we ran out of room\n");
88 }
89 }
90 else if (added!=max_multiplex) {
92 "Couldn't max out multiplexed events", 1);
93 }
94
96
97 return 0;
98
99}
add PAPI preset or native hardware event to an event set
Assign a component index to an existing but empty EventSet.
Create a new empty PAPI EventSet.
Enumerate PAPI preset or native events.
Get the event's name and description info.
Get PAPI library or event set options.
initialize the PAPI library.
Initialize multiplex support in the PAPI library.
Convert a standard event set to a multiplexed event set.
Finish using PAPI and free all related resources.
#define PAPI_MAX_MPX_CTRS
int tests_quiet(int argc, char **argv)
void PAPI_NORETURN test_fail(const char *file, int line, const char *call, int retval)
void PAPI_NORETURN test_pass(const char *filename)
char symbol[PAPI_HUGE_STR_LEN]