bpf.h 357 B

12345678910111213
  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. #define probe(function, vars) \
  6. SEC(#function "=" #function " " #vars) function
  7. #define license(name) \
  8. char _license[] SEC("license") = #name; \
  9. int _version SEC("version") = LINUX_VERSION_CODE;
  10. #endif /* _PERF_BPF_H */