]> www.infradead.org Git - users/jedix/linux-maple.git/commit
perf bpf-filter: Support separate lost counts for each filter
authorNamhyung Kim <namhyung@kernel.org>
Wed, 3 Jul 2024 22:30:32 +0000 (15:30 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 1 Aug 2024 15:11:33 +0000 (12:11 -0300)
commit1ec6fd34e0572588b9628e397ff134fd3cf79b5d
treecdddf2464085350f74c90134b003b0950aeef2e4
parent0715f65e94377016e8e12dae6bb6a6d24644c54d
perf bpf-filter: Support separate lost counts for each filter

As the BPF filter is shared between other processes, it should have its
own counter for each invocation.  Add a new array map (lost_count) to
save the count using the same index as the filter.  It should clear the
count before running the filter.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: KP Singh <kpsingh@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Song Liu <song@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: bpf@vger.kernel.org
Link: https://lore.kernel.org/r/20240703223035.2024586-6-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/bpf-filter.c
tools/perf/util/bpf_skel/sample_filter.bpf.c