26{
29 long long g1[2];
33
34
36
37
41 }
42
45 }
46
48 if (!
quiet) printf(
"Trouble checking event\n");
49 test_skip( __FILE__, __LINE__,
"PAPI_query_event(PAPI_TOT_INS)",
51 }
52
54 test_fail( __FILE__, __LINE__,
"PAPI_add_event(PAPI_TOT_INS)",
retval );
55
58
61
62
63 eventcode = 0;
64
65
66
67
69 printf("This test expects a 'PAPI Error' to be returned from this PAPI call.\n");
70 }
73
74
76
77
78
79
82
83 if ( strcmp( info1.
symbol,
"PAPI_TOT_INS" ) != 0 )
85 "PAPI_get_event_info symbol value is bogus",
retval );
88 "PAPI_get_event_info long_descr value is bogus",
retval );
89
90 eventcode = 0;
91
92
93
94
95
96
99 }
100
103 "PAPI_event_name_to_code code value is bogus",
retval );
104
107
108 if ( strcmp( info2.
symbol,
"PAPI_TOT_INS" ) != 0 )
110 "PAPI_get_event_info symbol value is bogus",
retval );
113 "PAPI_get_event_info long_descr value is bogus",
retval );
114
116
117 return 0;
118}
add PAPI preset or native hardware event to an event set
Create a new empty PAPI EventSet.
Convert a name to a numeric hardware event code.
Get the event's name and description info.
initialize the PAPI library.
Query if PAPI event exists.
Start counting hardware events in an event set.
Stop counting hardware events in an event set.
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)
char symbol[PAPI_HUGE_STR_LEN]
char long_descr[PAPI_HUGE_STR_LEN]