Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
| 2 | #ifndef _PERF_SYS_H |
| 3 | #define _PERF_SYS_H |
| 4 | |
| 5 | #include <unistd.h> |
| 6 | #include <sys/types.h> |
| 7 | #include <sys/syscall.h> |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 8 | #include <linux/compiler.h> |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 9 | |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 10 | struct perf_event_attr; |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 11 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 12 | static inline int |
| 13 | sys_perf_event_open(struct perf_event_attr *attr, |
| 14 | pid_t pid, int cpu, int group_fd, |
| 15 | unsigned long flags) |
| 16 | { |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 17 | return syscall(__NR_perf_event_open, attr, pid, cpu, |
| 18 | group_fd, flags); |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 19 | } |
| 20 | |
| 21 | #endif /* _PERF_SYS_H */ |