libbpf: Make optimized uprobes backward compatible#11009
libbpf: Make optimized uprobes backward compatible#11009kernel-patches-daemon-bpf[bot] wants to merge 5 commits intobpf-next_basefrom
Conversation
|
Upstream branch: db975de |
AI reviewed your patch. Please fix the bug or email reply why it's not a bug. In-Reply-To-Subject: AI-authorship-score: low |
AI reviewed your patch. Please fix the bug or email reply why it's not a bug. In-Reply-To-Subject: AI-authorship-score: low |
AI reviewed your patch. Please fix the bug or email reply why it's not a bug. In-Reply-To-Subject: AI-authorship-score: low |
|
Forwarding comment 3877838387 via email |
|
Forwarding comment 3877846166 via email |
|
Forwarding comment 3877853344 via email |
a1e329f to
dddd867
Compare
|
Upstream branch: a9aabb3 |
dabc301 to
a7341aa
Compare
dddd867 to
01f7084
Compare
|
Upstream branch: dc855b7 |
a7341aa to
85ac799
Compare
01f7084 to
2294d0a
Compare
Adding uprobe syscall feature detection that will be used in following changes. Signed-off-by: Jiri Olsa <jolsa@kernel.org>
|
Upstream branch: dc855b7 |
Adding support to detect nop,nop5 instructions combo for usdt probe by checking on probe's following nop5 instruction. When the nop,nop5 combo is detected together with uprobe syscall, we can place the probe on top of nop5 and get it optimized. [1] https://github.com/libbpf/usdt Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Syncing latest usdt.h change [1]. Now that we have no5 optimization support in kernel, let's emit nop,nop5 for usdt probe. We leave it up to the library to use desirable nop instruction. [1] libbpf/usdt@c9865d1 Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Adding test that attaches bpf program on usdt probe in 2 scenarios; - attach program on top of usdt_1, which is single nop instruction, so the probe stays on nop instruction and is not optimized. - attach program on top of usdt_2 which is probe defined on top of nop,nop5 combo, so the probe is placed on top of nop5 and is optimized. Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Adding usdt trigger bench for usdt: trig-usdt_nop - usdt on top of nop1 instruction trig-usdt_nop_combo - usdt on top of nop1/nop5 combo Adding it to benchs/run_bench_uprobes.sh script. Example run on x86_64 kernel with uprobe syscall: # ./benchs/run_bench_uprobes.sh usermode-count : 152.507 ± 0.098M/s syscall-count : 14.309 ± 0.093M/s uprobe-nop : 3.190 ± 0.012M/s uprobe-push : 3.057 ± 0.004M/s uprobe-ret : 1.095 ± 0.009M/s uprobe-nop5 : 7.305 ± 0.034M/s uretprobe-nop : 2.175 ± 0.005M/s uretprobe-push : 2.109 ± 0.003M/s uretprobe-ret : 0.945 ± 0.002M/s uretprobe-nop5 : 3.530 ± 0.006M/s usdt_nop : 3.235 ± 0.008M/s <-- added usdt_nop_combo : 7.511 ± 0.045M/s <-- added Signed-off-by: Jiri Olsa <jolsa@kernel.org>
85ac799 to
4d0a177
Compare
Pull request for series with
subject: libbpf: Make optimized uprobes backward compatible
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=1052727