Closed Officeyutong closed 7 months ago
According to libbpf's description to usdt https://github.com/libbpf/libbpf/blob/f81eef23b33c0dbf923e863a72ce51ea4d32e291/src/usdt.c#L24
The implementation of attach type usdt is just plain uprobes, attached to the specified nop instruction. libbpf handles all other things, including parse ELF and figure out tracepoints, resolving tracepoint arguments in the ebpf side, and so on, through two internal maps (bpf_usdt_specs and bpf_usdt_ip_to_spec_id, where the latter is only needed if bpf cookie is not supported)
So the thing we need to do is
This looks great! Thanks!
Would you mind also checking whether this works with bpftrace (I remember seeing somewhere that you can use bpftrace with bpftime as the runtime)?
This looks great! Thanks!
Would you mind also checking whether this works with bpftrace (I remember seeing somewhere that you can use bpftrace with bpftime as the runtime)?
Ok, I'll also check it
USDT is almost working now. Bpftrace is pending for testing
Maybe we can get this PR merged first if the libbpf example in example/usdt_minimal/README.md
is working?
After that, we can:
Maybe we can get this PR merged first if the libbpf example in
example/usdt_minimal/README.md
is working?After that, we can:
- check and fix bpftrace
- update documents.
It's OK to merge now
Closes #135