55 if (!
quiet) printf(
"Added and Stopped %s successfully.\n",
name );
75 main(
int argc,
char **argv )
78 int i, k, add_count = 0, err_count = 0;
97 printf(
"Test case ALL_NATIVE_EVENTS: Available " 98 "native events and hardware " 103 if ( hwinfo == NULL ) {
104 test_fail( __FILE__, __LINE__,
"PAPI_get_hardware_info", 2 );
110 for( cid = 0; cid < numcmp; cid++ ) {
114 if (cmpinfo == NULL) {
115 test_fail( __FILE__, __LINE__,
"PAPI_get_component_info", 2 );
121 printf(
"Name: %-23s %s\n",
123 printf(
" \\-> Disabled: %s\n",
169 printf(
"\n\nSuccessfully found and added %d events " 170 "(in %d eventsets).\n",
171 add_count , add_count);
175 if (!
quiet) printf(
"Failed to add %d events.\n", err_count );
178 if ( add_count <= 0 ) {
179 test_fail( __FILE__, __LINE__,
"No events added", 1 );
int PAPI_stop(int EventSet, long long *values)
char disabled_reason[PAPI_MAX_STR_LEN]
const PAPI_component_info_t * PAPI_get_component_info(int cidx)
void test_pass(const char *filename)
int PAPI_add_event(int EventSet, int EventCode)
int main(int argc, char **argv)
int PAPI_num_components(void)
Return codes and api definitions.
int PAPI_get_event_info(int EventCode, PAPI_event_info_t *info)
int PAPI_library_init(int version)
char symbol[PAPI_HUGE_STR_LEN]
static int check_event(int event_code, char *name, int quiet)
char name[PAPI_MAX_STR_LEN]
int PAPI_enum_cmp_event(int *EventCode, int modifier, int cidx)
int PAPI_cleanup_eventset(int EventSet)
int PAPI_create_eventset(int *EventSet)
int tests_quiet(int argc, char **argv)
void test_fail(const char *file, int line, const char *call, int retval)
char description[PAPI_MAX_STR_LEN]
int PAPI_destroy_eventset(int *EventSet)
int PAPI_start(int EventSet)
void PAPI_perror(const char *msg)
const PAPI_hw_info_t * PAPI_get_hardware_info(void)
static long long values[NUM_EVENTS]