lkml.org 
[lkml]   [2023]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 3/8] perf record: Add BPF event filter support
On Tue, Feb 21, 2023 at 3:54 AM Jiri Olsa <olsajiri@gmail.com> wrote:
>
> On Sat, Feb 18, 2023 at 10:13:24PM -0800, Namhyung Kim wrote:
>
> SNIP
>
> > diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
> > index 8374117e66f6..6429915d376d 100644
> > --- a/tools/perf/builtin-record.c
> > +++ b/tools/perf/builtin-record.c
> > @@ -52,6 +52,7 @@
> > #include "util/pmu-hybrid.h"
> > #include "util/evlist-hybrid.h"
> > #include "util/off_cpu.h"
> > +#include "util/bpf-filter.h"
> > #include "asm/bug.h"
> > #include "perf.h"
> > #include "cputopo.h"
> > @@ -1364,6 +1365,14 @@ static int record__open(struct record *rec)
> >
> > session->evlist = evlist;
> > perf_session__set_id_hdr_size(session);
> > +
> > + evlist__for_each_entry(evlist, pos) {
> > + if (list_empty(&pos->bpf_filters))
> > + continue;
> > + rc = perf_bpf_filter__prepare(pos);
> > + if (rc)
> > + break;
> > + }
>
> might fit better under evlist__apply_filters ?

Right, it'd be better. Will move.

Thanks,
Namhyung

\
 
 \ /
  Last update: 2023-03-27 00:32    [W:0.866 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site