Go to the source code of this file.
|
int | main (int argc, char **argv) |
| List all appio events codes and names.
|
|
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
- Author
- Tushar Mohan (adapted for appio from original linux-net code)
test case for the appio component
Definition at line 22 of file appio_list_events.c.
23{
25 int total_events=0;
26 int code;
28 int r;
30
31
33
34
38 }
39
41 printf("Listing all appio events\n");
42 }
43
45
46 for(cid=0; cid<numcmp; cid++) {
47
49 test_fail(__FILE__, __LINE__,
"PAPI_get_component_info failed\n",-1);
50 }
51
52 if ( strstr(cmpinfo->
name,
"appio") == NULL) {
53 continue;
54 }
55
57 printf("Component %d (%d) - %d events - %s\n",
60 }
61
63
66
70 }
71
74 }
75
76 total_events++;
77
79 }
80
81 }
82
83 if (total_events==0) {
84 test_skip(__FILE__,__LINE__,
"No appio events found", 0);
85 }
86
88
89 return 0;
90}
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.
char event_name[2][PAPI_MAX_STR_LEN]
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 name[PAPI_MAX_STR_LEN]