2873cdde293ffc0bf6be13e6da34528b83638a5a
[linux-2.6-microblaze.git] / tools / perf / include / bpf / bpf.h
1 // SPDX-License-Identifier: GPL-2.0
2 #ifndef _PERF_BPF_H
3 #define _PERF_BPF_H
4
5 #include <uapi/linux/bpf.h>
6
7 #define SEC(NAME) __attribute__((section(NAME),  used))
8
9 #define probe(function, vars) \
10         SEC(#function "=" #function " " #vars) function
11
12 #define syscall_enter(name) \
13         SEC("syscalls:sys_enter_" #name) syscall_enter_ ## name
14
15 #define license(name) \
16 char _license[] SEC("license") = #name; \
17 int _version SEC("version") = LINUX_VERSION_CODE;
18
19 #endif /* _PERF_BPF_H */