blob: 7a2264e1e4e1e67f9c96d18eff9c0b609083dc58 [file] [log] [blame]
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00001/* 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 Scullb4b6d4a2019-01-02 15:54:55 +00008#include <linux/compiler.h>
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00009
David Brazdil0f672f62019-12-10 10:32:29 +000010struct perf_event_attr;
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000011
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000012static inline int
13sys_perf_event_open(struct perf_event_attr *attr,
14 pid_t pid, int cpu, int group_fd,
15 unsigned long flags)
16{
Olivier Deprez157378f2022-04-04 15:47:50 +020017 return syscall(__NR_perf_event_open, attr, pid, cpu,
18 group_fd, flags);
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000019}
20
21#endif /* _PERF_SYS_H */