perf: Couldn't synthesize bpf events

Viewed 835

I am trying to get perf tool running in one of our linux setups, which don't/can't have linux sources. So, I downloaded the linux code in another machine and compiled perf (cd tools/perf; make). I copied the perf binary to my target machine. However, while starting to record, it says "couldn't synthesize bpf events".

root> perf record -a -g --call-graph dwarf -p 836
Warning:
PID/TID switch overriding SYSTEM
Couldn't synthesize bpf events.
[ perf record: Woken up 1 times to write data ]
Failed to read max cpus, using default of 4096
[ perf record: Captured and wrote 0.057 MB perf.data ]

Linux version running in our target machine: 5.4.66-rt38-intel-pk-preempt-rt

Code I used to compile perf: https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-stable-rt.git/log/?h=v5.4-rt

Because I get this 'couldn't synthesize bpf events', I think I am not getting the user-space stack in the perf report. What should I do to get rid of this error to fetch the user-space stack of a running process using perf? Advice please!

1 Answers

CONFIG_BPF_SYSCALL was not enabled in kernel config. After enabling it, I can see that 'couldn't synthesize bpf' was gone. Marking it as answered.

Related