Designing better kernel ABIs
Designing better kernel ABIs
Posted Oct 27, 2016 3:12 UTC (Thu) by deater (subscriber, #11746)Parent article: Designing better kernel ABIs
The feature is not documented well, the sample code in the kernel commit that introduced the feature doesn't actually work, and the relevant bpf manpage section just says "to be documented".
The only plausible option is to try to reverse engineer what the "perf" tool does. Take a look at the perf code sometime, large sections of it have not a single code comment, and have fun things where bpf_object_load() calls bpf_object__load_progs() calls bpf_program__load() which calls load_program() which calls bpf_load_program() and eventually you just give up.