[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191229143740.29143-1-jolsa@kernel.org>
Date: Sun, 29 Dec 2019 15:37:35 +0100
From: Jiri Olsa <jolsa@...nel.org>
To: Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>
Cc: netdev@...r.kernel.org, bpf@...r.kernel.org,
Andrii Nakryiko <andriin@...com>, Yonghong Song <yhs@...com>,
Martin KaFai Lau <kafai@...com>,
Jakub Kicinski <jakub.kicinski@...ronome.com>,
David Miller <davem@...hat.com>
Subject: [RFC 0/5] bpf: Add trampoline helpers
hi,
I understand trampolines are brand new stuff and you guys
might be already working on this.
However, I was checking on the trampoline probes and could
get some really nice speedup for few bcc progs.
Here's output of perf bench while running klockstat.py:
Without:
$ perf bench sched messaging -l 50000
...
Total time: 18.571 [sec]
With current kprobe tracing:
$ perf bench sched messaging -l 50000
...
Total time: 183.395 [sec]
With kfunc tracing:
$ perf bench sched messaging -l 50000
...
Total time: 39.773 [sec]
I needed to add few perf_event_output, stack retrieval
helpers and trampoline lookup during orc unwinding.
It's also available in here:
git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git bpf/kfunc
Apart from these helpers, several other patches (like perf
and ftrace ring buffer renames) are needed to make it all work,
it's pushed in here:
git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git bpf/kfunc_all
You can check on current bcc changes in here:
https://github.com/olsajiri/bcc/tree/kfunc
thanks,
jirka
---
Jiri Olsa (5):
bpf: Allow non struct type for btf ctx access
bpf: Add bpf_perf_event_output_kfunc
bpf: Add bpf_get_stackid_kfunc
bpf: Add bpf_get_stack_kfunc
bpf: Allow to resolve bpf trampoline in unwind
include/linux/bpf.h | 6 ++++++
kernel/bpf/btf.c | 6 ------
kernel/bpf/core.c | 2 ++
kernel/bpf/trampoline.c | 35 +++++++++++++++++++++++++++++++++++
kernel/trace/bpf_trace.c | 123 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
5 files changed, 166 insertions(+), 6 deletions(-)
Powered by blists - more mailing lists