On Fri, Oct 02, 2026 at 11:39 AM Alexei Starovoitov wrote:
> That's not going to fly.
> After this series there are two implementations of the same thing.
[...]
> Jiong's RFC converted all passes and deleted the old code in the
> last patch:
> https://lore.kernel.org/bpf/[email protected]/
> Pls do the same in one series. One-off patches can be add + commit.

Agreed. v2 will move all passes to the list, turn
bpf_patch_insn_data() into add + commit, and remove
adjust_insn_aux_data(), bpf_adj_branches() and the per-patch adjust
helpers in the last patch. That also covers the bot's comment on
patch 1.

> That's veristat on x86.
> test_progs loads pyperf with BPF_F_TEST_RND_HI32, and s390, riscv,
> powerpc need zext. bpf_opt_subreg_zext_lo32_rnd_hi32() does more
> patches than misc_fixups there, I think, and it has one call site.

Right. On x86 with BPF_F_TEST_RND_HI32:

                  patches          load time
                  zext    misc     flag off   flag on
  pyperf180       4610     930     0.587 s    1.390 s
  pyperf600       7620    1530     1.496 s    4.105 s

Patching is 67% of the profile of pyperf180 with the flag, 57% in
bpf_opt_subreg_zext_lo32_rnd_hi32() alone. v2 will report both cases.

> That's unexpected. Pls share the perf report.

perf record -F 4999 --all-kernel -g -- veristat -q pyperf180.bpf.o,
bpf-next 6a75c73eebd4, x86_64 VM:

  Children    Self
   50.66%    0.12%  bpf_compute_live_registers
   50.43%    0.00%  bpf_compute_subprog_arg_access
   50.29%    0.67%  analyze_subprog
   49.47%    8.99%  compute_subprog_args.constprop.0
   39.08%    8.43%  arg_track_join
   25.71%   25.67%  __arg_track_join
   24.97%    0.62%  do_check_common
   21.49%    0.04%  __bpf_patch_insn_data
    4.07%    3.99%  arg_track_eq

pyperf180 has 2 subprogs, on_event and the global __get_frame_data,
but analyze_subprog() ran 458 times during that veristat run, which
loaded 6 programs counting libbpf's probes.

Reply via email to