Re: [PATCH v4 12/53] perf bpf: Don't synthesize BPF events when disabled

From: Arnaldo Carvalho de Melo
Date: Thu Nov 09 2023 - 11:11:04 EST


Em Wed, Nov 08, 2023 at 03:03:15PM -0800, Song Liu escreveu:
> On Wed, Nov 8, 2023 at 8:15 AM Arnaldo Carvalho de Melo <acme@xxxxxxxxxx> wrote:
> >
> > Em Thu, Nov 02, 2023 at 10:56:54AM -0700, Ian Rogers escreveu:
> > > If BPF sideband events are disabled on the command line, don't
> > > synthesize BPF events too.
> >
> >
> > Interesting, in 71184c6ab7e60fd5 ("perf record: Replace option
> > --bpf-event with --no-bpf-event") we checked that, but only down at
> > perf_event__synthesize_one_bpf_prog(), where we have:
> >
> > if (!opts->no_bpf_event) {
> > /* Synthesize PERF_RECORD_BPF_EVENT */
> > *bpf_event = (struct perf_record_bpf_event)
> >
> >
> > So we better remove that, now redundant check? I'll apply your patch as
> > is and then we can remove that other check.
> >
> > Song, can I have your Acked-by or Reviewed-by, please?
> >
> > - Arnaldo
> >
> > > Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
>
> Good catch!
>
> Acked-by: Song Liu <song@xxxxxxxxxx>

Thanks, applied the patch with your Acked-by, will revisit this after
this gets published.

- Arnaldo