perf-sys.h 452 B

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