Using bpftool skeleton #2
Replies: 2 comments 2 replies
-
So the way BCC works is a little bit antiquated as I understand it for BPF. BPF programs loading into the kernel are similar to how the JVM can have classloaders that load classes. In Java if an API changed the class loader would throw some kind of Exception/Error from the spec at load time. For the Linux kernel APIs changing is something of the norm, for example, the task data structure (used by processes and threads) may or may not have cgroup (container) information accessible from it. This is determined at compile time for the Linux kernel based on #ifdefs. For BPF programs this is a nuisance as they want to compile with known offsets, there was no symbolic lookup like with Java class files. To solve this BCC would compile the BPF C code at runtime and "reflect" on the Linux kernel to work out offsets and the like. Header files would be built at runtime and then used in the BPF program's C code. Modern BPF programs are different because of CO-RE: |
Beta Was this translation helpful? Give feedback.
-
I also saw this problem, but thanks for the brief explanation. Do I understand correctly that this would entail
It sounds like quite a lot of work (especially the first part), but certainly something I want to tackle in the future. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Maybe bpftool skeleton could be used later? Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions