Skip to content
Advertisement

Tag: bcc-bpf

bpftrace: uprobe target file does not exist or is not executable

I want to use bpftrace to trace functions inside libasan library, which is inside /usr/lib/x86_64-linux-gnu/. However sudo bpftrace -e ‘uretprobe:/usr/lib/x86_64-linux-gnu/libasan.so.4: __interceptor_malloc { printf(“pid: %d, malloc %pn”, pid, retval); }’ gives error: uprobe target file ‘/usr/lib/x86_64-linux-gnu/libasan.so.4’ does not exist or is not executable I have tried: export LD_LIBRARY_PATH=”/lib:/usr/lib:/usr/local/lib” but it does not help. How can make the library executable for bpftrace?

bpf/bcc reports error when trying to access `struct rq`

This is my bpf program to profile a kernel function pick_next_task_fiar. It reports error as follow: My question why the bpf can not recognise the struct rq since I have already included the # include <linux/sched.h>. However, it does recognise the struct task_struct. These two structs are in the same head file. Kernel version: 4.4.0-141-generic on ubuntu 16.04 Answer struct

Advertisement