This website requires JavaScript.
Explore
Help
Register
Sign In
AcoSail
/
kernel_optimize_test
Watch
8
Star
0
Fork
0
You've already forked kernel_optimize_test
forked from
luck/tmp_suning_uos_patched
Code
Pull Requests
Activity
5d88e24b23
kernel_optimize_test
/
tools
/
perf
/
examples
/
bpf
/
empty.c
4 lines
36 B
C
Raw
Normal View
History
Unescape
Escape
perf: Use consistent include paths for libbpf Fix perf to include libbpf header files with the bpf/ prefix, to be consistent with external users of the library. Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Andrii Nakryiko <andriin@fb.com> Link: https://lore.kernel.org/bpf/157952560797.1683545.7685921032671386301.stgit@toke.dk
2020-01-20 21:06:48 +08:00
#
include
<bpf/bpf.h>
perf bpf: Add bpf.h to be used in eBPF proggies So, the first helper is the one shortening a variable/function section attribute, from, for instance: char _license[] __attribute__((section("license"), used)) = "GPL"; to: char _license[] SEC("license") = "GPL"; Convert empty.c to that and it becomes: # cat ~acme/lib/examples/perf/bpf/empty.c #include <bpf.h> char _license[] SEC("license") = "GPL"; int _version SEC("version") = LINUX_VERSION_CODE; # Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: https://lkml.kernel.org/n/tip-zmeg52dlvy51rdlhyumfl5yf@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2018-05-04 23:23:29 +08:00
perf bpf: Add license(NAME) helper To further reduce boilerplate. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: https://lkml.kernel.org/n/tip-vst6hj335s0ebxzqltes3nsc@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2018-05-05 02:18:31 +08:00
license
(
GPL
)
;
Copy Permalink