foniod / redbpf

Rust library for building and running BPF/eBPF modules
Apache License 2.0
1.71k stars 136 forks source link

Improve support for tracepoints #331

Closed GermanCoding closed 2 years ago

GermanCoding commented 2 years ago

This adds a macro to aid in creating tracepoints, adds various documentation & an example for tracepoints and fixes a bug that prevented tracepoints from attaching.

This is essentially a light version of #124 which does not attempt to generate the tracepoint structs automatically. Instead users are expected to do this themselves. This is not entirely ideal, but given the issues #124 had with this I believe this is the simplest way to go.

This also does not change existing API functions and as such remains largely compatible.