Skip to content

Commit 690917c

Browse files
namhyungacmel
authored andcommitted
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: 3a8b8fc ("perf bpf filter: Support pre-5.16 kernels where 'mem_hops' isn't in 'union perf_mem_data_src'") Signed-off-by: Namhyung Kim <[email protected]> Acked-by: Andrii Nakryiko <[email protected]> Acked-by: John Fastabend <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Ian Rogers <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Song Liu <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 8d73259 commit 690917c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/perf/util/bpf_skel/sample_filter.bpf.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ struct perf_sample_data___new {
2525
} __attribute__((preserve_access_index));
2626

2727
/* new kernel perf_mem_data_src definition */
28-
union perf_mem_data_src__new {
28+
union perf_mem_data_src___new {
2929
__u64 val;
3030
struct {
3131
__u64 mem_op:5, /* type of opcode */
@@ -108,7 +108,7 @@ static inline __u64 perf_get_sample(struct bpf_perf_event_data_kern *kctx,
108108
if (entry->part == 7)
109109
return kctx->data->data_src.mem_blk;
110110
if (entry->part == 8) {
111-
union perf_mem_data_src__new *data = (void *)&kctx->data->data_src;
111+
union perf_mem_data_src___new *data = (void *)&kctx->data->data_src;
112112

113113
if (bpf_core_field_exists(data->mem_hops))
114114
return data->mem_hops;

0 commit comments

Comments
 (0)