Re: [RFC PATCH v3 06/37] bpf tools: Introduce 'bpf' library to tools

From: Alexei Starovoitov
Date: Thu May 21 2015 - 13:53:29 EST


On 5/20/15 5:24 PM, Wangnan (F) wrote:


Do you think we should classify kprobe/socket programs in libbpf layer
instead of perf?

In my current implementation, type of a program is determined by perf by
parsing names of
corresponding sections. Format of section names should be part of
interface between perf
(and iproute2 and others) and eBPF programs. What libbpf should do is to
fetch those
names and give them to caller, let caller decide the type of programs.
Therefore, if
the program is written for perf, writer of program even don't need to
think about
kprobe/socket program type since in perf currently we can only use
kprobe program.

if whole section name string is passed to perf/iproute2 then it's fine,
but libbpf already parses 'map', 'license', 'version' section names.
Are you saying everything else will be passed to perf directly?
perf will parse section string, generate extra prologue insns based on
debug info found in vmlinux and call into library back to load them?
Sounds ok-ish. Let's see how code looks.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/