7 #include <sys/syscall.h> 8 #include <linux/types.h> 9 #include <linux/compiler.h> 10 #include <linux/perf_event.h> 11 #include <asm/barrier.h> 14 #define CPUINFO_PROC {"cpu"} 18 #define CPUINFO_PROC {"vendor_id"} 22 #define CPUINFO_PROC {"cpu type"} 26 #define CPUINFO_PROC {"cpu"} 30 #define CPUINFO_PROC {"cpu"} 34 #define CPUINFO_PROC {"cpu model"} 38 #define CPUINFO_PROC {"model name", "Processor"} 42 #define CPUINFO_PROC {"cpu model"} 46 #define CPUINFO_PROC {"Processor"} 50 #define CPUINFO_PROC {"core ID"} 54 #define CPUINFO_PROC { "model name", } 59 pid_t
pid,
int cpu,
int group_fd,
64 fd =
syscall(__NR_perf_event_open, attr, pid, cpu,
static int sys_perf_event_open(struct perf_event_attr *attr, pid_t pid, int cpu, int group_fd, unsigned long flags)
void test_attr__open(struct perf_event_attr *attr, pid_t pid, int cpu, int fd, int group_fd, unsigned long flags)