blob: 7a2264e1e4e1e67f9c96d18eff9c0b609083dc58 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Jiri Olsa43599d12014-05-05 12:53:20 +02002#ifndef _PERF_SYS_H
3#define _PERF_SYS_H
4
Jiri Olsa82baa0e2014-05-05 12:58:31 +02005#include <unistd.h>
6#include <sys/types.h>
7#include <sys/syscall.h>
Arnaldo Carvalho de Melo14f06522016-07-18 17:40:49 -03008#include <linux/compiler.h>
Arnaldo Carvalho de Melo91854f92019-08-29 14:59:50 -03009
10struct perf_event_attr;
11
Jiri Olsa82baa0e2014-05-05 12:58:31 +020012static 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{
Jiri Olsa8366f0d2020-08-27 21:32:01 +020017 return syscall(__NR_perf_event_open, attr, pid, cpu,
18 group_fd, flags);
Jiri Olsa82baa0e2014-05-05 12:58:31 +020019}
20
Jiri Olsa43599d12014-05-05 12:53:20 +020021#endif /* _PERF_SYS_H */