-
Notifications
You must be signed in to change notification settings - Fork 472
Description
The bcc framework is not a recommendation for ebpf program writing, and projects like bpftrace are migrating towards libbpf.
In bcc, there are APIs available for querying USDT probe information (see example in bpftrace
). With the migration, we run into the gap that libbpf currently doesn’t provide similar functionality, which forces users to parse ELF files manually.
The process of discovering USDTs actually involves two distinct responsibilities:
- Discovering binaries (executables and shared libraries) that constitute a process. This is not something libbpf needs to handle. It should be up to the user (e.g. bpftrace) to implement.
- Discovering which USDTs belong to a given binary. In principle, this could be provided by libbpf.
At this stage, however, libbpf does not expose any “USDT manager” through its public API, so it seems premature to add such functionality now.
This issue is meant to track the idea and provide context for possible future work, in case we decide to expose APIs such as bpf_program__usdt_probe_list() later.