Commit 690917c6 authored by Namhyung Kim's avatar Namhyung Kim Committed by Arnaldo Carvalho de Melo

perf bpf filter: Fix a broken perf sample data naming for BPF CO-RE

BPF CO-RE requires 3 underscores for the ignored suffix rule but it
mistakenly used only 2.  Let's fix it.

Fixes: 3a8b8fc3 ("perf bpf filter: Support pre-5.16 kernels where 'mem_hops' isn't in 'union perf_mem_data_src'")
Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
Acked-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Acked-by: default avatarJohn Fastabend <john.fastabend@gmail.com>
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: Peter Zijlstra <peterz@infradead.org>
Cc: Song Liu <song@kernel.org>
Cc: bpf@vger.kernel.org
Link: https://lore.kernel.org/r/20230525000307.3202449-1-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 8d73259e
...@@ -25,7 +25,7 @@ struct perf_sample_data___new { ...@@ -25,7 +25,7 @@ struct perf_sample_data___new {
} __attribute__((preserve_access_index)); } __attribute__((preserve_access_index));
/* new kernel perf_mem_data_src definition */ /* new kernel perf_mem_data_src definition */
union perf_mem_data_src__new { union perf_mem_data_src___new {
__u64 val; __u64 val;
struct { struct {
__u64 mem_op:5, /* type of opcode */ __u64 mem_op:5, /* type of opcode */
...@@ -108,7 +108,7 @@ static inline __u64 perf_get_sample(struct bpf_perf_event_data_kern *kctx, ...@@ -108,7 +108,7 @@ static inline __u64 perf_get_sample(struct bpf_perf_event_data_kern *kctx,
if (entry->part == 7) if (entry->part == 7)
return kctx->data->data_src.mem_blk; return kctx->data->data_src.mem_blk;
if (entry->part == 8) { if (entry->part == 8) {
union perf_mem_data_src__new *data = (void *)&kctx->data->data_src; union perf_mem_data_src___new *data = (void *)&kctx->data->data_src;
if (bpf_core_field_exists(data->mem_hops)) if (bpf_core_field_exists(data->mem_hops))
return data->mem_hops; return data->mem_hops;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment