76{
77
78 int i, k, add_count = 0, err_count = 0;
83 int event_code;
84 int numcmp, cid;
86
87
89
90
94 }
95
97 printf("Test case ALL_NATIVE_EVENTS: Available "
98 "native events and hardware "
99 "information.\n");
100 }
101
103 if ( hwinfo == NULL ) {
104 test_fail( __FILE__, __LINE__,
"PAPI_get_hardware_info", 2 );
105 }
106
108
110
111
112 for( cid = 0; cid < numcmp; cid++ ) {
113
114 if (cid == rocm_id) {
115
116
117 continue;
118 }
119
121 if (cmpinfo == NULL) {
122 test_fail( __FILE__, __LINE__,
"PAPI_get_component_info", 2 );
123 }
124
125
128 printf( "Name: %-23s %s\n",
130 printf(" \\-> Disabled: %s\n",
132 }
133 continue;
134 }
135
136
137
140
141 do {
145 add_count++;
146 }
147 else {
148 err_count++;
149 }
150
151
152
153
154
157 do {
161 add_count++;
162 }
163 else {
164 err_count++;
165 }
167 }
168
170
171 }
172
174 printf( "\n\nSuccessfully found and added %d events "
175 "(in %d eventsets).\n",
176 add_count , add_count);
177 }
178
179 if ( err_count ) {
180 if (!
quiet) printf(
"Failed to add %d events.\n", err_count );
181 }
182
183 if ( add_count <= 0 ) {
184 test_fail( __FILE__, __LINE__,
"No events added", 1 );
185 }
186
188
189 return 0;
190}
static int check_event(int event_code, char *name, int quiet)
Enumerate PAPI preset or native events for a given component.
returns the component index for the named component
get information about a specific software component
Get the event's name and description info.
get information about the system hardware
initialize the PAPI library.
Get the number of components available on the system.
#define PAPI_NTV_ENUM_UMASKS
int tests_quiet(int argc, char **argv)
void PAPI_NORETURN test_pass(const char *filename)
char description[PAPI_MAX_STR_LEN]
char name[PAPI_MAX_STR_LEN]
char disabled_reason[PAPI_HUGE_STR_LEN]
char symbol[PAPI_HUGE_STR_LEN]