24 char uncore_base[BUFSIZ];
25 char uncore_event[BUFSIZ];
46 printf(
"perf_event_uncore component not found\n");
48 test_skip(__FILE__,__LINE__,
"perf_event_uncore component not found",0);
53 if ( hwinfo == NULL ) {
63 printf(
"No event available\n");
71 printf(
"We only support Intel for now\n");
78 printf(
"Trying for %d sockets\n",hwinfo->
sockets);
79 printf(
"threads %d cores %d ncpus %d\n", hwinfo->
threads,hwinfo->
cores,
89 printf(
"Using core %d for socket %d\n",core_to_use,
i);
104 test_fail(__FILE__, __LINE__,
"PAPI_assign_eventset_component",
retval);
117 printf(
"Problem with PAPI_CPU_ATTACH\n");
120 "this test; trying to PAPI_CPU_ATTACH; need to run as root",
129 sprintf(uncore_event,
"%s%d::%s",uncore_base,j,
event_name);
136 printf(
"Added %s for socket %d\n",uncore_event,
i);
144 for(j=0;j<max_cbox;j++) {
146 printf(
"Starting EventSet %d\n",
EventSet[j][
i]);
152 printf(
"Error starting socket %d cbox %d\n",
i,j);
163 for(j=0;j<max_cbox;j++) {
167 printf(
"Error stopping socket %d cbox %d\n",
i,j);
177 printf(
"Socket %d\n",
i);
178 for(j=0;j<max_cbox;j++) {
char event_name[2][PAPI_MAX_STR_LEN]
int PAPI_stop(int EventSet, long long *values)
void test_pass(const char *filename)
A pointer to the following is passed to PAPI_set/get_opt()
int PAPI_set_opt(int option, PAPI_option_t *ptr)
void test_skip(const char *file, int line, const char *call, int retval)
int PAPI_add_named_event(int EventSet, const char *EventName)
int PAPI_library_init(int version)
int PAPI_get_component_index(const char *name)
char * get_uncore_cbox_event(char *event_name, char *uncore_base, int size)
int PAPI_assign_eventset_component(int EventSet, int cidx)
int PAPI_create_eventset(int *EventSet)
#define PAPI_VENDOR_INTEL
int tests_quiet(int argc, char **argv)
void test_fail(const char *file, int line, const char *call, int retval)
int PAPI_start(int EventSet)
const PAPI_hw_info_t * PAPI_get_hardware_info(void)
static long long values[NUM_EVENTS]