perf bpf filter: Add 'pid' sample data support
authorNamhyung Kim <namhyung@kernel.org>
Tue, 14 Mar 2023 23:42:32 +0000 (16:42 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 15 Mar 2023 14:08:36 +0000 (11:08 -0300)
commit335818470f558de5dc37bbcb31f97b303605a9df
tree22d807472cefff8deab40a222290aeea0f82a5d2
parent27c6f2455b29f27c8daf209ec8bdf0ac2c567b74
perf bpf filter: Add 'pid' sample data support

The pid is special because it's saved in the PERF_SAMPLE_TID together.
So it needs to differenciate tid and pid using the 'part' field in the
perf bpf filter entry struct.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Hao Luo <haoluo@google.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: James Clark <james.clark@arm.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ravi Bangoria <ravi.bangoria@amd.com>
Cc: Song Liu <song@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: bpf@vger.kernel.org
Link: https://lore.kernel.org/r/20230314234237.3008956-2-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/bpf-filter.c
tools/perf/util/bpf-filter.h
tools/perf/util/bpf-filter.l
tools/perf/util/bpf-filter.y
tools/perf/util/bpf_skel/sample-filter.h
tools/perf/util/bpf_skel/sample_filter.bpf.c