tracing, perf: Implement BPF programs attached to uprobes
authorWang Nan <wangnan0@huawei.com>
Wed, 1 Jul 2015 02:13:50 +0000 (02:13 +0000)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 6 Aug 2015 18:29:14 +0000 (15:29 -0300)
commit04a22fae4cbc1f7d3f7471e9b36359f98bd3f043
tree56aaf8966290b8718c6792ec0df9095221fd8d8a
parent098d2164e3441c252eaa28906d45e16b7bf1bd2b
tracing, perf: Implement BPF programs attached to uprobes

By copying BPF related operation to uprobe processing path, this patch
allow users attach BPF programs to uprobes like what they are already
doing on kprobes.

After this patch, users are allowed to use PERF_EVENT_IOC_SET_BPF on a
uprobe perf event. Which make it possible to profile user space programs
and kernel events together using BPF.

Because of this patch, CONFIG_BPF_EVENTS should be selected by
CONFIG_UPROBE_EVENT to ensure trace_call_bpf() is compiled even if
KPROBE_EVENT is not set.

Signed-off-by: Wang Nan <wangnan0@huawei.com>
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: David Ahern <dsahern@gmail.com>
Cc: He Kuang <hekuang@huawei.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kaixu Xia <xiakaixu@huawei.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Zefan Li <lizefan@huawei.com>
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/r/1435716878-189507-3-git-send-email-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
include/linux/trace_events.h
kernel/events/core.c
kernel/trace/Kconfig
kernel/trace/trace_uprobe.c