Em Sat, Feb 12, 2022 at 12:34:58PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Fri, Feb 11, 2022 at 11:30:52PM -0800, Andrii Nakryiko escreveu: > > libbpf's bpf_prog_load() and bpf__object_next() APIs are deprecated. > > remove perf's usage of these deprecated functions. After this patch > > set, the only remaining libbpf deprecated APIs in perf would be > > bpf_program__set_prep() and bpf_program__nth_fd(). > > Not applying to perf/core, I'm checking... Just some fuzz on the second patch: ⬢[acme@toolbox perf]$ patch -p1 < ~/wb/1.patch patching file tools/perf/util/bpf-loader.c Hunk #2 succeeded at 111 with fuzz 1 (offset -1 lines). Hunk #3 succeeded at 156 (offset -2 lines). Hunk #4 succeeded at 1563 (offset 8 lines). Hunk #5 succeeded at 1575 (offset 8 lines). Hunk #6 succeeded at 1628 (offset 8 lines). ⬢[acme@toolbox perf]$ Applying manually to test on the set of test build containers. - Arnaldo > ⬢[acme@toolbox perf]$ b4 am -ctsl --cc-trailers 20220212073054.1052880-1-andrii@xxxxxxxxxx > Looking up https://lore.kernel.org/r/20220212073054.1052880-1-andrii%40kernel.org > Grabbing thread from lore.kernel.org/all/20220212073054.1052880-1-andrii%40kernel.org/t.mbox.gz > Checking for newer revisions on https://lore.kernel.org/all/ > Analyzing 3 messages in the thread > Checking attestation on all messages, may take a moment... > --- > [PATCH v5 1/2] perf: Stop using deprecated bpf_load_program() API > + Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx> > + Link: https://lore.kernel.org/r/20220212073054.1052880-2-andrii@xxxxxxxxxx > + Cc: kernel-team@xxxxxx > + Cc: daniel@xxxxxxxxxxxxx > + Cc: ast@xxxxxxxxxx > + Cc: bpf@xxxxxxxxxxxxxxx > [PATCH v5 2/2] perf: Stop using deprecated bpf_object__next() API > + Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx> > + Link: https://lore.kernel.org/r/20220212073054.1052880-3-andrii@xxxxxxxxxx > + Cc: kernel-team@xxxxxx > + Cc: daniel@xxxxxxxxxxxxx > + Cc: ast@xxxxxxxxxx > + Cc: bpf@xxxxxxxxxxxxxxx > --- > Total patches: 2 > --- > Cover: ./v5_20220211_andrii_perf_stop_using_deprecated_bpf_apis.cover > Link: https://lore.kernel.org/r/20220212073054.1052880-1-andrii@xxxxxxxxxx > Base: not specified > git am ./v5_20220211_andrii_perf_stop_using_deprecated_bpf_apis.mbx > ⬢[acme@toolbox perf]$ git am ./v5_20220211_andrii_perf_stop_using_deprecated_bpf_apis.mbx > Applying: perf: Stop using deprecated bpf_load_program() API > Applying: perf: Stop using deprecated bpf_object__next() API > error: patch failed: tools/perf/util/bpf-loader.c:68 > error: tools/perf/util/bpf-loader.c: patch does not apply > Patch failed at 0002 perf: Stop using deprecated bpf_object__next() API > hint: Use 'git am --show-current-patch=diff' to see the failed patch > When you have resolved this problem, run "git am --continue". > If you prefer to skip this patch, run "git am --skip" instead. > To restore the original branch and stop patching, run "git am --abort". > > > - Arnaldo > > > v4 -> v5: > > - add bpf_perf_object__add() and use it where appropriate (Jiri); > > - use __maybe_unused in first patch; > > v3 -> v4: > > - Fixed commit title > > - Added weak definition for deprecated function > > v2 -> v3: > > - Fixed commit message to use upstream perf > > v1 -> v2: > > - Added missing commit message > > - Added more details to commit message and added steps to reproduce > > original test case. > > > > Christy Lee (2): > > perf: Stop using deprecated bpf_load_program() API > > perf: Stop using deprecated bpf_object__next() API > > > > tools/perf/tests/bpf.c | 14 ++---- > > tools/perf/util/bpf-event.c | 13 +++++ > > tools/perf/util/bpf-loader.c | 98 +++++++++++++++++++++++++++++------- > > 3 files changed, 96 insertions(+), 29 deletions(-) > > > > -- > > 2.30.2 > > -- > > - Arnaldo -- - Arnaldo