Re: [PATCH] perf tools: Skip BPF sideband event for userspace profiling
From: Song Liu
Date: Wed Feb 26 2025 - 17:00:56 EST
On Wed, Feb 26, 2025 at 12:59 PM Ian Rogers <irogers@xxxxxxxxxx> wrote:
>
> On Wed, Feb 26, 2025 at 12:30 PM Namhyung Kim <namhyung@xxxxxxxxxx> wrote:
> >
> > The BPF sideband information is tracked using a separate thread and
> > evlist. But it's only useful for profiling kernel and we can skip it
> > when users profile their application only.
>
> nit: It may be worth noting that profiling an application implicitly
> excludes the kernel samples.
>
> > It seems it already fails to open the sideband event in that case.
> > Let's remove the noise in the verbose output anyway.
> >
> > Cc: Song Liu <song@xxxxxxxxxx>
> > Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx>
>
> Reviewed-by: Ian Rogers <irogers@xxxxxxxxxx>
>
> I wonder if the second evlist could be avoided similar to Howard's
> off-CPU sample events?
> I also wonder if we should make the evlist responsible for BPF and
> dummy/sideband events. Having unnecessary events increases the list
> size iterated over when creating sideband data, and so has a runtime
> cost. Having the logic separated in places like builtin-top and
> builtin-record feels suboptimal.
It appears we can indeed put this logic in evlist.
Thanks,
Song
> Thanks,
> Ian
>