17main(
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 );
add PAPI preset or native hardware event to an event set
Create a new empty PAPI EventSet.
Empty and destroy an EventSet.
Get the event's name and description info.
initialize the PAPI library.
Produces a string on standard error, describing the last library error.
removes a hardware event from a PAPI event set.
Start counting hardware events in an event set.
Stop counting hardware events in an event set.
static long long values[NUM_EVENTS]
#define PAPI_MAX_PRESET_EVENTS
Return codes and api definitions.
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)
void test_warn(const char *file, int line, const char *call, int retval)
char symbol[PAPI_HUGE_STR_LEN]