OSDN Git Service

libbpf: Introduce legacy kprobe events support
authorRafael David Tinoco <rafaeldtinoco@gmail.com>
Sun, 12 Sep 2021 06:48:44 +0000 (03:48 -0300)
committerAndrii Nakryiko <andrii@kernel.org>
Tue, 14 Sep 2021 21:44:45 +0000 (14:44 -0700)
commitca304b40c20d5750f08200f0ad3445384646620c
tree1a5f76319547a38b8cf0429379dca875095bb18d
parent2f383041278672332ab57c78570c30c47d6f35fd
libbpf: Introduce legacy kprobe events support

Allow kprobe tracepoint events creation through legacy interface, as the
kprobe dynamic PMUs support, used by default, was only created in v4.17.

Store legacy kprobe name in struct bpf_perf_link, instead of creating
a new "subclass" off of bpf_perf_link. This is ok as it's just two new
fields, which are also going to be reused for legacy uprobe support in
follow up patches.

Signed-off-by: Rafael David Tinoco <rafaeldtinoco@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210912064844.3181742-1-rafaeldtinoco@gmail.com
tools/lib/bpf/libbpf.c