17 main(
int argc,
char **argv )
24 char error_message[BUFSIZ];
30 printf(
"\nTrying all pre-defined events:\n");
51 if ( !( info.
count ) )
59 printf(
"Error adding event %s\n",info.
symbol);
61 printf(
"Probably NMI watchdog related\n");
65 sprintf(error_message,
"Problem adding %s (probably NMI Watchdog related)",info.
symbol);
68 sprintf(error_message,
"Problem adding %s",info.
symbol);
83 if (!
quiet) printf(
"successful\n" );
97 printf(
"Successfully added, started and stopped %d events.\n",
count );
101 if (!
quiet) printf(
"Failed to add, start or stop %d events.\n", err_count );
105 test_fail( __FILE__, __LINE__,
"No events added", 1 );
int PAPI_stop(int EventSet, long long *values)
void test_pass(const char *filename)
int PAPI_add_event(int EventSet, int EventCode)
int PAPI_remove_event(int EventSet, int EventCode)
int main(int argc, char **argv)
void test_warn(const char *file, int line, const char *call, int retval)
Return codes and api definitions.
int PAPI_get_event_info(int EventCode, PAPI_event_info_t *info)
#define PAPI_MAX_PRESET_EVENTS
int PAPI_library_init(int version)
char symbol[PAPI_HUGE_STR_LEN]
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)
int PAPI_destroy_eventset(int *EventSet)
int PAPI_start(int EventSet)
void PAPI_perror(const char *msg)
static long long values[NUM_EVENTS]