bpf, x86: Add jit dry run mode
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest3 patches 3 repliesIn review
- v13 patches 1 replySuperseded
Changes in v2 from the cover letter
- drop out label in emit_mov_imm32, it's not needed [ci-bot]
[1] https://lore.kernel.org/bpf/[email protected]/
---
Jiri Olsa (3):
bpf, x86: Split x86_call_depth_emit_accounting in two functions bpf, x86: Introduce JIT emission context
bpf, x86: Add support for jit dry run
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | bpf, x86: Split x86_call_depth_emit_accounting in two functionsarch/ arch/ arch/ +2 more | +21 | 0 replies | |
| 2/3 | bpf, x86: Introduce JIT emission contextarch/ | +353 | 0 replies | |
| 3/3 | bpf, x86: Add support for jit dry runarch/ | +20 | 3 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCHv2 bpf-next 0/3] bpf, x86: Add jit dry run mode
hi,
we recently hit performance issue in arch_bpf_trampoline_size, that Mike fixed in [1].
I wondered we could go completely without emitting jit code for getting just the trampoline size as we do on arm and it turned out it actually makes the tracing_multi attachment benchmark much faster.
With current code:
# ./test_progs -t tracing_multi_bench_attach -v ... serial_test_tracing_multi_bench_attach: found 55227 functions serial_test_tracing_multi_bench_attach: attached in 1.563s serial_test_tracing_multi_bench_attach: detached in 0.256s
With the fix:
# ./test_progs -t tracing_multi_bench_attach -v ... serial_test_tracing_multi_bench_attach: found 55235 functions serial_test_tracing_multi_bench_attach: attached in 0.798s serial_test_tracing_multi_bench_attach: detached in 0.258s
thanks,
jirka
v2 changes:
- drop out label in emit_mov_imm32, it's not needed [ci-bot]
[1] https://lore.kernel.org/bpf/[email protected]/
---
Jiri Olsa (3):
bpf, x86: Split x86_call_depth_emit_accounting in two functions bpf, x86: Introduce JIT emission context
bpf, x86: Add support for jit dry run
arch/x86/include/asm/alternative.h | 4 +- arch/x86/include/asm/text-patching.h | 2 + arch/x86/kernel/alternative.c | 2 - arch/x86/kernel/callthunks.c | 7 +- arch/x86/net/bpf_jit_comp.c | 869 ++++++++++++++++++++++++++++++++++++++++--------------------------------------------------- 5 files changed, 383 insertions(+), 501 deletions(-)