17int main(
int argc,
char **argv ) {
22 char *uncore_event=NULL;
31 printf(
"Testing creating an uncore event using PAPI_set_opt() to specify CPU\n");
44 printf(
"perf_event_uncore component not found\n");
46 test_skip(__FILE__,__LINE__,
"perf_event_uncore component not found",0);
53 printf(
"perf_event_uncore component is disabled\n");
55 test_skip(__FILE__,__LINE__,
"uncore component disabled",0);
60 if (uncore_event==NULL) {
62 printf(
"uncore event name not available\n");
65 "PAPI does not support uncore on this processor",
88 printf(
"Could not cpu attach\n");
91 "this test; trying to PAPI_CPU_ATTACH; need to run as root",
106 "this test; trying to set PAPI_GRN_SYS",
121 printf(
"could not set PAPI_DOM_ALL\n");
124 "this test; trying to set PAPI_DOM_ALL; need to run as root",
132 printf(
"Error trying to use event %s\n", uncore_event);
153 printf(
"\tUsing event %s\n",uncore_event);
154 printf(
"\t%s: %lld\n",uncore_event,
values[0]);
add PAPI preset or native hardware event by name to an EventSet
Assign a component index to an existing but empty EventSet.
Create a new empty PAPI EventSet.
returns the component index for the named component
get information about a specific software component
initialize the PAPI library.
Set PAPI library or event set options.
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)
char * get_uncore_event(char *event, int size)
A pointer to the following is passed to PAPI_set/get_opt()