[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211128193450.8147832ab7d0d10494102ffb@kernel.org>
Date: Sun, 28 Nov 2021 19:34:50 +0900
From: Masami Hiramatsu <mhiramat@...nel.org>
To: Jiri Olsa <jolsa@...hat.com>
Cc: Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Steven Rostedt <rostedt@...dmis.org>, netdev@...r.kernel.org,
bpf@...r.kernel.org, lkml <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Martin KaFai Lau <kafai@...com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...omium.org>,
Ravi Bangoria <ravi.bangoria@....com>
Subject: Re: [RFC 0/8] perf/bpf: Add batch support for [ku]probes attach
Hi Jiri,
On Wed, 24 Nov 2021 09:41:11 +0100
Jiri Olsa <jolsa@...hat.com> wrote:
> hi,
> adding support to create multiple kprobes/uprobes within single
> perf event. This way we can associate single bpf program with
> multiple kprobes.
Thanks for the change, basically, you can repeatedly call the
create_local_trace_kprobe() and register it.
>
> Sending this as RFC because I'm not completely sure I haven't
> missed anything in the trace/events area.
OK let me check that.
Thanks,
>
> Also it needs following uprobe fix to work properly:
> https://lore.kernel.org/lkml/20211123142801.182530-1-jolsa@kernel.org/
>
> Also available at:
> https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
> bpf/kuprobe_batch
>
> thanks,
> jirka
>
>
> ---
> Jiri Olsa (8):
> perf/kprobe: Add support to create multiple probes
> perf/uprobe: Add support to create multiple probes
> libbpf: Add libbpf__kallsyms_parse function
> libbpf: Add struct perf_event_open_args
> libbpf: Add support to attach multiple [ku]probes
> libbpf: Add support for k[ret]probe.multi program section
> selftest/bpf: Add kprobe multi attach test
> selftest/bpf: Add uprobe multi attach test
>
> include/uapi/linux/perf_event.h | 1 +
> kernel/trace/trace_event_perf.c | 214 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------
> kernel/trace/trace_kprobe.c | 47 ++++++++++++++++---
> kernel/trace/trace_probe.c | 2 +-
> kernel/trace/trace_probe.h | 6 ++-
> kernel/trace/trace_uprobe.c | 43 +++++++++++++++--
> tools/include/uapi/linux/perf_event.h | 1 +
> tools/lib/bpf/libbpf.c | 235 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------
> tools/lib/bpf/libbpf.h | 25 +++++++++-
> tools/lib/bpf/libbpf_internal.h | 5 ++
> tools/testing/selftests/bpf/prog_tests/multi_kprobe_test.c | 83 +++++++++++++++++++++++++++++++++
> tools/testing/selftests/bpf/prog_tests/multi_uprobe_test.c | 97 ++++++++++++++++++++++++++++++++++++++
> tools/testing/selftests/bpf/progs/multi_kprobe.c | 58 +++++++++++++++++++++++
> tools/testing/selftests/bpf/progs/multi_uprobe.c | 26 +++++++++++
> 14 files changed, 765 insertions(+), 78 deletions(-)
> create mode 100644 tools/testing/selftests/bpf/prog_tests/multi_kprobe_test.c
> create mode 100644 tools/testing/selftests/bpf/prog_tests/multi_uprobe_test.c
> create mode 100644 tools/testing/selftests/bpf/progs/multi_kprobe.c
> create mode 100644 tools/testing/selftests/bpf/progs/multi_uprobe.c
>
--
Masami Hiramatsu <mhiramat@...nel.org>
Powered by blists - more mailing lists