On Sat, Oct 29, 2016 at 1:27 AM, William Tu via iovisor-dev <
iovisor-dev@lists.iovisor.org> wrote:

> Hi,
>
> I'm trying to measure the performance of my BPF programs, which attach
> to clsact. As a start, I thought I could simply measure the cycles
> spent on cls_bpf_classify(), because it's the wrapper calling into my
> BPF programs.
>
> However, it seems that kprobe can not probe cls_bpf_classify(), even
> though cls_bpf_classify isn't in NOKPROBE_SYMBOL. Is there any reason
> why we couldn't probe it?
>
> [root@vm-dev bpf]# echo 'p:myprobe3 cls_bpf_classify' >>
> /sys/kernel/debug/tracing/kprobe_events
> bash: echo: write error: No such file or directory
>

Worked for me:

root@localhost:/sys/kernel/debug/tracing# echo 'p:myprobe3
cls_bpf_classify' > kprobe_events
root@localhost:/sys/kernel/debug/tracing# cat events/kprobes/myprobe3/id
1256


>
> As an alternative, I can probe on "__bpf_prog_run".
> [root@vm-dev bpf]# echo 'p:myprobe4 __bpf_prog_run' >>
> /sys/kernel/debug/tracing/kprobe_events
>
> Thanks
> William
> _______________________________________________
> iovisor-dev mailing list
> iovisor-dev@lists.iovisor.org
> https://lists.iovisor.org/mailman/listinfo/iovisor-dev
>
_______________________________________________
iovisor-dev mailing list
iovisor-dev@lists.iovisor.org
https://lists.iovisor.org/mailman/listinfo/iovisor-dev

Reply via email to