20int main (
int argc,
char **argv)
43 printf(
"Trying all stealtime events\n");
48 for(cid=0; cid<numcmp; cid++) {
51 test_fail(__FILE__, __LINE__,
"PAPI_get_component_info failed\n", 0);
54 if (strstr(cmpinfo->
name,
"stealtime")) {
55 if (!
quiet) printf(
"\tFound stealtime component %d - %s\n", cid, cmpinfo->
name);
68 printf(
"Error translating %#x\n",code);
70 "PAPI_event_code_to_name",
retval );
80 "PAPI_create_eventset()",
retval);
86 "PAPI_add_event()",
retval);
104 "PAPI_cleanup_eventset()",
retval);
110 "PAPI_destroy_eventset()",
retval);
119 if (total_events==0) {
120 test_skip(__FILE__,__LINE__,
"No stealtime events found",0);
124 printf(
"Note: for this test the values are expected to all be 0\n\t unless run inside a VM on a busy system.\n");
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.
Convert a numeric hardware event code to a name.
get information about a specific software component
initialize the PAPI library.
Get the number of components available on the system.
Start counting hardware events in an event set.
Stop counting hardware events in an event set.
char event_name[2][PAPI_MAX_STR_LEN]
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)
void PAPI_NORETURN test_skip(const char *file, int line, const char *call, int retval)
#define NUM_EVENTS
Tests basic stealtime functionality.
char name[PAPI_MAX_STR_LEN]