19#define LARGE_NAME_SIZE 4096
24main(
int argc,
char **argv )
27 int i, k, err_count = 0;
46 printf(
"Test adding invalid events.\n");
58 printf(
"+ Simple invalid event\t");
64 printf(
"Unexpectedly opened!\n");
69 if (!
quiet) printf(
"OK\n");
74 printf(
"+ Extra colons\t");
80 printf(
"Unexpectedly opened!\n");
85 if (!
quiet) printf(
"OK\n");
91 printf(
"+ Large invalid event\t");
100 printf(
"Unexpectedly opened!\n");
105 if (!
quiet) printf(
"OK\n");
110 printf(
"+ Large unterminated invalid event\t");
118 printf(
"Unexpectedly opened!\n");
123 if (!
quiet) printf(
"OK\n");
129 printf(
"+ Randomly modifying valid events\t");
135 for( cid = 0; cid < numcmp; cid++ ) {
139 if (cmpinfo == NULL) {
140 test_fail( __FILE__, __LINE__,
"PAPI_get_component_info", 2 );
165 if (strstr(info1.
symbol,
"perf_raw")) {
171 if (strlen(info1.
symbol)>5) {
177 printf(
"Unexpectedly opened %s!\n",
190 if (strlen(info.
symbol)>5) {
196 printf(
"Unexpectedly opened %s!\n",
212 printf(
"%d Invalid events added.\n", err_count );
214 test_fail( __FILE__, __LINE__,
"Invalid events added", 1 );
add PAPI preset or native hardware event by name to an EventSet
Create a new empty PAPI EventSet.
Enumerate PAPI preset or native events for a given component.
get information about a specific software component
Get the event's name and description info.
initialize the PAPI library.
Get the number of components available on the system.
char large_name[LARGE_NAME_SIZE]
#define PAPI_NTV_ENUM_UMASKS
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 symbol[PAPI_HUGE_STR_LEN]