/* check_multiplexing_read.c */ #include #include #include #include #include #include #include #include #include "perf_event.h" #include "test_utils.h" #include "perf_helpers.h" #include "instructions_testcode.h" #define NUM_CPUS 272 #define NUM_EVENTS 2 int fd[NUM_EVENTS][NUM_CPUS]; long long events[NUM_EVENTS]={ PERF_COUNT_HW_CPU_CYCLES, PERF_COUNT_HW_INSTRUCTIONS }; static long long base_results[NUM_CPUS][3]; #define TIME_ENABLED 1 #define TIME_RUNNING 2 static int test_routine(void) { int i,result; printf("--- million instructions ---\n"); for(i=0;i<1;i++) { result=instructions_million(); } return result; } void alloc_events(long long config, int fd[NUM_CPUS]) { int ret,i,j; struct perf_event_attr pe; for(j=0;j