17 int main(
int argc,
char **argv ) {
22 char *uncore_event=NULL;
31 printf(
"Testing the :cpu=0 way of attaching an uncore event to a core\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",
69 sprintf(uncore_event,
"%s:cpu=0",uncore_event);
81 printf(
"Error trying to use event %s\n", uncore_event);
102 printf(
"\tUsing event %s\n",uncore_event);
103 printf(
"\t%s: %lld\n",uncore_event,
values[0]);
char event_name[2][PAPI_MAX_STR_LEN]
int PAPI_stop(int EventSet, long long *values)
const PAPI_component_info_t * PAPI_get_component_info(int cidx)
void test_pass(const char *filename)
Return codes and api definitions.
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)
int main(int argc, char **argv)
int PAPI_create_eventset(int *EventSet)
char * get_uncore_event(char *event, int size)
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)
static long long values[NUM_EVENTS]