24{
30
31
32
36 }
37
41 }
42
43#if 0
46#endif
50 }
51
52#if 0
55#endif
56
57
58
61 test_fail( __FILE__, __LINE__,
"PAPI_assign_eventset_component",
63 }
64#if 0
67#endif
68
71 test_skip(__FILE__, __LINE__,
"Multiplex not supported", 1);
72 }
75 }
76
78 if ( max_mux > 32 ) max_mux = 32;
79
80#if 0
83#endif
84
85
87 printf( "\nFilling the event set with as many non-derived events as we can...\n" );
88 }
89
91 do {
93 if ( pset.
count && ( strcmp( pset.
derived,
"NOT_DERIVED" ) == 0 ) ) {
96 printf(
"Failed trying to add %s\n",pset.
symbol);
97 break;
98 }
99 else {
101 j++;
102 }
103 }
104 }
106 ( j < max_mux ) );
107
108 if (j==0) {
110 test_skip(__FILE__,__LINE__,
"No events",0);
111 }
112
113 events = (
int * ) malloc( (
size_t ) j *
sizeof (
int ) );
115 test_fail( __FILE__, __LINE__,
"malloc events", 0 );
116
117 values = (
long long * ) malloc( (
size_t ) j *
sizeof (
long long ) );
119 test_fail( __FILE__, __LINE__,
"malloc values", 0 );
120
122
123#if 0
126#endif
127
130
132
136
137 nev = j;
141
143 for (
i = 0, allvalid = 0;
i < j;
i++ ) {
147 allvalid++;
148 }
150 printf( "\n" );
151 if ( allvalid ) {
152 printf( "Caution: %d counters had zero values\n", allvalid );
153 }
154 }
155
156 if (allvalid==j) {
157 test_fail( __FILE__, __LINE__,
"All counters returned zero", 5 );
158 }
159
160 for (
i = 0, allvalid = 0;
i < j;
i++ ) {
161 for ( k =
i + 1; k < j; k++ ) {
163 allvalid++;
164 break;
165 }
166 }
167 }
168
170 if ( allvalid ) {
171 printf( "Caution: %d counter pair(s) had identical values\n",
172 allvalid );
173 }
174 }
175
178
182
186
188}
add PAPI preset or native hardware event to an event set
Assign a component index to an existing but empty EventSet.
Empty and destroy an EventSet.
Create a new empty PAPI EventSet.
Empty and destroy an EventSet.
Enumerate PAPI preset or native events.
Convert a numeric hardware event code to a name.
Get the event's name and description info.
Get PAPI library or event set options.
initialize the PAPI library.
list the events in an event set
Initialize multiplex support in the PAPI library.
Set the default counting domain for new event sets bound to the cpu component.
Convert a standard event set to a multiplexed event set.
Start counting hardware events in an event set.
Stop counting hardware events in an event set.
#define PAPI_MAX_MPX_CTRS
char events[MAX_EVENTS][BUFSIZ]
static long long values[NUM_EVENTS]
void PAPI_NORETURN test_fail(const char *file, int line, const char *call, int retval)
void PAPI_NORETURN test_skip(const char *file, int line, const char *call, int retval)
char symbol[PAPI_HUGE_STR_LEN]
char derived[PAPI_MIN_STR_LEN]