Linux Perf
bpf.h
Go to the documentation of this file.
1 // SPDX-License-Identifier: GPL-2.0
2 #ifndef _PERF_BPF_H
3 #define _PERF_BPF_H
4 #define SEC(NAME) __attribute__((section(NAME), used))
5 
6 #define probe(function, vars) \
7  SEC(#function "=" #function " " #vars) function
8 
9 #define license(name) \
10 char _license[] SEC("license") = #name; \
11 int _version SEC("version") = LINUX_VERSION_CODE;
12 
13 #endif /* _PERF_BPF_H */