summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/perf/builtin-trace.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index a102748bd0c9..6ac51925ea42 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -4476,10 +4476,12 @@ static int trace__run(struct trace *trace, int argc, const char **argv)
* CPU the bpf-output event's file descriptor.
*/
perf_cpu_map__for_each_cpu(cpu, i, trace->syscalls.events.bpf_output->core.cpus) {
+ int mycpu = cpu.cpu;
+
bpf_map__update_elem(trace->skel->maps.__augmented_syscalls__,
- &cpu.cpu, sizeof(int),
+ &mycpu, sizeof(mycpu),
xyarray__entry(trace->syscalls.events.bpf_output->core.fd,
- cpu.cpu, 0),
+ mycpu, 0),
sizeof(__u32), BPF_ANY);
}
}