^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) #ifndef _PERF_SYS_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) #define _PERF_SYS_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) #include <unistd.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) #include <sys/types.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) #include <sys/syscall.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) #include <linux/compiler.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) struct perf_event_attr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) static inline int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) sys_perf_event_open(struct perf_event_attr *attr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) pid_t pid, int cpu, int group_fd,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) unsigned long flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) return syscall(__NR_perf_event_open, attr, pid, cpu,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) group_fd, flags);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) #endif /* _PERF_SYS_H */