bcc icon indicating copy to clipboard operation
bcc copied to clipboard

failed to create kprobe 'mutex_lock' using klockstat in kernel 6.7

Open Rrooach opened this issue 1 year ago • 1 comments

Hi, when I using klockstat in libbpf_example, I have the following problem,

libbpf: prog 'kprobe_mutex_lock': failed to create kprobe 'mutex_lock+0x0' pey
libbpf: prog 'kprobe_mutex_lock': failed to auto-attach: -2
failed to attach BPF object

it seems the latest kernel does not have mutex_lock. Instead, it has __mutex_lock, and there is a similar problem for kprobe_mutex_lock_interruptible. Do you have any idea how to fix that?

Much thanks.

Rrooach avatar Jan 27 '24 12:01 Rrooach