[PATCH v6 12/26] perf trace: Use the CPU map index for the BPF output event's fds
From: Ian Rogers
Date: Mon Sep 28 2026 - 14:37:18 EST
augmented_syscalls__setup_bpf_output() looks up the bpf-output event's
file descriptor using the CPU number, but the fd xyarray is indexed by
position in the CPU map. With -C, or with offline CPUs, the two differ
and the lookup finds another CPU's fd or NULL, leaving those CPUs
unaugmented.
Use the CPU map index.
Assisted-by: Antigravity:gemini-3.1-pro
Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
---
tools/perf/util/bpf_trace_augment.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tools/perf/util/bpf_trace_augment.c b/tools/perf/util/bpf_trace_augment.c
index 0f510554ad9f..7087849031e6 100644
--- a/tools/perf/util/bpf_trace_augment.c
+++ b/tools/perf/util/bpf_trace_augment.c
@@ -76,8 +76,7 @@ void augmented_syscalls__setup_bpf_output(void)
bpf_map__update_elem(skel->maps.__augmented_syscalls__,
&mycpu, sizeof(mycpu),
- xyarray__entry(bpf_output->core.fd,
- mycpu, 0),
+ xyarray__entry(bpf_output->core.fd, i, 0),
sizeof(__u32), BPF_ANY);
}
}
--
2.56.0.rc1.315.gc6ed9934b7-goog