21{
22
26 int code;
28 int total_events=0;
29 int r;
31
32
34
35
39 }
40
42 printf("Trying all vmware events\n");
43 }
44
45
46
48
49 for(cid=0; cid<numcmp; cid++) {
50
52 test_fail(__FILE__, __LINE__,
"PAPI_get_component_info failed\n", 0);
53 }
54
55 if (strstr(cmpinfo->
name,
"vmware")) {
56 if (!
TESTS_QUIET) printf(
"\tFound vmware component %d - %s\n", cid, cmpinfo->
name);
57 }
58 else {
59 continue;
60 }
61
63
64
65
67
69
71
74 printf("Error getting event info\n");
76 "PAPI_get_event_info",
retval );
77 }
78
81 printf("Error translating %#x\n",code);
83 "PAPI_event_code_to_name",
retval );
84 }
85
87
89
93 "PAPI_create_eventset()",
retval);
94 }
95
99 "PAPI_add_event()",
retval);
100 }
101
102
106 }
107
108
109 usleep(100);
110
111
115 }
116
119
123 "PAPI_cleanup_eventset()",
retval);
124 }
125
129 "PAPI_destroy_eventset()",
retval);
130 }
131
132 total_events++;
133
135 }
136 }
137
138 if (total_events==0) {
139 test_skip(__FILE__,__LINE__,
"No vmware events found",0);
140 }
141
143 printf("\n");
144 }
145
147
148 return 0;
149}
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
Get the event's name and description info.
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]
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]
char units[PAPI_MIN_STR_LEN]
#define NUM_EVENTS
Tests basic vmware functionality.