-
In BCC, we have |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 9 replies
-
But there are some caveats to keep in mind. One can not attach an eBPF program to every perf event and attaching an eBPF program to a perf event represents only a very small subset of the |
Beta Was this translation helpful? Give feedback.
cilium/ebpf
is a Go implementation around the eBPF ecosystem and it is independent of theperf
subsystem of the Linux kernel. BCC decided to do a mix and implement both but also decided to implement only a part of the completeperf
userspace API.Go implementations of the
perf
subsystem are for example acln0/perf or hodgesds/perf-utils to name only two. Both packages can be used along withcilium/ebpf
to attach eBPF programs toperf
events.Also the standard library provides an option to do so with unix#PerfEventOpen.
General speaking there are usually four steps involved to attach an eBPF program to a perf event: