On Tue, May 10, 2022 at 12:47 AM Jiri Olsa <jolsa@xxxxxxxxxx> wrote: > > hi, > sending change we discussed some time ago [1] to get rid of > some deprecated functions we use in perf prologue code. > > Despite the gloomy discussion I think the final code does > not look that bad ;-) > > This patchset removes following libbpf functions from perf: > bpf_program__set_prep > bpf_program__nth_fd > struct bpf_prog_prep_result > > v2 changes: > - use fallback section prog handler, so we don't need to > use section prefix [Andrii] > - realloc prog->insns array in bpf_program__set_insns [Andrii] > - squash patch 1 from previous version with > bpf_program__set_insns change [Daniel] > - patch 3 already merged [Arnaldo] > - added more comments > > meanwhile.. perf/core and bpf-next diverged, so: > - libbpf bpf_program__set_insns change is based on bpf-next/master > - perf changes do not apply on bpf-next/master so they are based on > perf/core ... however they can be merged only after we release > libbpf 0.8.0 with bpf_program__set_insns change, so we don't break > the dynamic linking > I'm sending perf changes now just for review, I'll resend them > once libbpf 0.8.0 is released > > thanks, > jirka > > > [1] https://lore.kernel.org/bpf/CAEf4BzaiBO3_617kkXZdYJ8hS8YF--ZLgapNbgeeEJ-pY0H88g@xxxxxxxxxxxxxx/ > --- > Jiri Olsa (1): > libbpf: Add bpf_program__set_insns function > The first patch looks good to me. The rest I can't really review and test properly, so I'll leave it up to Arnaldo. Arnaldo, how do we coordinate these patches? Should they go through bpf-next (after you Ack them) or you want them in your tree? I'd like to get the bpf_program__set_insns() patch into bpf-next so that I can do libbpf v0.8 release, having it in a separate tree is extremely inconvenient. Please let me know how you think we should proceed? > tools/lib/bpf/libbpf.c | 22 ++++++++++++++++++++++ > tools/lib/bpf/libbpf.h | 18 ++++++++++++++++++ > tools/lib/bpf/libbpf.map | 1 + > 3 files changed, 41 insertions(+) > > Jiri Olsa (2): > perf tools: Register fallback libbpf section handler > perf tools: Rework prologue generation code > > tools/perf/util/bpf-loader.c | 175 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------- > 1 file changed, 157 insertions(+), 18 deletions(-)