How to attach a perf_event_programm, when cpu-profiling? #1846
Replies: 1 comment
-
cilium/ebpf focuses on the eBPF subsystem of the Linux kernel. libbpf on the other hand is less strict and also implements some parts of the perf subsystem of the Linux kernel. With https://github.com/florianl/perf-ebpf there are showcases on various Go packages, that implement parts of the perf subsystem and can be used in combination with cilium/ebpf to attach eBPF programs to perf events. But similar to libbpf, attaching to all kinds of perf events is still not possible. If you are looking for a widely used approach, feel free to checkout this OTel project that attaches eBPF programs to the perf subsystem for sampling based CPU profiling: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to do "continuous on-cpu profile". With libbpf, I can attach the programm like below, using "bpf_program__attach_perf_event". How can I achieve this with cilium?
Beta Was this translation helpful? Give feedback.
All reactions