55 if (!
quiet) printf(
"Added and Stopped %s successfully.\n",
name );
75main(
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 );
112 for( cid = 0; cid < numcmp; cid++ ) {
114 if (cid == rocm_id) {
121 if (cmpinfo == NULL) {
122 test_fail( __FILE__, __LINE__,
"PAPI_get_component_info", 2 );
128 printf(
"Name: %-23s %s\n",
130 printf(
" \\-> Disabled: %s\n",
174 printf(
"\n\nSuccessfully found and added %d events "
175 "(in %d eventsets).\n",
176 add_count , add_count);
180 if (!
quiet) printf(
"Failed to add %d events.\n", err_count );
183 if ( add_count <= 0 ) {
184 test_fail( __FILE__, __LINE__,
"No events added", 1 );
static int check_event(int event_code, char *name, int quiet)
add PAPI preset or native hardware event to an event set
Empty and destroy an EventSet.
Create a new empty PAPI EventSet.
Empty and destroy an EventSet.
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.
Produces a string on standard error, describing the last library error.
Start counting hardware events in an event set.
Stop counting hardware events in an event set.
#define PAPI_NTV_ENUM_UMASKS
static long long values[NUM_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)
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]